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 - i686-unknown-linux-musl
- powerpc-unknown-linux-gnu - powerpc-unknown-linux-gnu
- riscv64gc-unknown-linux-gnu - riscv64gc-unknown-linux-gnu
- wasm32-wasi
- x86_64-pc-windows-gnu - x86_64-pc-windows-gnu
- x86_64-pc-windows-msvc - x86_64-pc-windows-msvc
- x86_64-apple-darwin - x86_64-apple-darwin
@ -254,6 +255,9 @@ jobs:
- target: riscv64gc-unknown-linux-gnu - target: riscv64gc-unknown-linux-gnu
host_os: ubuntu-22.04 host_os: ubuntu-22.04
- target: wasm32-wasi
host_os: ubuntu-22.04
- target: x86_64-pc-windows-gnu - target: x86_64-pc-windows-gnu
host_os: windows-latest host_os: windows-latest
@ -435,7 +439,7 @@ jobs:
# The wasm32-unknown-unknown targets have a different set of feature sets and # The wasm32-unknown-unknown targets have a different set of feature sets and
# an additional `webdriver` dimension. # an additional `webdriver` dimension.
test-wasm32: test-wasm32-browser:
# Don't run duplicate `push` jobs for the repo owner's PRs. # 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 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) wasm32-wasi)
# The first two are only needed for when the "wasm_c" feature is enabled. # The first two are only needed for when the "wasm_c" feature is enabled.
export CC_wasm32_wasi=$WASI_SDK_PATH/bin/clang export CC_wasm32_wasi=clang-$llvm_version
export AR_wasm32_wasi=$WASI_SDK_PATH/bin/llvm-ar export AR_wasm32_wasi=llvm-ar-$llvm_version
export CARGO_TARGET_WASM32_WASI_RUNNER=wasmtime 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 cargo install wasm-bindgen-cli --bin wasm-bindgen-test-runner
use_clang=1 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=*) --target=*)
;; ;;
esac esac