Skip to content

Commit 5945569

Browse files
Configure Swift snapshot toolchain in workflow
1 parent 6b4b2ae commit 5945569

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,23 @@ jobs:
1010
steps:
1111
- name: Checkout
1212
uses: actions/checkout@v4
13+
- name: Configure Swift toolchain
14+
run: |
15+
curl -O https://download.swift.org/swiftly/darwin/swiftly.pkg && \
16+
installer -pkg swiftly.pkg -target CurrentUserHomeDirectory && \
17+
~/.swiftly/bin/swiftly init --skip-install && \
18+
. "${SWIFTLY_HOME_DIR:-$HOME/.swiftly}/env.sh" && \
19+
hash -r
20+
swiftly install main-snapshot
21+
toolchain_path=$(ls -d ~/Library/Developer/Toolchains/*DEVELOPMENT-SNAPSHOT*.xctoolchain | head -n 1)
22+
echo SWIFT_TOOLCHAIN=$(defaults read "$toolchain_path/Info" CFBundleIdentifier) \
23+
>> $GITHUB_ENV
1324
- name: Select Xcode
1425
run: sudo xcode-select -switch /Applications/Xcode_16.4.app/Contents/Developer
1526
- name: Test
1627
run: |
1728
mkdir build && xcodebuild \
29+
-toolchain "$SWIFT_TOOLCHAIN" \
1830
-scheme Deus \
1931
-destination 'platform=OS X,arch=${{ matrix.arch }}' \
2032
-allowProvisioningUpdates CODE_SIGN_IDENTITY='-' \

0 commit comments

Comments
 (0)