Skip to content

Use cellpycore StepType vocabulary for step-type literals (#543) #101

Use cellpycore StepType vocabulary for step-type literals (#543)

Use cellpycore StepType vocabulary for step-type literals (#543) #101

Workflow file for this run

# 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