CI: Add wasm32-wasi to CI.

This commit is contained in:
Brian Smith 2023-10-14 11:06:15 -07:00
parent 2019d8482f
commit 8348897d92
3 changed files with 16 additions and 4 deletions

View File

@ -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
@ -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
@ -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

View File

@ -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
;;
*)
;;

View File

@ -140,6 +140,14 @@ case $target in
cargo install wasm-bindgen-cli --bin wasm-bindgen-test-runner
use_clang=1
;;
--target=wasm32-wasi)
use_clang=1
git clone \
--branch linux-x86_64 \
--depth 1 \
https://github.com/briansmith/ring-toolchain \
target/tools/linux-x86_64
;;
--target=*)
;;
esac