1- # Runs all benchmarks once when we add the `action/benchmark` tag to a pull request.
1+ # Runs all benchmarks once for a pull request.
2+ # Called from bench-dispatch.yml when the `action/benchmark` label is added.
23
34name : PR Benchmarks
45
@@ -9,32 +10,16 @@ concurrency:
910 cancel-in-progress : false
1011
1112on :
12- pull_request :
13- types : [labeled, synchronize]
14- branches : ["develop"]
13+ workflow_call : { }
1514 workflow_dispatch : { }
1615
1716permissions :
18- actions : write # for removing labels
1917 contents : read
2018 pull-requests : write # for commenting on PRs
2119 id-token : write # enables AWS-GitHub OIDC
2220
2321jobs :
24- label_trigger :
25- runs-on : ubuntu-latest
26- timeout-minutes : 120
27- if : ${{ contains(github.event.head_commit.message, '[benchmark]') || github.event.label.name == 'action/benchmark' && github.event_name == 'pull_request' }}
28- steps :
29- # We remove the benchmark label first so that the workflow can be re-triggered.
30- - uses : actions-ecosystem/action-remove-labels@v1
31- if : ${{ github.event.pull_request.head.repo.full_name == 'vortex-data/vortex' }}
32- with :
33- labels : action/benchmark
34- fail_on_error : true
35-
3622 bench :
37- needs : label_trigger
3823 timeout-minutes : 120
3924 runs-on : >-
4025 ${{ github.repository == 'vortex-data/vortex'
4833 build_args : " --features lance"
4934 - id : compress-bench
5035 name : Compression
51- if : ${{ contains(github.event.head_commit.message, '[benchmark]') || github.event.label.name == 'action/benchmark' && github.event_name == 'pull_request' }}
5236 steps :
5337 - uses : runs-on/action@v2
5438 if : github.event.pull_request.head.repo.fork == false
@@ -137,17 +121,16 @@ jobs:
137121 comment-tag : bench-pr-comment-${{ matrix.benchmark.id }}
138122
139123 - name : Comment PR on failure
140- if : failure() && inputs.mode == 'pr' && github.event.pull_request.head.repo.fork == false
124+ if : failure() && github.event.pull_request.head.repo.fork == false
141125 uses : thollander/actions-comment-pull-request@v3
142126 with :
143127 message : |
144- # 🚨🚨🚨❌❌❌ BENCHMARK FAILED ❌❌❌🚨🚨🚨
128+ # BENCHMARK FAILED
145129
146130 Benchmark `${{ matrix.benchmark.name }}` failed! Check the [workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details.
147131 comment-tag : bench-pr-comment-${{ matrix.benchmark.id }}
148132
149133 sql :
150- needs : label_trigger
151134 uses : ./.github/workflows/sql-benchmarks.yml
152135 secrets : inherit
153136 with :
0 commit comments