Skip to content

Commit 1668010

Browse files
Updates L0 to store benchmark results in a post-merge pipeline
By performing the upload of benchmark results in a post-merge pipeline, we can enable contributions from forks, which don't otherwise have permission to push new benchmark results.
1 parent c8a45ca commit 1668010

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

.github/workflows/tripy-l0.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,21 @@ jobs:
7979
run: |
8080
pytest tests/performance -v -m "not l1" --benchmark-warmup=on --benchmark-json benchmark.json
8181
82-
- name: Store benchmark result
82+
- name: Check benchmark result
8383
uses: benchmark-action/github-action-benchmark@v1
8484
with:
8585
tool: 'pytest'
8686
output-file-path: ${{ github.workspace }}/tripy/benchmark.json
8787
github-token: ${{ secrets.GITHUB_TOKEN }}
88-
auto-push: true
88+
auto-push: false
8989
# Show alert with commit comment on detecting possible performance regression
9090
alert-threshold: '105%'
9191
comment-on-alert: true
9292
fail-on-alert: true
9393
gh-pages-branch: benchmarks
94+
95+
- name: Upload benchmark result
96+
uses: actions/upload-artifact@v4
97+
with:
98+
name: benchmark-results
99+
path: ${{ github.workspace }}/tripy/benchmark.json
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Post-merge benchmark update
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
upload-benchmarks:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Retrieve benchmark results
15+
uses: actions/download-artifact@v4
16+
with:
17+
name: benchmark-results
18+
path: ${{ github.workspace }}/benchmark.json
19+
20+
- name: Store benchmark result
21+
uses: benchmark-action/github-action-benchmark@v1
22+
with:
23+
tool: 'pytest'
24+
output-file-path: ${{ github.workspace }}/benchmark.json
25+
github-token: ${{ secrets.GITHUB_TOKEN }}
26+
auto-push: false
27+
gh-pages-branch: benchmarks

0 commit comments

Comments
 (0)