Skip to content

Commit e18b52e

Browse files
committed
use swift setup action
1 parent 79aa03e commit e18b52e

1 file changed

Lines changed: 11 additions & 13 deletions

File tree

.github/workflows/tests.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,19 @@ jobs:
1111
- uses: actions/setup-node@v4
1212
with:
1313
node-version: 20
14-
- run: npm ci
14+
- uses: swift-actions/setup-swift@v2
15+
with:
16+
swift-version: '6.2'
1517

16-
- name: Install Swift
17-
run: |
18-
curl -O https://download.swift.org/swiftly/darwin/swiftly.pkg && \
19-
installer -pkg swiftly.pkg -target CurrentUserHomeDirectory && \
20-
~/.swiftly/bin/swiftly init --quiet-shell-followup && \
21-
. "${SWIFTLY_HOME_DIR:-$HOME/.swiftly}/env.sh" && \
22-
hash -r
23-
24-
- name: Configure Swift
18+
- name: Install Swift WASI SDK
2519
run: |
26-
swiftly install 6.2 && \
27-
swiftly use 6.2 && \
28-
swift sdk install https://download.swift.org/swift-6.2-release/wasm/swift-6.2-RELEASE/swift-6.2-RELEASE_wasm.artifactbundle.tar.gz --checksum fe4e8648309fce86ea522e9e0d1dc48e82df6ba6e5743dbf0c53db8429fb5224
20+
set -euxo pipefail
21+
SWIFT_WASI_SDK_URL="https://download.swift.org/swift-6.2-release/wasm/swift-6.2-RELEASE/swift-6.2-RELEASE_wasm.artifactbundle.tar.gz"
22+
swift --version
23+
swift sdk install "$SWIFT_WASI_SDK_URL"
24+
25+
- name: Install Dependencies
26+
run: npm ci
2927

3028
- name: Build
3129
run: npm run build

0 commit comments

Comments
 (0)