Skip to content

Skip CI builds for PRs that only touch build/test-irrelevant files - #369

Merged
alexreinking merged 1 commit into
masterfrom
skip-ci-for-irrelevant-files
Aug 8, 2026
Merged

Skip CI builds for PRs that only touch build/test-irrelevant files#369
alexreinking merged 1 commit into
masterfrom
skip-ci-for-irrelevant-files

Conversation

@alexreinking

Copy link
Copy Markdown
Member

Summary

  • Adds a fileIsImportant predicate to the halide-main scheduler 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 legacy Makefile-based build (never invoked by this buildbot), unreachable demo apps (apps/Hello*), and dev-only tools/ lint/debugger scripts. Full list and rationale in the diff comments.
  • Deliberately does not exclude apps/images/**, apps/vcpkg/**, tools/launch_wasm_test.js, or python_bindings/**/pyproject.toml — verified these are load-bearing for this pipeline (sample images read by CMake-built apps, vcpkg overlay ports for apps/hannk, wasm generator test launcher, and python bindings actually built/tested here).
  • Fails open: an empty/missing changed-files list (e.g. a rate-limited GitHub API call) is always treated as important, so it never silently skips a real change.
  • Adds token=GITHUB_TOKEN to the GitHub webhook's change_hook_dialects config 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 cleanly
  • buildbot checkconfig . — full config loads successfully
  • Standalone assertions against _is_ignorable_path/is_change_important covering 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
  • Observe a real PR touching only docs/.github to confirm no build is scheduled, and a real PR touching source to confirm builds still run as expected

🤖 Generated with Claude Code

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>
@alexreinking
alexreinking merged commit 464b32f into master Aug 8, 2026
9 checks passed
@alexreinking
alexreinking deleted the skip-ci-for-irrelevant-files branch August 8, 2026 16:14
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