@@ -10,63 +10,29 @@ jobs:
1010 track_benchmarks :
1111 name : Track Benchmarks with Bencher
1212 permissions :
13- pull-requests : write
13+ checks : write
1414 runs-on : ubuntu-22.04
1515 env :
1616 BENCHMARK_RESULTS : benchmark_results.txt
17- PR_EVENT : event.json
1817 steps :
1918 - name : Download Benchmark Results
20- id : download_results
21- uses : dawidd6/action-download-artifact@v6
22- continue-on-error : true
19+ uses : actions/download-artifact@v4
2320 with :
2421 name : ${{ env.BENCHMARK_RESULTS }}
25- run_id : ${{ github.event.workflow_run.id }}
26- - name : Download PR Event
27- id : download_event
28- uses : dawidd6/action-download-artifact@v6
29- continue-on-error : true
30- with :
31- name : ${{ env.PR_EVENT }}
32- run_id : ${{ github.event.workflow_run.id }}
33- - name : Check if Fork PR Benchmarks
34- id : check_fork
35- run : |
36- if [[ "${{ steps.download_results.outcome }}" == "success" && "${{ steps.download_event.outcome }}" == "success" ]]; then
37- echo "is_fork_pr=true" >> "$GITHUB_OUTPUT"
38- else
39- echo "is_fork_pr=false" >> "$GITHUB_OUTPUT"
40- fi
41- - name : Export PR Event Data
42- if : steps.check_fork.outputs.is_fork_pr == 'true'
43- uses : actions/github-script@v6
44- with :
45- script : |
46- let fs = require('fs');
47- let prEvent = JSON.parse(fs.readFileSync(process.env.PR_EVENT, {encoding: 'utf8'}));
48- core.exportVariable("PR_HEAD", prEvent.pull_request.head.ref);
49- core.exportVariable("PR_HEAD_SHA", prEvent.pull_request.head.sha);
50- core.exportVariable("PR_BASE", prEvent.pull_request.base.ref);
51- core.exportVariable("PR_BASE_SHA", prEvent.pull_request.base.sha);
52- core.exportVariable("PR_NUMBER", prEvent.number);
5322 - uses : bencherdev/bencher@main
54- if : steps.check_fork.outputs.is_fork_pr == 'true'
55- - name : Track Benchmarks with Bencher
56- if : steps.check_fork.outputs.is_fork_pr == 'true'
23+ - name : Track benchmarks with Bencher
5724 run : |
5825 bencher run \
5926 --project bencher \
6027 --token '${{ secrets.BENCHER_API_TOKEN }}' \
61- --branch "$PR_HEAD" \
62- --hash "$PR_HEAD_SHA" \
63- --start-point "$PR_BASE" \
64- --start-point-hash "$PR_BASE_SHA" \
65- --start-point-clone-thresholds \
66- --start-point-reset \
28+ --branch ${{ github.ref_name }} \
6729 --testbed ubuntu-22.04 \
68- --adapter rust_criterion \
30+ --threshold-measure latency \
31+ --threshold-test t_test \
32+ --threshold-max-sample-size 64 \
33+ --threshold-upper-boundary 0.9999 \
34+ --thresholds-reset \
6935 --err \
36+ --adapter rust_criterion \
7037 --github-actions '${{ secrets.GITHUB_TOKEN }}' \
71- --ci-number "$PR_NUMBER" \
7238 --file ./benchmark_results.txt
0 commit comments