diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index eb2518116..bf2f0446c 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -27,6 +27,25 @@ jobs: - run: cargo test --verbose --package rayon-core - run: ./ci/highlander.sh + # wasm32-unknown-unknown builds, and even has the runtime fallback for + # unsupported threading, but we don't have an environment to execute in. + # wasm32-wasi can test the fallback by running in wasmtime. + wasm: + name: WebAssembly + runs-on: ubuntu-latest + env: + CARGO_TARGET_WASM32_WASI_RUNNER: $HOME/.wasmtime/bin/wasmtime + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + with: + targets: wasm32-unknown-unknown,wasm32-wasi + - run: cargo check --verbose --target wasm32-unknown-unknown + - run: cargo check --verbose --target wasm32-wasi + - run: curl https://wasmtime.dev/install.sh -sSf | bash + - run: cargo test --verbose --target wasm32-wasi --package rayon + - run: cargo test --verbose --target wasm32-wasi --package rayon-core + fmt: name: Format runs-on: ubuntu-latest