File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,12 @@ name: Benchmark
22
33on :
44 workflow_dispatch :
5+ inputs :
6+ publish :
7+ description : " Publish results to the benchmarks repository"
8+ required : false
9+ default : false
10+ type : boolean
511 schedule :
612 - cron : ' 0 10 * * *' # Run at 10:00 UTC every day
713
1925 fetch-depth : 1
2026
2127 - name : Exit early if no new commits
28+ if : github.event_name == 'schedule'
2229 id : check-commits
2330 run : |
2431 count=$(git log --oneline --since '24 hours ago' | wc -l)
@@ -106,7 +113,13 @@ jobs:
106113 uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
107114 with :
108115 name : benchmark-${{ matrix.benchmark_name }}
116+ - name : Validate benchmark result
117+ run : |
118+ output="${{ matrix.benchmark_name }}.txt"
119+ test -s "$output"
120+ grep -Eq '^test .+ \.\.\. bench:' "$output"
109121 - name : Publish benchmark result
122+ if : github.event_name == 'schedule' || inputs.publish
110123 uses : benchmark-action/github-action-benchmark@4bdcce38c94cec68da58d012ac24b7b1155efe8b # v1.20.7
111124 with :
112125 name : ${{ matrix.benchmark_name }}
You can’t perform that action at this time.
0 commit comments