-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (30 loc) · 1.11 KB
/
benchmark.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Criterion.rs with Benchmark Action
on:
push:
branches:
- main
permissions:
contents: write
deployments: write
jobs:
benchmark:
name: Run Criterion.rs benchmarks
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Rust Toolchain
id: toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: "nightly"
- uses: bencherdev/bencher@main
- name: Prepare for benchmark
run: cargo run --example benchmark_integers --release
- name: Compile benchmark
run: cargo bench --no-run
- name: Track base branch benchmarks with Bencher
run: bencher run --project iof --token '${{ secrets.BENCHER_API_TOKEN }}' --branch main --testbed '${{ matrix.os }}' --threshold-measure latency --threshold-test t_test --threshold-max-sample-size 64 --threshold-upper-boundary 0.99 --thresholds-reset --err --adapter rust_criterion --github-actions '${{ secrets.GITHUB_TOKEN }}' "cargo bench"