CI #150
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: merge_group | |
jobs: | |
check: | |
name: Check (1.63.0) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/[email protected] | |
- run: cp ci/compat-Cargo.lock ./Cargo.lock | |
- run: cargo check --verbose --locked | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
rust: [stable, beta, nightly] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- run: cargo build --verbose | |
- run: cargo test --verbose --package rayon | |
- run: cargo test --verbose --package rayon-core | |
- run: ./ci/highlander.sh | |
# rayon-demo has huge dependencies, so limit its testing. | |
# build on stable, test on nightly (because of #[bench]) | |
demo: | |
name: Demo | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [stable, nightly] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- run: cargo build --verbose --package rayon-demo | |
- run: cargo test --verbose --package rayon-demo | |
if: matrix.rust == 'nightly' | |
i686: | |
name: Test (ubuntu-latest, stable-i686) | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
sudo apt-get update | |
sudo apt-get install gcc-multilib | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable-i686-unknown-linux-gnu | |
- run: cargo build --verbose | |
- run: cargo test --verbose --package rayon | |
- run: cargo test --verbose --package rayon-core | |
# wasm32-unknown-unknown builds, and even has the runtime fallback for | |
# unsupported threading, but we don't have an environment to execute in. | |
wasm: | |
name: WebAssembly (standalone) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- toolchain: stable | |
- toolchain: nightly | |
cargoflags: --features web_spin_lock | |
rustflags: -C target-feature=+atomics,+bulk-memory,+mutable-globals | |
env: | |
RUSTFLAGS: ${{ matrix.rustflags }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
targets: wasm32-unknown-unknown | |
- run: cargo build --verbose --target wasm32-unknown-unknown ${{ matrix.cargoflags }} | |
# wasm32-wasi can test the fallback by running in wasmtime. | |
wasi: | |
name: WebAssembly (WASI) | |
runs-on: ubuntu-latest | |
env: | |
CARGO_TARGET_WASM32_WASI_RUNNER: /home/runner/.wasmtime/bin/wasmtime | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: wasm32-wasi | |
- run: curl https://wasmtime.dev/install.sh -sSf | bash | |
- run: cargo build --verbose --target wasm32-wasi | |
- 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 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/[email protected] | |
with: | |
components: rustfmt | |
- run: cargo fmt --all --check | |
done: | |
name: Complete | |
runs-on: ubuntu-latest | |
needs: [check, test, demo, i686, wasm, wasi, fmt] | |
steps: | |
- run: exit 0 |