Skip to content

Commit

Permalink
Use the official compiler and Swift SDK for WebAssembly
Browse files Browse the repository at this point in the history
  • Loading branch information
kateinoigakukun committed Aug 28, 2024
1 parent c3016a3 commit 1f8bfef
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,23 @@ jobs:
OMIT_MACRO_TESTS: 1
strategy:
matrix:
toolchain:
- wasm-DEVELOPMENT-SNAPSHOT-2024-08-26-a
include:
- toolchain: swift-DEVELOPMENT-SNAPSHOT-2024-07-08-a
swift-sdk: swift-wasm-DEVELOPMENT-SNAPSHOT-2024-07-09-a
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: Install Swift and Swift SDK 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"
- name: Build tests
run: swift build --static-swift-stdlib --triple wasm32-unknown-wasi --build-tests -Xlinker -z -Xlinker stack-size=$((1024 * 1024))
run: swift build --swift-sdk wasm32-unknown-wasi --build-tests -Xlinker -z -Xlinker stack-size=$((1024 * 1024))
- name: Run tests
run: wasmtime .build/debug/swift-case-pathsPackageTests.wasm

Expand Down

0 comments on commit 1f8bfef

Please sign in to comment.