ci: bump wasmtime to 28.0.1 #221
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: SwiftWasm | |
on: | |
push: | |
branches: ["wasm32-wasi"] | |
pull_request: | |
branches: ["wasm32-wasi"] | |
env: | |
SWIFT_SDK_URL: https://github.com/swiftwasm/swift/releases/download/swift-wasm-DEVELOPMENT-SNAPSHOT-2025-01-06-a/swift-wasm-DEVELOPMENT-SNAPSHOT-2025-01-06-a-wasm32-unknown-wasi.artifactbundle.zip | |
SWIFT_SDK_CHECKSUM: d0bc0992329b5a9772e5c9ab44d5fb90aa568b1886406161ad58b9c53d76bcba | |
TARGET_TRIPLE: wasm32-unknown-wasi | |
WASMTIME_VESRION: 28.0.1 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: swiftlang/swift:nightly-main-jammy@sha256:b26b5ba54743fe2ef662b1aa0cd2ec23f4c9e35ddc15c6a1aca4a772481236a4 | |
env: | |
STACK_SIZE: 524288 | |
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 sdk install $SWIFT_SDK_URL --checksum $SWIFT_SDK_CHECKSUM | |
- name: Build | |
run: | | |
swift build --product swift-format --swift-sdk $TARGET_TRIPLE -c release -Xlinker -z -Xlinker stack-size=$STACK_SIZE | |
wasm-strip .build/release/swift-format.wasm | |
wasm-opt -Oz --enable-bulk-memory --enable-sign-ext .build/release/swift-format.wasm -o swift-format.wasm | |
- name: Upload swift-format.wasm | |
uses: actions/upload-artifact@v4 | |
with: | |
name: swift-format.wasm | |
path: swift-format.wasm | |
test-binary: | |
needs: build | |
runs-on: ubuntu-latest | |
container: swiftlang/swift:nightly-main-jammy@sha256:b26b5ba54743fe2ef662b1aa0cd2ec23f4c9e35ddc15c6a1aca4a772481236a4 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: bytecodealliance/actions/wasmtime/setup@v1 | |
with: | |
version: ${{ env.WASMTIME_VERSION }} | |
- run: wasmtime -V | |
- name: Download swift-format.wasm | |
uses: actions/download-artifact@v4 | |
with: | |
name: swift-format.wasm | |
- run: wasmtime --dir . swift-format.wasm --version | |
- run: wasmtime --dir . swift-format.wasm lint -r . | |
test: | |
runs-on: ubuntu-latest | |
container: swiftlang/swift:nightly-main-jammy@sha256:b26b5ba54743fe2ef662b1aa0cd2ec23f4c9e35ddc15c6a1aca4a772481236a4 | |
env: | |
STACK_SIZE: 4194304 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: bytecodealliance/actions/wasmtime/setup@v1 | |
with: | |
version: ${{ env.WASMTIME_VERSION }} | |
- run: swift --version | |
- run: wasmtime -V | |
- run: swift sdk install $SWIFT_SDK_URL --checksum $SWIFT_SDK_CHECKSUM | |
- run: swift build -c release --build-tests --swift-sdk $TARGET_TRIPLE -Xlinker -z -Xlinker stack-size=$STACK_SIZE | |
- run: wasmtime --dir / --wasm max-wasm-stack=$STACK_SIZE .build/release/swift-formatPackageTests.wasm |