Skip to content

Commit e5b9d99

Browse files
Install OSS Swift on macOS
1 parent 0a35622 commit e5b9d99

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/test.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
fail-fast: true
2121
matrix:
2222
include:
23-
- os: macos-11
23+
- os: macos-latest
2424
- os: ubuntu-latest
2525
container: swift:6.0.3
2626
- os: ubuntu-latest
@@ -29,6 +29,16 @@ jobs:
2929
container: ${{ matrix.container }}
3030
steps:
3131
- uses: actions/checkout@v4
32+
- name: Install OSS Swift on macOS
33+
if: ${{ startsWith(matrix.os, 'macos') }}
34+
run: |
35+
SWIFT_TOOLCHAIN_CHANNEL=swift-6.0.3-release;
36+
SWIFT_TOOLCHAIN_TAG="swift-6.0.3-RELEASE";
37+
pkg="$(mktemp -d)/InstallMe.pkg"; set -ex;
38+
curl -o "$pkg" "https://download.swift.org/$SWIFT_TOOLCHAIN_CHANNEL/xcode/$SWIFT_TOOLCHAIN_TAG/$SWIFT_TOOLCHAIN_TAG-osx.pkg";
39+
installer -pkg "$pkg" -target CurrentUserHomeDirectory;
40+
TOOLCHAINS="$(plutil -extract CFBundleIdentifier raw ~/Library/Developer/Toolchains/$SWIFT_TOOLCHAIN_TAG.xctoolchain/Info.plist)";
41+
echo "TOOLCHAINS=$TOOLCHAINS" >> $GITHUB_ENV
3242
- run: swift --version
3343
- uses: ./
3444
- run: |

0 commit comments

Comments
 (0)