2024-04-09 19:48:32 +00:00
|
|
|
name: Continuous Benchmarking with Bencher
|
2021-12-31 17:58:39 +00:00
|
|
|
on:
|
2024-04-09 19:48:32 +00:00
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- 'src/**'
|
|
|
|
- 'benches/**'
|
|
|
|
- 'ogg_pager/**'
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
workflow_dispatch:
|
2021-12-31 17:58:39 +00:00
|
|
|
jobs:
|
2024-04-09 19:48:32 +00:00
|
|
|
benchmark_with_bencher:
|
|
|
|
name: Benchmark with Bencher
|
|
|
|
runs-on: ubuntu-latest
|
2022-10-15 14:45:51 +00:00
|
|
|
env:
|
2024-04-09 19:48:32 +00:00
|
|
|
BENCHER_PROJECT: lofty
|
|
|
|
BENCHER_BRANCH: main
|
|
|
|
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2021-12-31 17:58:39 +00:00
|
|
|
|
2024-04-09 19:48:32 +00:00
|
|
|
- name: Install callgrind
|
2024-04-20 22:24:37 +00:00
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y valgrind
|
2024-04-09 19:48:32 +00:00
|
|
|
- name: Install iai-callgrind-runner
|
|
|
|
run: |
|
|
|
|
version=$(cargo metadata --format-version=1 |\
|
|
|
|
jq '.packages[] | select(.name == "iai-callgrind").version' |\
|
|
|
|
tr -d '"'
|
|
|
|
)
|
|
|
|
cargo install iai-callgrind-runner --version $version
|
|
|
|
- uses: bencherdev/bencher@main
|
|
|
|
- name: Run Bencher
|
|
|
|
run: |
|
|
|
|
bencher run --adapter rust_iai_callgrind --err "cargo bench"
|