Skip to content

Commit

Permalink
Enable wasi CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cberner committed Sep 7, 2024
1 parent 8a611be commit 92b151f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ jobs:
if: steps.rust-cache.outputs.cache-hit != 'true'
run: cargo install --force --version 1.8.0 just --locked

- name: Setup wasmtime
uses: bytecodealliance/actions/wasmtime/setup@v1
with:
version: "24.0.0"

- name: Compile
run: cargo build --all-targets --all-features

Expand Down Expand Up @@ -98,12 +103,10 @@ jobs:
pip3 install maturin
just test_py
# Re-enable when this works on stable
# - name: Run WASI tests
# if: startsWith(matrix.os, 'macos')
# run: |
# rustup toolchain install nightly
# rustup target add wasm32-wasi
# brew install wasmtime
# cargo install --force --version 0.1.27 cargo-wasi --locked
# just test_wasi
- name: Run WASI tests
if: runner.os != 'Windows'
run: |
rustup toolchain install nightly
rustup target add wasm32-wasi
cargo install --force --version 0.1.27 cargo-wasi --locked
just test_wasi
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test: pre
RUST_BACKTRACE=1 cargo test

test_wasi: pre
CARGO_TARGET_WASM32_WASI_RUNNER="wasmtime --mapdir=/::$TMPDIR" cargo +nightly wasi test -- --nocapture
CARGO_TARGET_WASM32_WASI_RUNNER="wasmtime --mapdir=/::/tmp" cargo +nightly wasi test -- --nocapture

bench bench='lmdb_benchmark': pre
cargo bench --bench {{bench}}
Expand Down

0 comments on commit 92b151f

Please sign in to comment.