Retry #20
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: push | |
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 has a runtime fallback for unsupported threading. | |
# Proper threading needs more glue and is tested in wasm-bindgen-rayon, | |
# but we can at least verify that all tests can run on Wasm with the fallback. | |
wasm: | |
name: WebAssembly (standalone) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- toolchain: stable | |
- toolchain: nightly | |
components: rust-src | |
cargoflags: -Z build-std=panic_abort,std --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 }} | |
components: ${{ matrix.components }} | |
targets: wasm32-unknown-unknown | |
- uses: jetli/[email protected] | |
- run: wasm-pack test --chrome --headless -- --verbose ${{ 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 |