Skip to content

CI: skip the build on pull requests that change only documentation - #287

Open
sombraSoft wants to merge 1 commit into
xcl-dev:mainfrom
sombraSoft:ci/path-filters
Open

sombraSoft wants to merge 1 commit into
xcl-dev:mainfrom
sombraSoft:ci/path-filters

Conversation

@sombraSoft

@sombraSoft sombraSoft commented Nov 23, 2026 •

Copy link
Copy Markdown

Pull requests that change only documentation skip the Windows build, and the required check still reports.

Part of #265

A light changes job reads the PR's file list (the same API call PR checks makes). The build job's if: skips the build when every file is safe to skip: docs/, top-level .md, the PR / issue templates, pr-check.yml, LICENSE and .gitignore. Any other file, a push to main, or a list that cannot be read runs the build.

The on: triggers are unchanged. A job skipped by its if: reports success to a required check (GitHub docs); a workflow-level paths filter would leave it pending forever.

What is in it

CI time

  • +5–7 s before the build starts, for the changes job (Ubuntu). A docs-only PR skips the Windows build entirely (~1.5–2.5 min).

Tested

  • Fork, a PR changing ci.yml: https://github.com/sombraSoft/xcl/actions/runs/45278328881. Changed files and the build both ran, green.
  • Fork, a PR changing only docs/wave64-on-wave32.md: https://github.com/sombraSoft/xcl/actions/runs/45278397518. Changed files was green (rust=false), the build showed as skipped, and the run was green.
  • The shell logic, run locally against these cases: docs only, mixed, nested .md, scripts/, Cargo.lock, rename into docs, empty list, API failure and push.
  • Full suite on main (9ab7d76), RTX 3060 Ti (driver 621.24), Ryzen 9 5900X, Windows 11, rustc 1.97.1, debug: scripts/test.ps1 → 651 passed, 0 failed, 40 ignored; SKIPPED: 2 (no wave64). This PR changes only CI config, so the compiled code is the same.

Regression run

  • Not needed: no crates/xcl/src change.

Not tested

  • Upstream branch protection is not visible to me. The build job's name is unchanged, so its required check context is the same.
  • A real failure of the changes job; that case is covered by the local API-failure test and the !cancelled() condition.

AI use

  • Claude Code (Claude Opus 5.5) wrote the change and this description; I read the diff.

A docs-only PR waits about half an hour for a Windows build whose result cannot differ
from main's. A light `changes` job reads the PR's file list (the same API call PR checks
makes) and the build job's `if:` skips it when every file is on a safe-to-skip list: docs/,
top-level .md files, the PR / issue templates, pr-check.yml, LICENSE, .gitignore. Anything
else, a push to main, or a list that cannot be read runs the build.

The `on:` triggers stay as they are: a job skipped by its `if:` reports success to a
required check, while a workflow skipped by a `paths` filter leaves it pending forever.
The build's `if:` starts with !cancelled() so a failed `changes` job runs the build instead
of skipping it (a job whose `needs` failed is otherwise skipped, which also reads as
success). The `scripts` output is for a job that tests scripts/.
@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

Thanks!

@github-actions

Copy link
Copy Markdown

Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

@Foniass

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Triage (#1607) – head 2bbe1e4

No open or merged PR skips the build for documentation-only pull requests; #286 (same author) only bumps action versions in ci.yml.
No problems found in the diff: unknown files, pushes, an unreadable file list and a failed changes job all still run the build (!cancelled() and the != 'false' test). The scripts output is not used by any job in this PR yet (it is meant for #279).
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

@github-actions github-actions Bot removed the stale No activity for 3 days; closed 4 days later unless something happens label Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants