@@ -2,88 +2,38 @@ name: Benchmark
22
33on :
44 pull_request :
5- branches : [ "main" ]
5+ branches : ["main"]
66
7- permissions :
8- pull-requests : write
97jobs :
10- prep :
11- runs-on : ubuntu-latest
12- outputs :
13- tag : ${{ steps.last_tag.outputs.tag }}
14- short_sha : ${{ steps.short.outputs.sha }}
15- steps :
16- - uses : actions/checkout@v6
17- with :
18- fetch-tags : true
19- fetch-depth : 0
20- - id : last_tag
21- run : echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
22- - id : short
23- run : echo "sha=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
24-
258 benchmark :
26- needs : prep
279 runs-on : ubuntu-latest
28- strategy :
29- fail-fast : false
30- matrix :
31- target :
32- - name : ${{ needs.prep.outputs.short_sha }}
33- ref : ${{ github.sha }}
34- - name : main
35- ref : main
36- # Tag comparison disabled until next release (missing benchmark dependencies)
37- # - name: ${{ needs.prep.outputs.tag }}
38- # ref: ${{ needs.prep.outputs.tag }}
3910 steps :
4011 - uses : actions/checkout@v6
4112 with :
42- ref : ${{ matrix.target.ref }}
4313 submodules : true
4414 - uses : astral-sh/setup-uv@v8.1.0
45- - run : uv sync --extra "cloud"
15+ - run : uv sync --frozen --all-extras
4616 - name : Run benchmarks
17+ id : run-benchmarks
4718 run : |
48- FILENAME="benchmark-${{ matrix.target.name }}-PR-${{ github.event.pull_request.number }}.json"
49- uv run .github/scripts/run_benchmarks.py --output "$FILENAME"
50- echo "REPORT_PATH=$FILENAME" >> $GITHUB_ENV
19+ uv run python scripts/benchmark.py --branch ${{ github.sha }}
5120 - uses : actions/upload-artifact@v7
5221 with :
53- name : benchmark-${{ matrix.target.name }}-PR-${{
54- github.event.pull_request.number }}
55- path : ${{ env.REPORT_PATH }}
56- retention-days : 1
57- overwrite : true
58-
59- report :
60- needs : [ prep, benchmark ]
61- runs-on : ubuntu-latest
62- steps :
63- - uses : actions/checkout@v6
64- - uses : astral-sh/setup-uv@v8.1.0
65- - uses : actions/download-artifact@v8
66- with :
67- pattern : benchmark-*
68- merge-multiple : true
69- path : benchmark-results
70- - name : Generate report
71- run : |
72- uv run .github/scripts/compare_benchmarks.py \
73- --output "benchmarks.md" \
74- --pattern "benchmark-results/benchmark-*-PR-${{ github.event.pull_request.number }}.json"
75- - name : Find Comment
76- uses : peter-evans/find-comment@v3
77- id : fc
78- with :
79- issue-number : ${{ github.event.pull_request.number }}
80- comment-author : " github-actions[bot]"
81- body-includes : " Benchmark Results"
22+ name : benchmark-${{ matrix.target.name }}
23+ path : ${{ steps.run-benchmarks.outputs.report_file }}
8224
83- - name : Create / update comment
84- uses : peter-evans/create-or-update-comment@v5
85- with :
86- comment-id : ${{ steps.fc.outputs.comment-id }}
87- issue-number : ${{ github.event.pull_request.number }}
88- body-path : " benchmarks.md"
89- edit-mode : replace
25+ # report:
26+ # needs: [benchmark]
27+ # runs-on: ubuntu-latest
28+ # steps:
29+ # - uses: actions/checkout@v6
30+ # - uses: astral-sh/setup-uv@v8.1.0
31+ # - run: uv sync --group "benchmark"
32+ # - uses: actions/download-artifact@v8
33+ # with:
34+ # pattern: benchmark-*
35+ # - name: Generate report
36+ # run: |
37+ # uv run .github/scripts/compare_benchmarks.py \
38+ # --output benchmarks.md \
39+ # --pattern benchmark-*.json
0 commit comments