From ea28c4ce22687d60b14d63d49abc37cedcda15a8 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 22 Sep 2025 22:36:08 -0700 Subject: [PATCH] ci: test wasi on rust stable --- .github/workflows/ci.yml | 19 +++++++++++++------ tests/namedtempfile.rs | 4 ++++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7132ee7c..75abc8a4a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,25 +50,32 @@ jobs: - name: "Android" os: ubuntu-latest target: x86_64-linux-android + - name: "WASI P1" + os: ubuntu-latest + target: wasm32-wasip1 + test-flags: --tests + - name: "WASI P2" + os: ubuntu-latest + target: wasm32-wasip2 + test-flags: --tests exclude: - rust-version: "1.63" platform: name: "Android" os: ubuntu-latest target: x86_64-linux-android - include: - - rust-version: "nightly" - test-flags: --tests + - rust-version: "1.63" platform: name: "WASI P1" os: ubuntu-latest target: wasm32-wasip1 - - rust-version: "nightly" - test-flags: --tests + test-flags: --tests + - rust-version: "1.63" platform: name: "WASI P2" os: ubuntu-latest target: wasm32-wasip2 + test-flags: --tests name: Platform Test (${{ matrix.platform.name }} / ${{ matrix.rust-version }}) runs-on: ${{ matrix.platform.os }} steps: @@ -129,7 +136,7 @@ jobs: - name: Build run: cargo build --target ${{ matrix.platform.target }} ${{ matrix.rust-version == 'nightly' && '--features nightly' || '' }} - name: Test - run: cargo test --target ${{ matrix.platform.target }} ${{ matrix.rust-version == 'nightly' && '--features nightly' || '' }} ${{ matrix.test-flags }} -- --nocapture + run: cargo test --target ${{ matrix.platform.target }} ${{ matrix.rust-version == 'nightly' && '--features nightly' || '' }} ${{ matrix.platform.test-flags }} -- --nocapture - name: Stop the redroid container if: ${{ contains(matrix.platform.target, 'android') }} run: | diff --git a/tests/namedtempfile.rs b/tests/namedtempfile.rs index c453b521a..81f67445b 100644 --- a/tests/namedtempfile.rs +++ b/tests/namedtempfile.rs @@ -148,6 +148,10 @@ fn test_append() { } #[test] +#[cfg_attr( + all(target_os = "wasi", not(feature = "nightly")), + ignore = "reopen on wasi requires the 'nightly' feature" +)] fn test_reopen() { configure_wasi_temp_dir();