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 11#! /bin/bash
22
3+ # This script is reused from Swiftly itself, see:
4+ # https://github.com/swiftlang/swiftly/blob/main/scripts/prep-gh-action.sh
5+ #
36# This script does a bit of extra preparation of the docker containers used to run the GitHub workflows
47# that are specific to this project's needs when building/testing. Note that this script runs on
58# 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
5760 echo " Installing latest main-snapshot toolchain"
5861 selector=(" main-snapshot" )
5962 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} " )
6067 elif [ -f .swift-version ]; then
6168 echo " Installing selected swift toolchain from .swift-version file"
6269 selector=()
Original file line number Diff line number Diff line change @@ -142,8 +142,12 @@ jobs:
142142 - uses : actions/checkout@v4
143143 - name : Prepare CI Environment
144144 uses : ./.github/actions/prepare_env
145+ - name : Prepare the action
146+ run : ./.github/scripts/prep-gh-action.sh --install-swiftly
145147 - name : " Verify sample: ${{ matrix.sample_app }}"
146148 run : .github/scripts/validate_sample.sh Samples/${{ matrix.sample_app }}
149+ env :
150+ SWIFT_VERSION : ${{ matrix.swift_version }}
147151
148152 verify-samples-macos :
149153 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