recycle empty arenas in arena2 and mempool3 allocator (#44) #99
This file contains hidden or 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: Rust - Continuous integration | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set environment | |
| # Setting `RUSTFLAGS` overrides any flags set on .cargo/config.toml, so we need to | |
| # set the target flags instead which are cumulative. | |
| # Track https://github.com/rust-lang/cargo/issues/5376 | |
| run: | | |
| target=$(rustc -vV | awk '/^host/ { print $2 }' | tr [:lower:] [:upper:] | tr '-' '_') | |
| echo "CARGO_TARGET_${target}_RUSTFLAGS=$FLAGS" >> $GITHUB_ENV | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: lint | |
| - name: Install cargo-workspaces | |
| run: cargo install cargo-workspaces | |
| - name: Check rustfmt | |
| run: cargo fmt --all -- --check | |
| - name: Check clippy | |
| run: cargo ws exec cargo clippy --all-features --all-targets | |
| - name: Check clippy (No features) | |
| run: cargo ws exec cargo clippy --no-default-features --all-targets | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: test | |
| - name: Run tests (all features) | |
| run: cargo test --all-features | |
| - name: Run tests (no default features) | |
| run: cargo test --no-default-features | |
| miri: | |
| name: Miri | |
| runs-on: ubuntu-latest | |
| env: | |
| # Catch pointer bugs and invalid memory access. | |
| # Ignore errors from system calls that Miri doesn't support yet. | |
| MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-isolation-error=warn | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: miri, rust-src | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: miri | |
| - name: Set up Miri | |
| run: cargo +nightly miri setup | |
| - name: Run tests under Miri | |
| run: cargo +nightly miri test -p oscars --all-features | |
| docs: | |
| name: Documentation | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTDOCFLAGS: -D warnings | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: docs | |
| - name: Generate documentation | |
| run: cargo doc -v --document-private-items --all-features |