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 0d46dd9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ jobs:
# For some reason this is required to run the fuzzer on OSX
rustup target add x86_64-apple-darwin
- name: Setup wasmtime
uses: bytecodealliance/actions/wasmtime/setup@v1
with:
version: "24.0.0"

- name: Install cargo-deny
if: steps.rust-cache.outputs.cache-hit != 'true'
run: rustup run --install 1.74 cargo install --force --version 0.14.17 cargo-deny --locked
Expand All @@ -60,6 +65,10 @@ jobs:
if: steps.rust-cache.outputs.cache-hit != 'true'
run: cargo install --force --version 0.11.0 cargo-fuzz --locked

- name: Install cargo-wasi
if: steps.rust-cache.outputs.cache-hit != 'true'
run: cargo install --force --version 0.1.28 cargo-wasi --locked

- name: Install just
if: steps.rust-cache.outputs.cache-hit != 'true'
run: cargo install --force --version 1.8.0 just --locked
Expand Down Expand Up @@ -98,12 +107,9 @@ 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
just test_wasi
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ install_py: pre
test: pre
RUST_BACKTRACE=1 cargo test

test_wasi: pre
CARGO_TARGET_WASM32_WASI_RUNNER="wasmtime --mapdir=/::$TMPDIR" cargo +nightly wasi test -- --nocapture
test_wasi:
RUSTFLAGS="-Z wasi-exec-model=reactor" cargo +nightly wasi test -- --nocapture

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

0 comments on commit 0d46dd9

Please sign in to comment.