-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1000 Bytes
/
bench.yaml
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
33
34
name: Run Benchmarks
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
deployments: write
contents: write
pull-requests: write
jobs:
benchmark:
name: Benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1ff72ee08e3cb84d84adba594e0a297990fc1ed3 # stable
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
- run: cargo install cargo-criterion
- run: cargo criterion --output-format bencher 2>&1 | tee output.txt
- uses: benchmark-action/github-action-benchmark@d48d326b4ca9ba73ca0cd0d59f108f9e02a381c7 # v1.20.4
with:
name: Rust Benchmark
tool: "cargo"
output-file-path: output.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
save-data-file: ${{ github.ref_name == 'main' }}
alert-threshold: "120%"
comment-always: true
fail-on-alert: true