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
name: Benchmark
on:
push:
branches:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
benchmark:
name: Run Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install Chrome
run: |
sudo apt-get update
sudo apt-get install -y google-chrome-stable
- name: Download previous benchmark
uses: actions/download-artifact@v4
with:
name: bench-results
path: baseline/
continue-on-error: true
- name: Run detection benchmark
run: |
cd bench
cargo run -- --suite detection --instances 1 --output bench-results
- name: Compare to baseline
if: hashFiles('baseline/bench-results-report.json') != ''
run: |
cd bench
cargo run -- --suite regression --baseline ../baseline/bench-results-report.json --output regression-results
- name: Upload benchmark results
uses: actions/upload-artifact@v4
with:
name: bench-results
path: bench/bench-results-report.json