Skip to content

Commit

Permalink
More Wasm targets
Browse files Browse the repository at this point in the history
  • Loading branch information
RReverser committed Jan 11, 2024
1 parent b80b406 commit 504eb55
Showing 1 changed file with 36 additions and 8 deletions.
44 changes: 36 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,48 @@ jobs:
# 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
name: WebAssembly (wasm32-unknown-unknown)
runs-on: ubuntu-latest
env:
CARGO_TARGET_WASM32_WASI_RUNNER: /home/runner/.wasmtime/bin/wasmtime
strategy:
matrix:
include:
- rust: stable
rustflags: ''
- rust: nightly
rustflags: '-C target-feature=+atomics,+bulk-memory'
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@master
with:
targets: wasm32-unknown-unknown,wasm32-wasi
toolchain: ${{ matrix.rust }}
targets: wasm32-unknown-unknown
- 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

# wasm32-wasi can test the fallback by running in wasmtime.
wasi:
name: WebAssembly (WASI)
runs-on: ubuntu-latest
strategy:
matrix:
target: [wasm32-wasi, wasm32-wasi-preview1-threads]
steps:
- uses: actions/checkout@v3
- run: curl https://wasmtime.dev/install.sh -sSf | bash
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Set default target and runner
run: |
echo <<EOF
[build]
target = "${{ matrix.target }}"
[target.${{ matrix.target }}]
runner = "/home/runner/.wasmtime/bin/wasmtime"
EOF >> ~/.cargo/config.toml
- run: cargo test --verbose --package rayon
- run: cargo test --verbose --package rayon-core

fmt:
name: Format
Expand Down

0 comments on commit 504eb55

Please sign in to comment.