Unify benchmark dispatch into a workflow #16240
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Runs once when we add the `benchmark-sql` tag to a pull request. | |
| name: PR SQL Benchmarks | |
| concurrency: | |
| # Use a unique group for non-benchmark label events so they don't interfere with in-progress benchmark runs. | |
| group: >- | |
| ${{ github.workflow }}-${{ | |
| github.event.label.name == 'action/benchmark-sql' | |
| && github.head_ref | |
| || github.run_id | |
| }} | |
| cancel-in-progress: true | |
| on: | |
| pull_request: | |
| types: [labeled, synchronize] | |
| branches: ["develop"] | |
| workflow_dispatch: { } | |
| permissions: | |
| actions: write # for removing labels | |
| contents: read | |
| pull-requests: write # for commenting on PRs | |
| id-token: write # enables AWS-GitHub OIDC | |
| jobs: | |
| label_trigger: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 2 | |
| if: ${{ contains(github.event.head_commit.message, '[benchmark-sql]') || github.event.label.name == 'action/benchmark-sql' && github.event_name == 'pull_request' }} | |
| steps: | |
| # We remove the benchmark label first so that the workflow can be re-triggered. | |
| - uses: actions-ecosystem/action-remove-labels@v1 | |
| if: ${{ github.event.pull_request.head.repo.full_name == 'vortex-data/vortex' }} | |
| with: | |
| labels: action/benchmark-sql | |
| fail_on_error: true | |
| sql: | |
| needs: label_trigger | |
| uses: ./.github/workflows/sql-benchmarks.yml | |
| secrets: inherit | |
| with: | |
| mode: "pr" |