From c031fa5d5b4a47aad0a002c14119c1249466ac39 Mon Sep 17 00:00:00 2001 From: Alejo Amiras Date: Tue, 18 Aug 2026 16:02:33 +0000 Subject: [PATCH 1/2] ci: gate PR benchmark job behind a benchmark-relevant paths filter Benchmark takes ~35 minutes and ran on every PR, docs-only included. A changes job (dorny/paths-filter, SHA-pinned v3.0.2) now gates it on paths that can affect benchmark output: contract sources, Nargo manifests, the benchmark definitions, dependency manifests, and the workflow itself. Job-level gating keeps a skipped benchmark reporting as passing for branch protection, unlike workflow-level paths filtering which would leave a required check pending forever. Co-Authored-By: Claude Fable 5 --- .github/workflows/pr-checks.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 394c2384..9fdfa61e 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -8,6 +8,31 @@ concurrency: cancel-in-progress: true jobs: + # Job-level gating (not workflow-level `paths:`) so a skipped benchmark still + # reports as passing for branch protection. + changes: + name: Changes + runs-on: ubuntu-latest + permissions: + pull-requests: read + outputs: + benchmark: ${{ steps.filter.outputs.benchmark }} + steps: + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: filter + with: + filters: | + benchmark: + - 'src/**/*.nr' + - '**/Nargo.toml' + - 'benchmarks/**' + # 4 of 6 benchmarks import their setup helpers from this file + - 'src/ts/test/utils.ts' + - 'tsconfig.json' + - 'package.json' + - 'yarn.lock' + - '.github/workflows/pr-checks.yml' + format: name: Format runs-on: ubuntu-latest @@ -27,6 +52,10 @@ jobs: secrets: inherit benchmark: + # Skipping also skips this branch's baseline-artifact upload; a PR stacked on + # top of a skipped branch falls back to `if_no_artifact_found: warn` downstream. + needs: changes + if: needs.changes.outputs.benchmark == 'true' uses: AztecProtocol/aztec-benchmark/.github/workflows/pr-benchmark.yml@39244c9306f7b460aec570297100f3513f7ef936 # v5.0.1 with: runner: ubuntu-latest From 68b6b1f0db6a82aba7b2221527fd01882d376cc3 Mon Sep 17 00:00:00 2001 From: Alejo Amiras Date: Tue, 18 Aug 2026 16:15:51 +0000 Subject: [PATCH 2/2] test: docs-only change to observe benchmark skip semantics --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 325668de..64695e55 100644 --- a/README.md +++ b/README.md @@ -114,3 +114,5 @@ The contracts above are the complete, intended scope of this repository. The Azt ## License Released under the [MIT License](LICENSE). + +