From 30002af99b97caf28a815e808bb50e2cb217cf3a Mon Sep 17 00:00:00 2001 From: Esteban82 Date: Thu, 10 Sep 2026 14:43:10 -0300 Subject: [PATCH 1/4] CI: Don't leave required checks pending on documentation-only PRs The required checks (Linux, macOS, Windows, Linux (without optional dependencies), Code Validator) are filtered with paths: on the workflow trigger, so a PR touching only documentation never starts those workflows and GitHub never receives a status for those check names. Branch protection then keeps them at "Expected - Waiting for status to be reported" and the PR cannot be merged. Move the path filtering out of the trigger into a small changes job and gate the real job with if: instead. A job skipped by a conditional does report a status and satisfies branch protection, whereas a workflow that never runs does not. The changes job checks out the repository because paths-filter only uses the API for pull_request events; for push it needs git. Co-authored-by: Claude Sonnet 5 Co-authored-by: Claude Opus 5 --- .github/workflows/build.yml | 34 ++++++++++++++++++---------- .github/workflows/code-validator.yml | 31 +++++++++++++++++-------- .github/workflows/tests.yml | 34 ++++++++++++++++++---------- 3 files changed, 65 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e2f11889b8c..03f27452eaa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,19 +8,7 @@ on: branches: - master - 6.[0-9]+ - paths: - - 'ci/**' - - 'cmake/**' - - 'src/**' - - '**/CMakeLists.txt' - - '.github/workflows/build.yml' pull_request: - paths: - - 'ci/**' - - 'cmake/**' - - 'src/**' - - 'CMakeLists.txt' - - '.github/workflows/build.yml' workflow_dispatch: defaults: @@ -33,8 +21,30 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} jobs: + changes: + name: Detect relevant changes + runs-on: ubuntu-latest + outputs: + relevant: ${{ steps.filter.outputs.relevant }} + steps: + # paths-filter needs a checkout for push events; on PRs it uses the API + - uses: actions/checkout@v6.0.2 + + - uses: dorny/paths-filter@v4.0.3 + id: filter + with: + filters: | + relevant: + - 'ci/**' + - 'cmake/**' + - 'src/**' + - '**/CMakeLists.txt' + - '.github/workflows/build.yml' + build: name: ${{ matrix.name }} + needs: changes + if: needs.changes.outputs.relevant == 'true' || github.event_name == 'workflow_dispatch' runs-on: ${{ matrix.os }} env: diff --git a/.github/workflows/code-validator.yml b/.github/workflows/code-validator.yml index 0834c3c865f..7a83560148d 100644 --- a/.github/workflows/code-validator.yml +++ b/.github/workflows/code-validator.yml @@ -14,24 +14,35 @@ on: branches: - master - '[0-9]+.[0-9]+' - paths: - - 'src/**' - - 'cmake/**' - - '**/*.sh' - - '.github/workflows/code-validator.yml' pull_request: - paths: - - 'src/**' - - 'cmake/**' - - '**/*.sh' - - '.github/workflows/code-validator.yml' workflow_dispatch: name: Code Validator jobs: + changes: + name: Detect relevant changes + runs-on: ubuntu-latest + outputs: + relevant: ${{ steps.filter.outputs.relevant }} + steps: + # paths-filter needs a checkout for push events; on PRs it uses the API + - uses: actions/checkout@v6.0.2 + + - uses: dorny/paths-filter@v4.0.3 + id: filter + with: + filters: | + relevant: + - 'src/**' + - 'cmake/**' + - '**/*.sh' + - '.github/workflows/code-validator.yml' + code-validator: name: Code Validator + needs: changes + if: needs.changes.outputs.relevant == 'true' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest steps: - name: Check out repository diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5a40f9edf51..2ece52ad40c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,19 +8,7 @@ on: branches: - master - 6.[0-9]+ - paths: - - 'src/**' - - 'test/**' - - 'doc/examples/**' - - 'doc/scripts/**' - - '.github/workflows/tests.yml' pull_request: - paths: - - 'src/**' - - 'test/**' - - 'doc/examples/**' - - 'doc/scripts/**' - - '.github/workflows/tests.yml' workflow_dispatch: defaults: @@ -33,8 +21,30 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} jobs: + changes: + name: Detect relevant changes + runs-on: ubuntu-latest + outputs: + relevant: ${{ steps.filter.outputs.relevant }} + steps: + # paths-filter needs a checkout for push events; on PRs it uses the API + - uses: actions/checkout@v6.0.2 + + - uses: dorny/paths-filter@v4.0.3 + id: filter + with: + filters: | + relevant: + - 'src/**' + - 'test/**' + - 'doc/examples/**' + - 'doc/scripts/**' + - '.github/workflows/tests.yml' + test: name: ${{ matrix.name }} + needs: changes + if: needs.changes.outputs.relevant == 'true' || github.event_name == 'workflow_dispatch' runs-on: ${{ matrix.os }} env: From 6ac133917056e8badb4499bbb78c0dac59c08e43 Mon Sep 17 00:00:00 2001 From: Esteban82 Date: Fri, 11 Sep 2026 09:33:22 -0300 Subject: [PATCH 2/4] CI: Apply the same skip-when-irrelevant pattern to docker.yml and docs.yml Same reasoning as the previous commit, extended to the two remaining path-filtered workflows per seisman's review comment on #9194. docs.yml has no pull_request trigger, so the docs job's condition covers push (gated by the filter), release and workflow_dispatch (always run). Co-authored-by: Claude Sonnet 5 --- .github/workflows/docker.yml | 34 ++++++++++++++++++++++------------ .github/workflows/docs.yml | 26 +++++++++++++++++++++----- 2 files changed, 43 insertions(+), 17 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 46e7768717b..53f615b19ed 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -10,19 +10,7 @@ on: branches: - master - 6.[0-9]+ - paths: - - 'ci/**' - - 'cmake/**' - - 'src/**' - - '**/CMakeLists.txt' - - '.github/workflows/docker.yml' pull_request: - paths: - - 'ci/**' - - 'cmake/**' - - 'src/**' - - '**/CMakeLists.txt' - - '.github/workflows/docker.yml' workflow_dispatch: defaults: @@ -38,8 +26,30 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} jobs: + changes: + name: Detect relevant changes + runs-on: ubuntu-latest + outputs: + relevant: ${{ steps.filter.outputs.relevant }} + steps: + # paths-filter needs a checkout for push events; on PRs it uses the API + - uses: actions/checkout@v6.0.2 + + - uses: dorny/paths-filter@v4.0.3 + id: filter + with: + filters: | + relevant: + - 'ci/**' + - 'cmake/**' + - 'src/**' + - '**/CMakeLists.txt' + - '.github/workflows/docker.yml' + docker: name: ${{ matrix.image }} + needs: changes + if: needs.changes.outputs.relevant == 'true' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest container: image: ${{ matrix.image }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b1e4928cfe7..a524bb926d6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -9,11 +9,6 @@ on: branches: - master - 6.[0-9]+ - paths: - - 'ci/**' - - 'doc/**' - - '**/CMakeLists.txt' - - '.github/workflows/docs.yml' release: types: - published @@ -29,8 +24,29 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} jobs: + changes: + name: Detect relevant changes + runs-on: ubuntu-latest + outputs: + relevant: ${{ steps.filter.outputs.relevant }} + steps: + # paths-filter needs a checkout for push events; on PRs it uses the API + - uses: actions/checkout@v6.0.2 + + - uses: dorny/paths-filter@v4.0.3 + id: filter + with: + filters: | + relevant: + - 'ci/**' + - 'doc/**' + - '**/CMakeLists.txt' + - '.github/workflows/docs.yml' + docs: name: ${{ matrix.name }} + needs: changes + if: needs.changes.outputs.relevant == 'true' || github.event_name != 'push' runs-on: ${{ matrix.os }} timeout-minutes: 45 From 39169471e940920d69e3280f53577421394ef997 Mon Sep 17 00:00:00 2001 From: Esteban82 Date: Fri, 11 Sep 2026 09:35:57 -0300 Subject: [PATCH 3/4] CI: Give the docker.yml changes job the pull-requests: read permission docker.yml is the only one of these workflows with its own permissions block, and declaring one sets every unlisted scope to none. paths-filter needs pull-requests: read to list the files of a pull request, so without it the changes job would have failed on every PR and taken the docker job down with it. Co-authored-by: Claude Opus 5 --- .github/workflows/docker.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 53f615b19ed..0fe71e8f60f 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -29,6 +29,9 @@ jobs: changes: name: Detect relevant changes runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read # required by dorny/paths-filter on pull_request events outputs: relevant: ${{ steps.filter.outputs.relevant }} steps: From 67bbc7afa8d8a0c791e313e03c0ba7b7c57a6995 Mon Sep 17 00:00:00 2001 From: Esteban82 Date: Fri, 11 Sep 2026 09:46:14 -0300 Subject: [PATCH 4/4] Revert "CI: Apply the same skip-when-irrelevant pattern" for docs.yml docs.yml has no pull_request trigger, so it never posts a status on a PR and can't be the cause of the pending-required-checks problem this PR fixes - the change bought nothing there. Worse, it added a new failure mode on the release event: if the changes job errors out, the docs job is skipped rather than failed, silently dropping the doc build, the gh-pages deploy and the release package. Keeping docker.yml, which does run on pull_request and was the one seisman asked about. Co-authored-by: Claude Sonnet 5 --- .github/workflows/docs.yml | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a524bb926d6..b1e4928cfe7 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -9,6 +9,11 @@ on: branches: - master - 6.[0-9]+ + paths: + - 'ci/**' + - 'doc/**' + - '**/CMakeLists.txt' + - '.github/workflows/docs.yml' release: types: - published @@ -24,29 +29,8 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} jobs: - changes: - name: Detect relevant changes - runs-on: ubuntu-latest - outputs: - relevant: ${{ steps.filter.outputs.relevant }} - steps: - # paths-filter needs a checkout for push events; on PRs it uses the API - - uses: actions/checkout@v6.0.2 - - - uses: dorny/paths-filter@v4.0.3 - id: filter - with: - filters: | - relevant: - - 'ci/**' - - 'doc/**' - - '**/CMakeLists.txt' - - '.github/workflows/docs.yml' - docs: name: ${{ matrix.name }} - needs: changes - if: needs.changes.outputs.relevant == 'true' || github.event_name != 'push' runs-on: ${{ matrix.os }} timeout-minutes: 45