Skip to content

Commit 5c72c92

Browse files
committed
CI: test wasi
1 parent 06ad6d8 commit 5c72c92

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/rust.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,31 @@ jobs:
108108
tool: wasm-pack
109109
- run: wasm-pack test --node
110110

111+
test-wasi:
112+
strategy:
113+
fail-fast: false
114+
matrix:
115+
toolchain:
116+
- stable
117+
- nightly
118+
runs-on: ubuntu-latest
119+
steps:
120+
- name: Checkout
121+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
122+
with:
123+
persist-credentials: false
124+
- name: Install Rust
125+
run: |
126+
rustup toolchain install ${{ matrix.toolchain }} --profile minimal --no-self-update --target wasm32-wasip1
127+
rustup default ${{ matrix.toolchain }}
128+
- env:
129+
CARGO_BUILD_TARGET: wasm32-wasip1
130+
run: cargo build --release --examples
131+
- name: Install wasmtime
132+
uses: bytecodealliance/actions/wasmtime/setup@6aecabac1eb1dcf7ed94ba9471974415ee2ebef2 # v1
133+
- name: Run example using wasmtime
134+
run: wasmtime ./target/wasm32-wasip1/release/examples/get_timezone.wasm
135+
111136
test-emscripten:
112137
strategy:
113138
fail-fast: false

0 commit comments

Comments
 (0)