-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (37 loc) · 1.06 KB
/
Copy pathbench.yml
File metadata and controls
47 lines (37 loc) · 1.06 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
name: Benchmarks
on:
push:
branches: [main]
paths:
- "**.rs"
- "**.py"
- "**.toml"
- "uv.lock"
- "benchmarks/**"
concurrency:
group: bench-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
bench:
name: Benchmarks (smoke test)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: Criterion benchmarks (short run)
run: cargo bench --no-default-features --bench bench_core -- --warm-up-time 1 --measurement-time 2 --sample-size 10
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install maturin
run: pip install maturin[patchelf]
- name: Python quick benchmarks
run: |
maturin build --out dist
pip install dist/*.whl
python benchmarks/bench_quick.py