|
| 1 | +# Copyright Kani Contributors |
| 2 | +# SPDX-License-Identifier: Apache-2.0 OR MIT |
| 3 | +# |
| 4 | +# Run the performance benchmark workflows for pull requests that carry the |
| 5 | +# corresponding Z-*BenchCI label (applied automatically by the labeler in |
| 6 | +# extra_jobs.yml based on the changed files, or manually). |
| 7 | +# |
| 8 | +# This runs on `pull_request` (not `pull_request_target`) on purpose: the |
| 9 | +# benchmark workflows build and execute the code proposed in the pull |
| 10 | +# request, which must not happen in the trusted `pull_request_target` |
| 11 | +# context (actions/checkout v6.1.0/v5.1.0/v4.4.0 refuse to do so; see |
| 12 | +# https://github.blog/changelog/2026-06-18-safer-pull_request_target-defaults-for-github-actions-checkout/). |
| 13 | +# |
| 14 | +# Note on the `labeled` trigger: labels added by the auto-labeler do not |
| 15 | +# re-trigger this workflow (events created with the default GITHUB_TOKEN |
| 16 | +# never trigger new workflow runs), so on freshly opened pull requests the |
| 17 | +# benchmarks only start with the next push to the pull request. Manually |
| 18 | +# adding the label triggers them immediately. |
| 19 | + |
| 20 | +name: Kani Benchmarks |
| 21 | +permissions: |
| 22 | + contents: read |
| 23 | +on: |
| 24 | + pull_request: |
| 25 | + types: [opened, synchronize, reopened, labeled] |
| 26 | + |
| 27 | +concurrency: |
| 28 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} |
| 29 | + cancel-in-progress: true |
| 30 | + |
| 31 | +jobs: |
| 32 | + end-to-end-bench: |
| 33 | + name: End-to-End Benchmarks |
| 34 | + if: ${{ contains(github.event.pull_request.labels.*.name, 'Z-EndToEndBenchCI') }} |
| 35 | + uses: ./.github/workflows/bench-e2e.yml |
| 36 | + |
| 37 | + compiler-bench: |
| 38 | + name: Compiler Benchmarks |
| 39 | + if: ${{ contains(github.event.pull_request.labels.*.name, 'Z-CompilerBenchCI') }} |
| 40 | + uses: ./.github/workflows/bench-compiler.yml |
0 commit comments