Skip CI builds for PRs that only touch build/test-irrelevant files - #369
Merged
Conversation
Docs, GitHub Actions config, the legacy Makefile build, unreachable demo apps, and dev-only tooling scripts can't affect the outcome of this buildbot's CMake configure/build/ctest pipeline, so PRs touching only those paths no longer schedule a build. Also authenticates the GitHub PR-files API lookup (via the existing GITHUB_TOKEN) to reduce the chance of a rate-limited/truncated file list; the filter fails open (never skips) when the file list is empty. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fileIsImportantpredicate to thehalide-mainscheduler that skips scheduling builds when a PR's changed files are all drawn from a known-safe set that can't affect this buildbot's CMake configure/build/ctest outcome: docs (*.md,doc/**),.github/**, the legacyMakefile-based build (never invoked by this buildbot), unreachable demo apps (apps/Hello*), and dev-onlytools/lint/debugger scripts. Full list and rationale in the diff comments.apps/images/**,apps/vcpkg/**,tools/launch_wasm_test.js, orpython_bindings/**/pyproject.toml— verified these are load-bearing for this pipeline (sample images read by CMake-built apps, vcpkg overlay ports forapps/hannk, wasm generator test launcher, and python bindings actually built/tested here).token=GITHUB_TOKENto the GitHub webhook'schange_hook_dialectsconfig so the PR-files API lookup buildbot already performs is authenticated, reducing the chance of hitting the unauthenticated rate limit.Test plan
python3 -c "import ast; ast.parse(...)"— config parses cleanlybuildbot checkconfig .— full config loads successfully_is_ignorable_path/is_change_importantcovering ignorable paths (README.md,.github/workflows/*.yml, legacy Makefiles,apps/HelloWasm/*), non-ignorable paths (src/*.cpp,apps/images/*,apps/vcpkg/*,tools/launch_wasm_test.js,python_bindings/*,CMakeLists.txt), mixed-file PRs, and the empty-file-list fail-open case — all passed.githubto confirm no build is scheduled, and a real PR touching source to confirm builds still run as expected🤖 Generated with Claude Code