Skip to content

Commit ec0e0c7

Browse files
committed
Update action workflow tests
1 parent 3a1afb8 commit ec0e0c7

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

.github/workflows/test-action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ jobs:
6969
strategy:
7070
fail-fast: false
7171
matrix:
72-
os: ['ubuntu-24.04', 'ubuntu-22.04', 'ubuntu-20.04', 'macos-13', 'macos-15']
72+
os: ['ubuntu-24.04', 'ubuntu-22.04', 'macos-13', 'macos-15']
73+
swift-version: ['6.0.3', '6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a']
7374
steps:
7475
- name: Checkout Action
7576
uses: actions/checkout@v4
@@ -83,7 +84,7 @@ jobs:
8384
with:
8485
# just set up the toolchain and don't build anything
8586
build-package: false
86-
swift-version: '6.0.3'
87+
swift-version: ${{ matrix.swift-version }}
8788
- name: Checkout apple/swift-numerics
8889
uses: actions/checkout@v4
8990
with:

action.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,15 @@ runs:
167167
mkdir -p ~/swift-download
168168
cd ~/swift-download
169169
BASE_URL="https://download.swift.org/${{ steps.setup.outputs.swift-branch }}"
170+
170171
if [ ${RUNNER_OS} == 'Linux' ]; then
171-
curl -fsSL --retry 8 --retry-connrefused ${BASE_URL}/${{ steps.setup.outputs.osid }}/${{ steps.setup.outputs.swift-id }}/${{ steps.setup.outputs.swift-id }}-${{ steps.setup.outputs.osidpair }}.tar.gz --output swift.tar.gz
172+
HOST_TOOLCHAIN_URL="${BASE_URL}/${{ steps.setup.outputs.osid }}/${{ steps.setup.outputs.swift-id }}/${{ steps.setup.outputs.swift-id }}-${{ steps.setup.outputs.osidpair }}.tar.gz"
173+
echo "HOST_TOOLCHAIN_URL: ${HOST_TOOLCHAIN_URL}"
174+
curl -fsSL --retry 8 --retry-connrefused ${HOST_TOOLCHAIN_URL} --output swift.tar.gz
172175
elif [ ${RUNNER_OS} == 'macOS' ]; then
173-
curl -fsSL --retry 8 --retry-connrefused ${BASE_URL}/xcode/${{ steps.setup.outputs.swift-id }}/${{ steps.setup.outputs.swift-id }}-osx.pkg --output swift.pkg
176+
HOST_TOOLCHAIN_URL="${BASE_URL}/xcode/${{ steps.setup.outputs.swift-id }}/${{ steps.setup.outputs.swift-id }}-osx.pkg"
177+
echo "HOST_TOOLCHAIN_URL: ${HOST_TOOLCHAIN_URL}"
178+
curl -fsSL --retry 8 --retry-connrefused ${HOST_TOOLCHAIN_URL} --output swift.pkg
174179
else
175180
echo "::error::Unsupported platform: ${RUNNER_OS}"
176181
exit 1
@@ -216,7 +221,10 @@ runs:
216221
217222
mkdir -p ${RUNNER_TEMP}/swift-android-toolchain
218223
cd ${RUNNER_TEMP}/swift-android-toolchain
219-
curl -fsSL --retry 8 --retry-connrefused https://github.com/skiptools/swift-android-toolchain/releases/download/${{ steps.setup.outputs.swift-version }}/${SWIFT_SDK_ID}.artifactbundle.tar.gz --output ${SWIFT_SDK_ID}.artifactbundle.tar.gz
224+
225+
ANDROID_SDK_URL="https://github.com/skiptools/swift-android-toolchain/releases/download/${{ steps.setup.outputs.swift-version }}/${SWIFT_SDK_ID}.artifactbundle.tar.gz"
226+
echo "ANDROID_SDK_URL: ${ANDROID_SDK_URL}"
227+
curl -fsSL --retry 8 --retry-connrefused ${ANDROID_SDK_URL} --output ${SWIFT_SDK_ID}.artifactbundle.tar.gz
220228
221229
# first check if it already installed (we may be running this workflow multiple times for an action, in which case it will already be present)
222230
${SWIFT_INSTALLATION}/bin/swift sdk configure --show-configuration ${SWIFT_SDK_ID} ${SWIFT_SDK_TARGET} &> /dev/null || ${SWIFT_INSTALLATION}/bin/swift sdk install ${SWIFT_SDK_ID}.artifactbundle.tar.gz

0 commit comments

Comments
 (0)