ci: bump Swift SDK to swift-wasm-5.10-SNAPSHOT-2024-06-01-a #181
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Swift | |
on: | |
push: | |
branches: ["wasm32-wasi-release/5.10"] | |
pull_request: | |
branches: ["wasm32-wasi-release/5.10"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: swiftlang/swift:nightly-5.10-jammy@sha256:beb5b0cf1d63c8b5182d979a7ef36a7297617c21ae876c81952cccae3af2e538 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install tools | |
run: apt-get update && apt-get install --no-install-recommends -y wabt binaryen | |
- run: swift --version | |
- run: swift experimental-sdk install https://github.com/swiftwasm/swift/releases/download/swift-wasm-5.10-SNAPSHOT-2024-06-01-a/swift-wasm-5.10-SNAPSHOT-2024-06-01-a-ubuntu22.04_x86_64.artifactbundle.zip | |
- name: Build | |
run: | | |
swift build --product swift-format --experimental-swift-sdk wasm32-unknown-wasi -c release -Xlinker -z -Xlinker stack-size=524288 | |
wasm-strip .build/release/swift-format.wasm | |
wasm-opt -Oz -all .build/release/swift-format.wasm -o swift-format.wasm | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: swift-format.wasm | |
path: swift-format.wasm | |
test: | |
runs-on: ubuntu-latest | |
container: swiftlang/swift:nightly-5.10-jammy@sha256:beb5b0cf1d63c8b5182d979a7ef36a7297617c21ae876c81952cccae3af2e538 | |
env: | |
STACK_SIZE: 4194304 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: bytecodealliance/actions/wasmtime/setup@v1 | |
- run: swift --version | |
- run: wasmtime -V | |
- run: swift experimental-sdk install https://github.com/swiftwasm/swift/releases/download/swift-wasm-5.10-SNAPSHOT-2024-06-01-a/swift-wasm-5.10-SNAPSHOT-2024-06-01-a-ubuntu22.04_x86_64.artifactbundle.zip | |
- run: swift build -c release --build-tests --experimental-swift-sdk wasm32-unknown-wasi -Xlinker -z -Xlinker stack-size=$STACK_SIZE | |
- run: wasmtime --dir / --wasm max-wasm-stack=$STACK_SIZE .build/release/swift-formatPackageTests.wasm |