-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.39 KB
/
benchmarks.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
42
43
44
45
46
name: Benchmark
on:
push:
branches: main
env:
MOLD_VERSION: 2.4.0
jobs:
benchmark_with_bencher:
name: Continuous Benchmarking with Bencher
runs-on: ubuntu-latest
timeout-minutes: ${{ (github.ref == 'refs/heads/express' && 1) || 60 }}
# This will fail whenever Bencher Cloud is down
# or there are any breaking changes to the report format
continue-on-error: true
env:
BENCHER_PROJECT: rust-template
BENCHER_TESTBED: ubuntu-latest
BENCHER_ADAPTER: rust
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo
- uses: rui314/setup-mold@v1
with:
mold-version: ${{ env.MOLD_VERSION }}
- name: Install `bencher` CLI
run: cargo install --debug --path services/cli --locked --force
- name: Dogfooding Benchmarks with Bencher
run: |
bencher run \
--if-branch "$GITHUB_REF_NAME" \
--else-if-branch "$GITHUB_BASE_REF" \
--err \
--github-actions ${{ secrets.GITHUB_TOKEN }} \
"cargo bench"