Fancy benchmarks #473
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: [push, pull_request] | |
jobs: | |
check-fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: rustfmt | |
- name: Check formatting | |
run: cargo fmt --all -- --check | |
- name: Check formatting (fuzzer) | |
run: cargo fmt --manifest-path fuzz/Cargo.toml --all -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: clippy | |
- name: Run clippy | |
run: cargo clippy --all-targets --all-features -- -D warnings | |
- name: Run clippy (fuzzer) | |
run: cargo clippy --manifest-path fuzz/Cargo.toml --all-targets --all-features -- -D warnings | |
msrv: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
- name: Install cargo-msrv | |
uses: baptiste0928/cargo-install@v3 | |
with: | |
crate: cargo-msrv | |
locked: false | |
- name: Verify MSRV | |
run: cargo msrv verify --ignore-lockfile | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: clippy | |
- run: cargo install cargo-tarpaulin | |
- run: cargo tarpaulin --out xml | |
- name: Upload coverage report to codecov.io | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fuzz: | |
name: fuzz | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
# use a known good version (e.g. on Jan 14 2025, a faulty `rustc` nightly panicked) | |
toolchain: nightly-2024-01-13 | |
components: rust-src | |
- name: Install cargo-fuzz | |
uses: baptiste0928/cargo-install@v3 | |
with: | |
crate: cargo-fuzz | |
locked: false | |
- name: Fuzz for a limited time | |
run: | | |
RUST_BACKTRACE=1 cargo fuzz run fuzz -- -max_total_time=60 | |
build-and-test-no-simd: | |
name: CI with ${{ matrix.rust }} on ${{ matrix.os }} [no SIMD] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
rust: [stable, nightly] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: cargo build | |
run: cargo build | |
- name: cargo test | |
run: cargo test | |
build-and-test-simd: | |
name: CI with nightly on ${{ matrix.os }} [SIMD] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# Had to remove macos-latest, not sure why that is failing. | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
- name: cargo build | |
run: cargo build --features simd | |
- name: cargo test | |
run: cargo test --features simd |