-
Notifications
You must be signed in to change notification settings - Fork 35
76 lines (71 loc) · 2.27 KB
/
Copy pathbenchmarks.yml
File metadata and controls
76 lines (71 loc) · 2.27 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Performance regression gate (Stage 0.9 / issue #436).
# Separate from the Tier-1 essential merge gate — compares wall time to v1.x baselines.
name: Benchmarks
on:
pull_request:
branches: [master]
paths:
- "benchmarks/**"
- "cellpy/**"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/benchmarks.yml"
push:
branches: [master]
paths:
- "benchmarks/**"
- "cellpy/**"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/benchmarks.yml"
workflow_dispatch:
concurrency:
group: benchmarks-${{ github.ref }}
cancel-in-progress: true
jobs:
compare:
if: github.event_name != 'workflow_dispatch'
name: benchmark compare (ubuntu / uv)
runs-on: ubuntu-latest
env:
UV_NO_SOURCES: 1
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y mdbtools
- run: uv python install 3.13
- name: Sync dependencies
run: uv sync
- name: Run benchmarks and compare against v1.x baseline (warn +20%%, fail +100%%)
run: |
uv run pytest benchmarks/ --benchmark-only --benchmark-json=/tmp/bench.json
uv run python benchmarks/check_baseline.py /tmp/bench.json benchmarks/baselines/v1x_ubuntu_py313.json
capture-baseline:
if: github.event_name == 'workflow_dispatch'
name: capture baseline (ubuntu / uv)
runs-on: ubuntu-latest
env:
UV_NO_SOURCES: 1
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y mdbtools
- run: uv python install 3.13
- name: Sync dependencies
run: uv sync
- name: Capture v1.x baseline JSON on ubuntu-latest
run: |
uv run pytest benchmarks/ --benchmark-only \
--benchmark-json=benchmarks/baselines/v1x_ubuntu_py313.json
- name: Upload baseline artifact
uses: actions/upload-artifact@v4
with:
name: v1x-baseline
path: benchmarks/baselines/v1x_ubuntu_py313.json
if-no-files-found: error