From a0e0c012131d5754c190f3534673863817886592 Mon Sep 17 00:00:00 2001 From: Stephen Celis Date: Thu, 26 Dec 2024 17:16:43 -0800 Subject: [PATCH] Fix Wasm CI --- .github/workflows/ci.yml | 41 +++++++++++++++------------------------- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59eca07..1ebe87b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,30 +43,19 @@ jobs: - name: Run tests run: swift test -c ${{ matrix.config }} - wasm: - name: Wasm - runs-on: ubuntu-latest - strategy: - matrix: - include: - - toolchain: swift-DEVELOPMENT-SNAPSHOT-2024-07-08-a - swift-sdk: swift-wasm-DEVELOPMENT-SNAPSHOT-2024-07-09-a - steps: - - uses: actions/checkout@v4 - - uses: bytecodealliance/actions/wasmtime/setup@v1 - - name: Install Swift and Swift SFK for WebAssembly - run: | - PREFIX=/opt/swift - SWIFT_TOOLCHAIN_TAG="${{ matrix.toolchain }}" - SWIFT_SDK_TAG="${{ matrix.swift-sdk }}" - set -ex - curl -f -o /tmp/swift.tar.gz "https://download.swift.org/development/ubuntu2204/$SWIFT_TOOLCHAIN_TAG/$SWIFT_TOOLCHAIN_TAG-ubuntu22.04.tar.gz" - sudo mkdir -p $PREFIX; sudo tar -xzf /tmp/swift.tar.gz -C $PREFIX --strip-component 1 - $PREFIX/usr/bin/swift experimental-sdk install "https://github.com/swiftwasm/swift/releases/download/$SWIFT_SDK_TAG/$SWIFT_SDK_TAG-wasm32-unknown-wasi.artifactbundle.zip" - echo "$PREFIX/usr/bin" >> $GITHUB_PATH - - name: Build tests - run: swift build --swift-sdk wasm32-unknown-wasi --build-tests -Xlinker -z -Xlinker stack-size=$((1024 * 1024)) - - name: Run tests - run: wasmtime --dir . .build/debug/swift-clocksPackageTests.wasm - + name: Wasm + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: bytecodealliance/actions/wasmtime/setup@v1 + - name: Install Swift and Swift SDK for WebAssembly + run: | + PREFIX=/opt/swift + set -ex + 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" + sudo mkdir -p $PREFIX; sudo tar -xzf /tmp/swift.tar.gz -C $PREFIX --strip-component 1 + $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 + echo "$PREFIX/usr/bin" >> $GITHUB_PATH + - name: Build + run: swift build --swift-sdk wasm32-unknown-wasi -Xlinker -z -Xlinker stack-size=$((1024 * 1024))