-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI job that runs tests on wasm32-wasi
- Loading branch information
1 parent
d3ce0f6
commit f3dd049
Showing
1 changed file
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,9 +49,11 @@ jobs: | |
- name: Install Rust 1.70.0 | ||
uses: dtolnay/[email protected] | ||
with: | ||
targets: wasm32-unknown-unknown | ||
targets: wasm32-unknown-unknown, wasm32-wasi | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
prefix-key: v1-rust | ||
|
||
- name: Run cargo check | ||
run: cargo check | ||
|
@@ -63,6 +65,39 @@ jobs: | |
--no-default-features | ||
-F wasm | ||
- name: Run cargo check (wasi) | ||
run: > | ||
cargo check | ||
--target wasm32-wasi | ||
--no-default-features | ||
wasi: | ||
runs-on: ubuntu-22.04 | ||
needs: [rustfmt-clippy, msrv] | ||
|
||
env: | ||
CARGO_INCREMENTAL: 0 | ||
RUSTFLAGS: '-Dwarnings' | ||
CARGO_TARGET_WASM32_WASI_RUNNER: wasmtime | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install wasmtime | ||
uses: taiki-e/install-action@wasmtime | ||
|
||
- name: Install Rust stable | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: wasm32-wasi | ||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Run tests | ||
run: > | ||
cargo test | ||
--target wasm32-wasi | ||
--no-default-features | ||
build-unix: | ||
strategy: | ||
matrix: | ||
|