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
35
36
37
38
name: Benchmarks
on:
push:
branches:
pull_request:
types:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
bench:
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'perf')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-bench-${{ hashFiles('**/Cargo.lock') }}
- name: Run benchmarks
run: cargo bench --bench hash_benchmark --bench read_benchmark -- --save-baseline current
- name: Upload baseline
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: bench-baseline
path: target/criterion
retention-days: 30