-
Notifications
You must be signed in to change notification settings - Fork 29
49 lines (40 loc) · 1.05 KB
/
benchmark.yml
File metadata and controls
49 lines (40 loc) · 1.05 KB
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
name: Benchmarks
on:
workflow_dispatch:
push:
branches:
- 'bench/**'
pull_request:
branches:
- 'bench/**'
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
benchmark:
runs-on: ubuntu-latest-8-cores
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ runner.os }}
# Share cache with other Linux workflows
cache-on-failure: true
# Cache benchmark-specific dependencies
cache-targets: true
cache-all-crates: true
- name: Build benchmarks first (populates cache)
run: cargo build --release --bench rule_engines
- name: Run benchmarks
run: cargo bench --bench rule_engines
- name: Upload benchmark results
uses: actions/upload-artifact@v4
with:
name: benchmark-results
path: target/criterion/
retention-days: 30