Skip to content

Commit

Permalink
Run CI tests in wasm as well
Browse files Browse the repository at this point in the history
Inspired by #41 but hasn't actually found any issues.
  • Loading branch information
alexcrichton committed May 8, 2024
1 parent c527a26 commit 5faea84
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,28 @@ jobs:
rust: stable
- os: windows-latest
rust: stable
- os: ubuntu-latest
rust: stable
target: wasm32-wasip1
steps:
- uses: actions/checkout@v4
- name: Install Rust (
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
shell: bash

# Configure cross-builds by adding the rustup target and configuring future
# cargo invocations.
- run: |
rustup target add ${{ matrix.target }}
echo CARGO_BUILD_TARGET=${{ matrix.target }} >> $GITHUB_ENV
if: matrix.target != ''
# For wasm install wasmtime as a test runner and configure it with Cargo.
- name: Setup `wasmtime`
uses: bytecodealliance/actions/wasmtime/setup@v1
if: matrix.target == 'wasm32-wasip1'
- run: echo CARGO_TARGET_WASM32_WASIP1_RUNNER=wasmtime
if: matrix.target == 'wasm32-wasip1'

- run: cargo test
- run: cargo test --features debug
- run: cargo test --features global
Expand Down

0 comments on commit 5faea84

Please sign in to comment.