Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion .github/workflows/benchmark-policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,41 @@ permissions:
jobs:
policy:
name: Benchmark Policy
concurrency:
group: benchmark-policy-${{ github.event.pull_request.number }}
cancel-in-progress: >-
${{
!contains(fromJSON('["labeled", "unlabeled", "edited"]'), github.event.action) ||
contains(fromJSON('["labeled", "unlabeled"]'), github.event.action) && github.event.label.name == 'benchmarks: skip' ||
github.event.action == 'edited' && github.event.changes.base != null
}}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- id: event
name: Classify PR event
env:
RELEVANT: >-
${{
!contains(fromJSON('["labeled", "unlabeled", "edited"]'), github.event.action) ||
contains(fromJSON('["labeled", "unlabeled"]'), github.event.action) && github.event.label.name == 'benchmarks: skip' ||
github.event.action == 'edited' && github.event.changes.base != null
}}
run: echo "relevant=$RELEVANT" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v7
if: ${{ steps.event.outputs.relevant == 'true' }}
with:
persist-credentials: false
- uses: actions/setup-node@v7
if: ${{ steps.event.outputs.relevant == 'true' }}
with:
node-version: '24'
- run: npm ci --ignore-scripts
if: ${{ steps.event.outputs.relevant == 'true' }}
- run: node scripts/pr-policy.ts
if: ${{ steps.event.outputs.relevant == 'true' }}
env:
GH_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ github.token }}
- name: Preserve the current policy result
if: ${{ steps.event.outputs.relevant == 'false' }}
run: echo "Policy inputs are unchanged"
33 changes: 31 additions & 2 deletions .github/workflows/benchmark-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,27 @@ permissions:
issues: read

jobs:
event:
name: Classify Benchmark Event
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
relevant: ${{ steps.event.outputs.relevant }}
steps:
- id: event
env:
RELEVANT: >-
${{
github.event_name == 'push' ||
!contains(fromJSON('["labeled", "unlabeled", "edited"]'), github.event.action) ||
contains(fromJSON('["labeled", "unlabeled"]'), github.event.action) && github.event.label.name == 'benchmarks: skip' ||
github.event.action == 'edited' && github.event.changes.base != null
}}
run: echo "relevant=$RELEVANT" >> "$GITHUB_OUTPUT"

workload:
needs: event
if: ${{ needs.event.outputs.relevant == 'true' }}
concurrency:
group: benchmark-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -22,17 +42,26 @@ jobs:
benchmark-status:
name: Benchmark Status
if: ${{ always() && github.event_name == 'pull_request' }}
needs: workload
needs: [event, workload]
concurrency:
group: benchmark-${{ github.event.pull_request.number }}
cancel-in-progress: false
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v7
if: ${{ needs.event.outputs.relevant == 'true' }}
with:
persist-credentials: false
- uses: actions/setup-node@v7
if: ${{ needs.event.outputs.relevant == 'true' }}
with:
node-version: '24'
- name: Require the benchmark workload to succeed
if: ${{ needs.event.outputs.relevant == 'true' }}
env:
BENCHMARK_JOB_RESULTS: ${{ toJSON(needs) }}
run: node scripts/check-ci-status.ts
run: node scripts/check-ci-status.ts
- name: Preserve the current benchmark result
if: ${{ needs.event.outputs.relevant == 'false' }}
run: echo "Benchmark inputs are unchanged"
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ The preview URL then returns 404.
## CI Rules

* `benchmarks: skip` replaces publishable measurements with one-request smoke coverage on KVM and MSHV. Smoke results are not published. Dependabot applies the label automatically.
* Required checks evaluate the current PR policy on every subscribed event. Label and description edits restart the benchmark workflow. Measurements run unless `benchmarks: skip` is present.
* Required checks reevaluate when code, the base branch, or the `benchmarks: skip` label changes. Other labels and title or body edits refresh the required contexts after active checks finish.
* Each of the 36 measurement jobs runs all three strategies sequentially with a fresh server process for each. Retrying a job repeats its three strategies.
* Preview builds run independently of benchmarks. Draft PRs have no preview.
* Production uses published history. Previews include matching pending results when available.
Expand Down
Loading