Skip to content

Commit f3dd049

Browse files
FreezyLemonlu-zero
authored andcommitted
Add CI job that runs tests on wasm32-wasi
1 parent d3ce0f6 commit f3dd049

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

.github/workflows/rav1e.yml

+36-1
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@ jobs:
4949
- name: Install Rust 1.70.0
5050
uses: dtolnay/[email protected]
5151
with:
52-
targets: wasm32-unknown-unknown
52+
targets: wasm32-unknown-unknown, wasm32-wasi
5353

5454
- uses: Swatinem/rust-cache@v2
55+
with:
56+
prefix-key: v1-rust
5557

5658
- name: Run cargo check
5759
run: cargo check
@@ -63,6 +65,39 @@ jobs:
6365
--no-default-features
6466
-F wasm
6567
68+
- name: Run cargo check (wasi)
69+
run: >
70+
cargo check
71+
--target wasm32-wasi
72+
--no-default-features
73+
74+
wasi:
75+
runs-on: ubuntu-22.04
76+
needs: [rustfmt-clippy, msrv]
77+
78+
env:
79+
CARGO_INCREMENTAL: 0
80+
RUSTFLAGS: '-Dwarnings'
81+
CARGO_TARGET_WASM32_WASI_RUNNER: wasmtime
82+
83+
steps:
84+
- uses: actions/checkout@v4
85+
86+
- name: Install wasmtime
87+
uses: taiki-e/install-action@wasmtime
88+
89+
- name: Install Rust stable
90+
uses: dtolnay/rust-toolchain@stable
91+
with:
92+
targets: wasm32-wasi
93+
- uses: Swatinem/rust-cache@v2
94+
95+
- name: Run tests
96+
run: >
97+
cargo test
98+
--target wasm32-wasi
99+
--no-default-features
100+
66101
build-unix:
67102
strategy:
68103
matrix:

0 commit comments

Comments
 (0)