From 3788750e9098bd17b66634f5b4849e495a6e81f8 Mon Sep 17 00:00:00 2001 From: Brandon Williams <135203+mbrandonw@users.noreply.github.com> Date: Tue, 27 Aug 2024 12:04:41 -0400 Subject: [PATCH] Fix Wasm CI (#124) * Fix Wasm CI. * wip * wip * wip * wip * wip * wip * wip * wip * fix * wip * wip --- .github/workflows/ci.yml | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 600079d..c9b9437 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,18 +74,29 @@ jobs: - name: Build for static-stdlib run: CONFIG=${{ matrix.config }} make build-for-static-stdlib - # NB: Downloading the toolchain gets rate-limited by GitHub - # wasm: - # name: Wasm - # runs-on: macos-14 - # steps: - # - uses: actions/checkout@v4 - # - name: Select Xcode - # run: sudo xcode-select -s /Applications/Xcode_15.4.app - # - name: Select Swift version - # run: echo 'wasm-DEVELOPMENT-SNAPSHOT-2024-07-08-a' > .swift-version - # - name: Build - # run: swift run carton bundle + wasm: + name: SwiftWasm + runs-on: ubuntu-latest + strategy: + matrix: + toolchain: + - wasm-5.9.2-RELEASE + - wasm-5.10.0-RELEASE + steps: + - name: Cache toolchains + uses: actions/cache@v3 + with: + path: ~/Library/Developer/Toolchains + key: ${{ matrix.toolchain }} + - uses: actions/checkout@v4 + - uses: bytecodealliance/actions/wasmtime/setup@v1 + - uses: swiftwasm/setup-swiftwasm@v1 + with: + swift-version: ${{ matrix.toolchain }} + - name: Build tests + run: swift build --triple wasm32-unknown-wasi --build-tests -Xlinker -z -Xlinker stack-size=$((1024 * 1024)) + - name: Run tests + run: wasmtime .build/debug/xctest-dynamic-overlayPackageTests.wasm windows: name: Windows