Stacked borrow fix (require inner UnsafeCell
wrapper for payload fo…
#114
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
# Largely inspired by https://github.com/dtolnay/syn/blob/master/.github/workflows/ci.yml under MIT OR Apache-2.0. | |
name: CI | |
permissions: | |
contents: read | |
on: | |
pull_request: | |
push: | |
# This used to also be scheduled, but apparently GitHub also turns it off otherwise when deactivating that due to repository inactivity. | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/[email protected] | |
- run: cat CI.toml >> Cargo.toml | |
- run: cargo test --workspace --locked --no-default-features | |
- run: cargo test --workspace --locked | |
- run: cargo test --workspace --locked --all-features | |
browser-test: | |
name: Browser Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/[email protected] | |
with: | |
toolchain: stable | |
profile: minimal | |
target: wasm32-unknown-unknown | |
- run: cargo +stable install wasm-bindgen-cli --vers "^0.2.71" | |
- run: cat CI.toml >> Cargo.toml | |
- run: cargo +stable test --workspace --locked --target wasm32-unknown-unknown --no-default-features | |
- run: cargo +stable test --workspace --locked --target wasm32-unknown-unknown | |
- run: cargo +stable test --workspace --locked --target wasm32-unknown-unknown --all-features | |
miri: | |
name: Miri | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/[email protected] | |
with: | |
toolchain: nightly | |
profile: minimal | |
components: miri, rust-src | |
- run: cat CI.toml >> Cargo.toml | |
- run: cargo +nightly miri test --workspace --locked --no-default-features | |
- run: cargo +nightly miri test --workspace --locked | |
- run: cargo +nightly miri test --workspace --locked --all-features | |
check: | |
name: Check on Rust ${{matrix.rust}}${{format(' ({0})', matrix.target || matrix.os)}} | |
runs-on: ${{matrix.os}}-latest | |
strategy: | |
matrix: | |
os: [macos, ubuntu, windows] | |
rust: ['1.54', stable, beta, nightly] | |
env: | |
target: ${{matrix.target && format('--target={0}', matrix.target)}} | |
workspace: ${{matrix.no-workspace || '--workspace'}} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/[email protected] | |
with: | |
toolchain: ${{matrix.rust}} | |
profile: minimal | |
target: ${{matrix.target}} | |
- run: cat CI.toml >> Cargo.toml | |
- run: cargo +${{matrix.rust}} check --locked ${{env.target}} ${{env.workspace}} --no-default-features | |
- run: cargo +${{matrix.rust}} check --locked ${{env.target}} ${{env.workspace}} | |
- run: cargo +${{matrix.rust}} check --locked ${{env.target}} ${{env.workspace}} --all-features | |
minimal-versions: | |
name: Minimal Versions | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/[email protected] | |
with: | |
toolchain: nightly | |
override: true | |
- uses: taiki-e/install-action@cargo-hack | |
- uses: taiki-e/install-action@cargo-minimal-versions | |
- run: cat CI.toml >> Cargo.toml | |
- run: cargo minimal-versions check --workspace |