-
Notifications
You must be signed in to change notification settings - Fork 31
67 lines (60 loc) · 2.26 KB
/
benchmarks.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
on:
# For some reason, this fails due to some permissions.
# pull_request:
push:
branches:
- master
# Run once a week to preserve the cache
# (even though it still feels the cache gets lost sometimes?)
# FIXME: Doesn't seem to be working. Using the GH pages thing for now.
#schedule:
# - cron: '0 0 * * 0'
name: benchmark pull requests
jobs:
runBenchmark:
name: run benchmark
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal
- name: Restore compile cache
uses: Swatinem/rust-cache@v2
- name: Restore previous benchmark data
uses: actions/cache@v4
with:
path: ./bench-cache
key: ${{ runner.os }}-benchmark
- name: Run benchmarks
# We choose just the tracking ones. There's a whole fleet that we check
# that compile, but they are too heavy both to run in CI and to show in
# the PRs. And they mostly compare us to other methods.
#
# Provide the bencher output, as the following tool knows how to read that.
run: cargo bench --bench track -- --output-format bencher | grep -v 'Gnuplot not found' | tee benches.out
- name: Compare benchmarks
uses: rhysd/github-action-benchmark@d48d326b4ca9ba73ca0cd0d59f108f9e02a381c7
with:
name: Track benchmarks
tool: cargo
output-file-path: benches.out
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
alert-threshold: '150%'
comment-on-alert: true
comment-always: true
# We don't want that to fail. Both our benchmarks and the CI are a
# bit noisy and we have quite a few measurements, so the chance of
# one failing at random is quite high. It's still nice to have it
# measured and available as a comment.
fail-on-alert: false
#external-data-json-path: ./bench-cache/benchmark-data.json
# Because it doesn't put it into the PR, it puts it into the commit :-|
alert-comment-cc-users: '@vorner'