Skip to content

Commit

Permalink
CI: Add wasm32-wasi to CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
briansmith committed Oct 14, 2023
1 parent 9f9063a commit 8cdd4e7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ jobs:
- i686-unknown-linux-musl
- powerpc-unknown-linux-gnu
- riscv64gc-unknown-linux-gnu
- wasm32-wasi
- x86_64-pc-windows-gnu
- x86_64-pc-windows-msvc
- x86_64-apple-darwin
Expand Down Expand Up @@ -254,6 +255,9 @@ jobs:
- target: riscv64gc-unknown-linux-gnu
host_os: ubuntu-22.04

- target: wasm32-wasi
host_os: ubuntu-22.04

- target: x86_64-pc-windows-gnu
host_os: windows-latest

Expand Down Expand Up @@ -435,7 +439,7 @@ jobs:

# The wasm32-unknown-unknown targets have a different set of feature sets and
# an additional `webdriver` dimension.
test-wasm32:
test-wasm32-browser:
# Don't run duplicate `push` jobs for the repo owner's PRs.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository

Expand Down
6 changes: 3 additions & 3 deletions mk/cargo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ case $target in
;;
wasm32-wasi)
# The first two are only needed for when the "wasm_c" feature is enabled.
export CC_wasm32_wasi=$WASI_SDK_PATH/bin/clang
export AR_wasm32_wasi=$WASI_SDK_PATH/bin/llvm-ar
export CARGO_TARGET_WASM32_WASI_RUNNER=wasmtime
export CC_wasm32_wasi=clang-$llvm_version
export AR_wasm32_wasi=llvm-ar-$llvm_version
export CARGO_TARGET_WASM32_WASI_RUNNER=target/tools/linux-x86_64/wasmtime/wasmtime
;;
*)
;;
Expand Down
7 changes: 7 additions & 0 deletions mk/install-build-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ case $target in
cargo install wasm-bindgen-cli --bin wasm-bindgen-test-runner
use_clang=1
;;
--target=wasm32-wasi)
git clone \
--branch linux-x86_64 \
--depth 1 \
https://github.com/briansmith/ring-toolchain \
target/tools/linux-x86_64
;;
--target=*)
;;
esac
Expand Down

0 comments on commit 8cdd4e7

Please sign in to comment.