Skip to content

Commit c871817

Browse files
committed
Merge remote-tracking branch 'upstream/main' into codegen-ordering
2 parents d1fcf6f + 81fd3e4 commit c871817

203 files changed

Lines changed: 7097 additions & 732 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/bench-compiler.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ jobs:
2020
run: |
2121
echo "NEW_REF=${{ github.event.after}}" | tee -a "$GITHUB_ENV"
2222
echo "OLD_REF=${{ github.event.before }}" | tee -a "$GITHUB_ENV"
23+
# Note: in reusable workflows, github.event_name and github.event are
24+
# those of the caller; when invoked from bench-pr.yml this is a
25+
# pull_request event.
2326
- name: Save pull request HEAD and base to environment variables
24-
if: ${{ contains(fromJSON('["pull_request", "pull_request_target"]'), github.event_name) }}
27+
if: ${{ github.event_name == 'pull_request' }}
2528
run: |
2629
echo "OLD_REF=${{ github.event.pull_request.base.sha }}" | tee -a "$GITHUB_ENV"
2730
echo "NEW_REF=${{ github.event.pull_request.head.sha }}" | tee -a "$GITHUB_ENV"
@@ -83,8 +86,11 @@ jobs:
8386
run: |
8487
echo "NEW_REF=${{ github.event.after}}" | tee -a "$GITHUB_ENV"
8588
echo "OLD_REF=${{ github.event.before }}" | tee -a "$GITHUB_ENV"
89+
# Note: in reusable workflows, github.event_name and github.event are
90+
# those of the caller; when invoked from bench-pr.yml this is a
91+
# pull_request event.
8692
- name: Save pull request HEAD and base to environment variables
87-
if: ${{ contains(fromJSON('["pull_request", "pull_request_target"]'), github.event_name) }}
93+
if: ${{ github.event_name == 'pull_request' }}
8894
run: |
8995
echo "OLD_REF=${{ github.event.pull_request.base.sha }}" | tee -a "$GITHUB_ENV"
9096
echo "NEW_REF=${{ github.event.pull_request.head.sha }}" | tee -a "$GITHUB_ENV"

.github/workflows/bench-e2e.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ jobs:
2525
echo "NEW_REF=${{ github.event.after}}" | tee -a "$GITHUB_ENV"
2626
echo "OLD_REF=${{ github.event.before }}" | tee -a "$GITHUB_ENV"
2727
28+
# Note: in reusable workflows, github.event_name and github.event are
29+
# those of the caller; when invoked from bench-pr.yml this is a
30+
# pull_request event.
2831
- name: Save pull request HEAD and base to environment variables
29-
if: ${{ contains(fromJSON('["pull_request", "pull_request_target"]'), github.event_name) }}
32+
if: ${{ github.event_name == 'pull_request' }}
3033
run: |
3134
echo "OLD_REF=${{ github.event.pull_request.base.sha }}" | tee -a "$GITHUB_ENV"
3235
echo "NEW_REF=${{ github.event.pull_request.head.sha }}" | tee -a "$GITHUB_ENV"

.github/workflows/bench-pr.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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

.github/workflows/extra_jobs.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,12 @@ jobs:
4040

4141
- name: Label PR
4242
id: labeler
43-
uses: actions/labeler@v6
43+
uses: actions/labeler@v7
4444
with:
4545
dot: true
4646

47-
end-to-end-bench:
48-
name: End-to-End Benchmarks
49-
needs: auto-label
50-
if: ${{ contains(needs.auto-label.outputs.all-labels, 'Z-EndToEndBenchCI') && github.event_name != 'merge_group' }}
51-
uses: ./.github/workflows/bench-e2e.yml
52-
53-
compiler-bench:
54-
name: Compiler Benchmarks
55-
needs: auto-label
56-
if: ${{ contains(needs.auto-label.outputs.all-labels, 'Z-CompilerBenchCI') && github.event_name != 'merge_group' }}
57-
uses: ./.github/workflows/bench-compiler.yml
47+
# Note: the label-gated benchmark workflows (bench-pr.yml) used to be
48+
# invoked from here, but they build and run the code proposed in the pull
49+
# request, which must not happen in this workflow's trusted
50+
# `pull_request_target` context. They now trigger on `pull_request`
51+
# events directly.

.github/workflows/kani.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
# Retry on infra-driven failures (spot preemption / runner shutdown).
8383
# The script itself bounds per-test wall time, so functional regressions
8484
# surface as normal test failures and are not retried indefinitely.
85-
uses: nick-fields/retry@v3
85+
uses: nick-fields/retry@v4
8686
with:
8787
timeout_minutes: 180
8888
max_attempts: 2

0 commit comments

Comments
 (0)