Skip to content

Commit 0c75cba

Browse files
committed
Run wasi tests
1 parent 24877cc commit 0c75cba

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -170,27 +170,21 @@ jobs:
170170
- name: Cache dependencies
171171
uses: Swatinem/rust-cache@v2
172172

173-
# - name: Install wasmtime
174-
# uses: taiki-e/install-action@v2
175-
# with:
176-
# tool: wasmtime
177-
178-
# - name: Install cargo-wasi
179-
# uses: taiki-e/install-action@v2
180-
# with:
181-
# tool: cargo-wasi
182-
183-
# - name: Build for WASI
184-
# run: cargo wasi build --features nightly --verbose
185-
186-
# - name: Build examples for WASI
187-
# run: cargo wasi build --features nightly --examples --verbose
188-
189-
# - name: Run tests in WASI environment
190-
# run: cargo wasi test --features nightly --verbose
173+
- name: Install wasmtime
174+
uses: taiki-e/install-action@v2
175+
with:
176+
tool: wasmtime
191177

192178
- name: Build for WASI
193179
run: cargo build --target wasm32-wasip2 --verbose
194180

195181
- name: Build examples for WASI
196182
run: cargo build --examples --target wasm32-wasip2 --verbose
183+
184+
- name: Run tests in WASI environment
185+
run: |
186+
cargo test --no-run --target wasm32-wasip2 --verbose
187+
find target/wasm32-wasip2/debug/deps -type f -name "*.wasm" | while read -r test_file; do
188+
echo "Running test: $test_file"
189+
wasmtime run "$test_file" --dir=.
190+
done

0 commit comments

Comments
 (0)