File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ # This script is reused from Swiftly itself, see:
4
+ # https://github.com/swiftlang/swiftly/blob/main/scripts/prep-gh-action.sh
5
+ #
3
6
# This script does a bit of extra preparation of the docker containers used to run the GitHub workflows
4
7
# that are specific to this project's needs when building/testing. Note that this script runs on
5
8
# every supported Linux distribution and macOS so it must adapt to the distribution that it is running.
@@ -57,6 +60,10 @@ if [ "$installSwiftly" == true ]; then
57
60
echo " Installing latest main-snapshot toolchain"
58
61
selector=(" main-snapshot" )
59
62
runSelector=(" +main-snapshot" )
63
+ elif [ -n " ${SWIFT_VERSION} " ]; then
64
+ echo " Installing selected swift toolchain from SWIFT_VERSION environment variable"
65
+ selector=(" ${SWIFT_VERSION} " )
66
+ runSelector=(" ${SWIFT_VERSION} " )
60
67
elif [ -f .swift-version ]; then
61
68
echo " Installing selected swift toolchain from .swift-version file"
62
69
selector=()
Original file line number Diff line number Diff line change @@ -142,8 +142,12 @@ jobs:
142
142
- uses : actions/checkout@v4
143
143
- name : Prepare CI Environment
144
144
uses : ./.github/actions/prepare_env
145
+ - name : Prepare the action
146
+ run : ./.github/scripts/prep-gh-action.sh --install-swiftly
145
147
- name : " Verify sample: ${{ matrix.sample_app }}"
146
148
run : .github/scripts/validate_sample.sh Samples/${{ matrix.sample_app }}
149
+ env :
150
+ SWIFT_VERSION : ${{ matrix.swift_version }}
147
151
148
152
verify-samples-macos :
149
153
name : Sample ${{ matrix.sample_app }} (${{ matrix.os_version }} swift:${{ matrix.swift_version }} jdk:${{matrix.jdk_vendor}})
You can’t perform that action at this time.
0 commit comments