Skip to content

Commit 1a9c484

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

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,14 @@ 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
147+
env:
148+
SWIFT_VERSION: "${{ matrix.swift_version }}"
145149
- name: "Verify sample: ${{ matrix.sample_app }}"
146150
run: .github/scripts/validate_sample.sh Samples/${{ matrix.sample_app }}
147151

152+
148153
verify-samples-macos:
149154
name: Sample ${{ matrix.sample_app }} (${{ matrix.os_version }} swift:${{ matrix.swift_version }} jdk:${{matrix.jdk_vendor}})
150155
runs-on: [self-hosted, macos, sequoia, ARM64]

0 commit comments

Comments
 (0)