Update README.md #90
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
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
name: Build | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: clippy, rustfmt, rust-src | |
- name: Cache Rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Check formatting | |
run: cargo fmt --all --check | |
- name: Clippy on default | |
run: cargo clippy -- -D warnings | |
- name: Build default | |
run: cargo build --release --verbose | |
- name: Run default examples | |
run: | | |
cargo run --release --example random | |
cargo run --release --example stress | |
cargo run --release --example random2 | |
- name: Clippy on C dynamic library | |
run: cargo clippy --features c-override -- -D warnings | |
- name: Build C dynamic library | |
run: | | |
cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release \ | |
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -S. -Btarget | |
cmake --build target --config Release --target all | |
valgrind: | |
name: Valgrind | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@nightly | |
- name: Cache Rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
with: | |
cache-all-crates: true | |
- name: Install Valgrind | |
run: | | |
sudo apt-get install -y valgrind | |
cargo install cargo-valgrind | |
- name: Run Valgrind on default | |
run: | | |
cargo valgrind run --example random2 --release --features track-valgrind | |
miri: | |
name: Miri | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: miri | |
- name: Cache Rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Run Miri on default | |
run: | | |
cargo miri test --tests | |
cargo miri run --example stress | |
cargo miri run --example random2 | |
env: | |
MIRIFLAGS: -Zmiri-disable-stacked-borrows |