CI: skip the build on pull requests that change only documentation #287
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!287
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-287"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@sombraSoft on GitHub · 2026-11-23 22:23 UTC · original
sombraSoft:ci/path-filters→main· +60 −3 · 1 files · 1 commits · openPull requests that change only documentation skip the Windows build, and the required check still reports.
Part of #265
A light
changesjob reads the PR's file list (the same API callPR checksmakes). The build job'sif:skips the build when every file is safe to skip:docs/, top-level.md, the PR / issue templates,pr-check.yml,LICENSEand.gitignore. Any other file, a push tomain, or a list that cannot be read runs the build.The
on:triggers are unchanged. A job skipped by itsif:reports success to a required check (GitHub docs); a workflow-levelpathsfilter would leave it pending forever.What is in it
.github/workflows/ci.yml:changesjob (ubuntu,gh api …/pulls/N/files) with outputsrustandscripts. Each output defaults totrue. Renamed files count under both their old and new names.windowsjob getsneeds: changesandif: !cancelled() && needs.changes.outputs.rust != 'false', so a failedchangesjob runs the build instead of skipping it..mdfiles are skipped, becausecrates/xcl/data/stubdb.tomlandtests/data/are read by the code. Nothing readsdocs/.if:: clippy (#277) onrust, the script tests (#279) onscripts. cargo-deny (#276) would get adepsoutput.CI time
changesjob (Ubuntu). A docs-only PR skips the Windows build entirely (~1.5–2.5 min).Tested
ci.yml: https://github.com/sombraSoft/xcl/actions/runs/45278328881.Changed filesand the build both ran, green.docs/wave64-on-wave32.md: https://github.com/sombraSoft/xcl/actions/runs/45278397518.Changed fileswas green (rust=false), the build showed as skipped, and the run was green..md,scripts/,Cargo.lock, rename into docs, empty list, API failure and push.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
crates/xcl/srcchange.Not tested
changesjob; that case is covered by the local API-failure test and the!cancelled()condition.AI use
@DavidM1911 on GitHub · 2026-11-25 15:03 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.