name: benchmark
on:
push:
branches: [main]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
bench:
name: bench
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run benchmarks
run: cargo bench --features watch -- --output-format bencher | tee bench-results.txt
- name: Upload benchmark report
uses: actions/upload-artifact@v4
with:
name: bench-results
path: bench-results.txt
retention-days: 30
- name: Upload criterion reports
uses: actions/upload-artifact@v4
with:
name: criterion-reports
path: target/criterion
retention-days: 30