From 8cdd4e70fa9d2870fd972ed777303ffaf207df07 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Sat, 14 Oct 2023 11:06:15 -0700 Subject: [PATCH] CI: Add wasm32-wasi to CI. --- .github/workflows/ci.yml | 6 +++++- mk/cargo.sh | 6 +++--- mk/install-build-tools.sh | 7 +++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ba3f9915d..6d498bfbea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/mk/cargo.sh b/mk/cargo.sh index 2d48c37e1f..ca272ccca5 100755 --- a/mk/cargo.sh +++ b/mk/cargo.sh @@ -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 ;; *) ;; diff --git a/mk/install-build-tools.sh b/mk/install-build-tools.sh index 827a7f628d..f939fb93e8 100755 --- a/mk/install-build-tools.sh +++ b/mk/install-build-tools.sh @@ -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