Skip to content

Commit 2deb7c4

Browse files
committed
resort to Swiftly to simplify locating swift dylib paths for samples
1 parent 6fca8b4 commit 2deb7c4

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.github/scripts/prep-gh-action.sh

100644100755
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
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=()

.github/workflows/pull_request.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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}})

0 commit comments

Comments
 (0)