-
Notifications
You must be signed in to change notification settings - Fork 5
65 lines (63 loc) · 1.76 KB
/
benchmark.yml
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
name: Benchmark
env:
PYTHONHASHSEED: "0"
on:
push:
branches:
- main
pull_request:
branches:
- main
- epic/*
workflow_dispatch:
inputs:
specific-pip-packages:
description: Run benchmarks with specific pip packages
required: false
type: string
jobs:
benchmark:
name: Performance regression
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: astral-sh/setup-uv@v5
- name: Run pytest-benchmark
run: |
uv run \
--group test \
--no-dev \
pytest \
-k benchmark \
--benchmark-json output.json \
--durations=0
working-directory: benchmarks
- name: Store result
if: github.event_name == 'push'
uses: benchmark-action/github-action-benchmark@v1
with:
name: TensorWaves benchmark results
tool: pytest
output-file-path: benchmarks/output.json
github-token: ${{ secrets.GITHUB_TOKEN }}
gh-pages-branch: benchmark-results
benchmark-data-dir-path: ""
auto-push: true
- name: Warn on performance decrease
if: github.event_name == 'pull_request'
uses: benchmark-action/github-action-benchmark@v1
with:
name: TensorWaves benchmark results
tool: pytest
output-file-path: benchmarks/output.json
github-token: ${{ secrets.GITHUB_TOKEN }}
gh-pages-branch: benchmark-results
benchmark-data-dir-path: ""
auto-push: false
comment-on-alert: true
fail-on-alert: true