Skip to content

ci: limit build matrix to relevant paths - #18

Closed
zuudevs wants to merge 1 commit into
refactor/src-layoutfrom
ci/relevant-path-filters
Closed

zuudevs wants to merge 1 commit into
refactor/src-layoutfrom
ci/relevant-path-filters

Conversation

@zuudevs

@zuudevs zuudevs commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Summary

Tightens the C++ build/test workflow trigger so the full six-job matrix only runs when a change can affect compilation, tests, examples, benchmarks, dependencies, or the workflow itself.

CI now runs for

  • include/**
  • src/**
  • tests/**
  • benchmarks/**
  • examples/**
  • cmake/**
  • root CMakeLists.txt
  • vcpkg.json
  • vcpkg-configuration.json
  • .github/workflows/ci.yml

The same path filter is applied to both pushes to main/master and pull requests targeting those branches.

CI no longer runs for documentation-only changes

Examples:

  • docs/**
  • README.md
  • Markdown-only planning/API documentation
  • other repository metadata that does not affect the C++ build

Rationale

The current workflow executes Ubuntu, Windows, and macOS in both Debug and Release for every PR, including documentation-only changes. That consumes CI time without validating anything relevant to those changes. A positive path allowlist keeps the expensive build matrix tied to files that can actually affect the produced library or its verification targets.

Stacking

This PR is intentionally stacked on top of #17 (refactor/src-layout) so its diff contains only .github/workflows/ci.yml. After #17 is merged, this PR should be retargeted to main before merge.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba5fa4b34d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml
- '.github/workflows/ci.yml'
pull_request:
branches: [ main, master ]
paths:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve required CI checks for filtered pull requests

When any matrix check from this workflow is required by branch protection, a documentation-only PR matching none of these paths will never create that check, leaving the PR blocked in Pending rather than merely avoiding the expensive jobs. GitHub explicitly documents this behavior for workflow-level path filtering, so keep the workflow trigger unconditional and perform the path decision inside a lightweight job or expose a separate always-running required check. GitHub workflow syntax

Useful? React with 👍 / 👎.

@zuudevs
zuudevs deleted the branch refactor/src-layout September 15, 2026 00:04
@zuudevs zuudevs closed this Sep 15, 2026
@zuudevs
zuudevs deleted the ci/relevant-path-filters branch September 17, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant