-
Notifications
You must be signed in to change notification settings - Fork 27
41 lines (36 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
33
34
35
36
37
38
39
40
41
name: Benchmark
on:
push:
branches: master
jobs:
benchmark_with_bencher:
name: Benchmark with Bencher
runs-on: ubuntu-22.04
env:
BENCHER_PROJECT: h264-reader
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Install toolchain
uses: dtolnay/[email protected]
- uses: bencherdev/bencher@main
- uses: cargo-bins/cargo-binstall@main
- run: sudo apt update && sudo apt install valgrind
- name: Install iai-callgrind-runner
run: |
version=$(cargo metadata --format-version=1 |\
jq '.packages[] | select(.name == "iai-callgrind").version' |\
tr -d '"'
)
cargo binstall --no-confirm iai-callgrind-runner --version $version
- run: |
IAI_CALLGRIND_COLOR=never cargo bench --bench ci_bench > perf.txt
- run: |
bencher run \
--branch "$GITHUB_REF_NAME" \
--err \
--adapter rust_iai_callgrind \
--hash "$GITHUB_SHA" \
--file "perf.txt"