Skip to content

Commit 8b7119a

Browse files
committed
Use newer Swift version for wasm
1 parent 3ef5cb1 commit 8b7119a

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/ci.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,16 @@ jobs:
4848
steps:
4949
- uses: actions/checkout@v4
5050
- uses: bytecodealliance/actions/wasmtime/setup@v1
51-
- uses: swiftwasm/setup-swiftwasm@v1
52-
with:
53-
swift-version: "wasm-5.9.2-RELEASE"
54-
- name: Build tests
55-
# Extend the stack size to avoid stack overflow in the test suites
56-
run: swift build --triple wasm32-unknown-wasi --build-tests -Xlinker -z -Xlinker stack-size=$((1024 * 1024))
51+
- name: Install Swift and Swift SDK for WebAssembly
52+
run: |
53+
PREFIX=/opt/swift
54+
set -ex
55+
curl -f -o /tmp/swift.tar.gz "https://download.swift.org/swift-6.0.2-release/ubuntu2204/swift-6.0.2-RELEASE/swift-6.0.2-RELEASE-ubuntu22.04.tar.gz"
56+
sudo mkdir -p $PREFIX; sudo tar -xzf /tmp/swift.tar.gz -C $PREFIX --strip-component 1
57+
$PREFIX/usr/bin/swift sdk install https://github.com/swiftwasm/swift/releases/download/swift-wasm-6.0.2-RELEASE/swift-wasm-6.0.2-RELEASE-wasm32-unknown-wasi.artifactbundle.zip --checksum 6ffedb055cb9956395d9f435d03d53ebe9f6a8d45106b979d1b7f53358e1dcb4
58+
echo "$PREFIX/usr/bin" >> $GITHUB_PATH
59+
- name: Build
60+
run: swift build --swift-sdk wasm32-unknown-wasi -Xlinker -z -Xlinker stack-size=$((1024 * 1024))
5761
- name: Run tests
5862
run: wasmtime .build/debug/swift-custom-dumpPackageTests.wasm
5963

0 commit comments

Comments
 (0)