chore: Add benchmark test #13
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: | |
branches: [ main ] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy, rustfmt | |
- name: Install nextest | |
shell: bash | |
run: | | |
curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin | |
# - run: cargo fmt --all --check | |
- run: cargo check --workspace | |
- run: cargo clippy --all-targets --all-features -- -D warnings -Aclippy::multiple_crate_versions | |
- run: cargo test --doc -- --show-output | |
- run: cargo nextest run | |
benchmarks: | |
name: Run benchmarks | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Install nightly toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
- name: Run benchmarks | |
run: cargo +nightly bench --locked --all-features | |
env: | |
RUSTFLAGS: --cfg=bench |