Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/benchmarks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,25 @@ jobs:
enable-cache: true

- name: Benchmark head
run: >
uv run --with "$BENCHMEM" pytest benchmarks/ $BENCH_ARGS
--benchmark-json "$RUNNER_TEMP/head.json"
run: |
uv run --with "$BENCHMEM" pytest benchmarks/ $BENCH_ARGS \
--benchmark-json "$RUNNER_TEMP/head.json"
uv run --no-sync python -c "import tsam; print('head tsam:', tsam.__version__)"

- name: Benchmark base (${{ github.event.pull_request.base.ref }})
if: github.event_name == 'pull_request'
# Base src with the head's benchmark suite overlaid, so test IDs match
# and suite edits in the PR still compare against the same cases.
# Drop the head run's uv.lock (untracked — the repo commits none):
# uv keeps a satisfying lock as-is, so without this a head that
# changes dependencies leaks its resolution into the base run.
run: |
git checkout --detach ${{ github.event.pull_request.base.sha }}
git checkout ${{ github.sha }} -- benchmarks/
rm -f uv.lock
uv run --with "$BENCHMEM" pytest benchmarks/ $BENCH_ARGS \
--benchmark-json "$RUNNER_TEMP/base.json"
uv run --no-sync python -c "import tsam; print('base tsam:', tsam.__version__)"

- name: Render report and plot
run: |
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,6 @@ exclude_lines = [
[tool.pytest.ini_options]
testpaths = ["test"]
addopts = ["-n", "auto", "--dist", "loadfile"]

[tool.uv.sources]
tsam = { git = "https://github.com/FZJ-IEK3-VSA/tsam", branch = "develop-v4" }
Loading