Skip to content

Commit e03ea0d

Browse files
committed
ci(build): PR-only path filter for web-static and qt-webengine
On pull_request, skip the web-static verify and Qt WebEngine leak-gate jobs when their inputs did not change (web-static/** for web; ui/**, src/**, and the build system for qt). On push, tag and workflow_dispatch the filter is bypassed and every job runs, so the master rollup and release builds remain authoritative. None of the gated jobs are branch-protection required checks and nothing needs: them, so a skip reports as Skipped (not a false-green on a required gate) with no downstream cascade. Required coin/consensus gates are left unfiltered; filtering those safely needs an always-run aggregator plus a branch-protection re-point (operator action), tracked separately.
1 parent dc630ca commit e03ea0d

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,37 @@ concurrency:
2121

2222

2323
jobs:
24+
# ------------------------------------------------------------------------
25+
# PR job-selection filter. On pull_request, skip expensive jobs whose
26+
# inputs did not change; on push/tag/dispatch this filter is BYPASSED and
27+
# every job runs (the master rollup and release builds stay authoritative).
28+
# NONE of the jobs gated here are branch-protection required checks, so a
29+
# skip reports as "Skipped" (never a false-green on a required gate) and
30+
# nothing needs: them, so no downstream cascade. Required coin/consensus
31+
# gates are deliberately NOT filtered here (tracked in ci-steward card).
32+
# ------------------------------------------------------------------------
33+
changes:
34+
name: PR path filter
35+
runs-on: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && fromJSON('["self-hosted","Linux","X64","c2pool-build"]') || 'ubuntu-24.04' }}
36+
outputs:
37+
web: ${{ steps.filter.outputs.web }}
38+
qt: ${{ steps.filter.outputs.qt }}
39+
steps:
40+
- uses: actions/checkout@v6
41+
- uses: dorny/paths-filter@v3
42+
id: filter
43+
with:
44+
filters: |
45+
web:
46+
- 'web-static/**'
47+
- '.github/workflows/build.yml'
48+
qt:
49+
- 'ui/**'
50+
- 'src/**'
51+
- 'CMakeLists.txt'
52+
- 'conanfile*'
53+
- 'cmake/**'
54+
- '.github/workflows/build.yml'
2455
# ════════════════════════════════════════════════════════════════════════════
2556
# Test-allowlist drift-guard (fast, no build): every per-coin test executable
2657
# declared in src/impl/<coin>/test/CMakeLists.txt must appear in a build.yml
@@ -653,6 +684,8 @@ jobs:
653684
# ════════════════════════════════════════════════════════════════════════════
654685
web-static:
655686
name: Web-static verify
687+
needs: changes
688+
if: ${{ needs.changes.outputs.web == 'true' || github.event_name != 'pull_request' }}
656689
# Route to self-hosted for trusted events; fork PRs fall back to
657690
# GitHub-hosted ubuntu-24.04 (never run untrusted fork code self-hosted).
658691
runs-on: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && fromJSON('["self-hosted","Linux","X64","c2pool-build"]') || 'ubuntu-24.04' }}
@@ -764,6 +797,8 @@ jobs:
764797
# ════════════════════════════════════════════════════════════════════════════
765798
qt-webengine:
766799
name: Qt WebEngine leak gate
800+
needs: changes
801+
if: ${{ needs.changes.outputs.qt == 'true' || github.event_name != 'pull_request' }}
767802
runs-on: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && fromJSON('["self-hosted","Linux","X64","c2pool-build"]') || 'ubuntu-24.04' }}
768803
# Hard ceiling: orphaned QtWebEngine/Chromium helper children survive
769804
# the inner `timeout 180`, holding the xvfb pipe open and hanging the

0 commit comments

Comments
 (0)