Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions master/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# ex: set syntax=python:
# vim: set syntax=python:
# comment
import fnmatch
import logging
import operator
import os
Expand Down Expand Up @@ -1078,13 +1079,86 @@ def create_builders():

c["builders"] = list(create_builders())


# Paths that cannot affect the outcome of this buildbot's CMake configure/build/ctest
# pipeline (it never invokes the legacy Makefile, builds docs, runs pip packaging, or
# runs clang-tidy/pre-commit). fnmatch's `*` already matches across `/`, so these behave
# like `**` globs without needing separate syntax.
_IGNORABLE_PATH_GLOBS = [
# GitHub Actions / GitHub metadata -- this buildbot doesn't use GH Actions at all
".github/*",
# Root-level and nested docs
"*.md",
"doc/*", # Doxygen docs; WITH_DOCS is OFF by default
"LICENSE.txt",
# Repo/editor/tooling metadata that never reaches CMake or ctest
".gitignore",
".gitattributes",
".gitmodules",
".gdbinit",
".lldbinit",
".clang-format",
".clang-format-ignore",
".clang-tidy",
".git-blame-ignore-revs",
".devcontainer/*",
".claude/*",
".idea/*",
# Coverage / pre-commit / lint configs and scripts (not run by this buildbot)
"codecov.yml",
".pre-commit-config.yaml",
"run-clang-format.sh",
"run-clang-tidy.sh",
# pip packaging -- buildbot builds python bindings via CMake+uv directly,
# never via packaging/pip's sdist/wheel path
"packaging/*",
# Legacy `make`-based build -- this buildbot only builds via CMake
"Makefile",
"Makefile.inc",
"*/Makefile",
"*/Makefile.inc",
"apps/support/*", # legacy-make helpers only (Makefile.inc, viz_auto.sh)
# Apps that apps/CMakeLists.txt never builds
"apps/HelloAndroid/*",
"apps/HelloAndroidCamera2/*",
"apps/HelloiOS/*",
"apps/HelloWasm/*",
# Dev-only tools/ scripts not wired into tools/CMakeLists.txt or any test target
"tools/find_inverse.cpp",
"tools/check_cmake_file_lists.py",
"tools/check_cmake_style.py",
"tools/clang-tidy-filter.sh",
"tools/gdbhalide.py",
"tools/lldbhalide.py",
"tools/Halide.natvis",
"tools/halide_config.make.tpl",
"tools/makelib.sh",
"tools/run-coverage.sh",
]


def _is_ignorable_path(path):
return any(fnmatch.fnmatchcase(path, pattern) for pattern in _IGNORABLE_PATH_GLOBS)


def is_change_important(change):
files = change.files
if not files:
# Fail open: an empty/missing file list (e.g. a rate-limited or
# unauthenticated GitHub API call) must never cause a build to be skipped.
return True
return any(not _is_ignorable_path(f) for f in files)


c["schedulers"] = [
AnyBranchScheduler(
name="halide-main",
change_filter=ChangeFilter(
category="pull",
branch_fn=lambda br: br != "main",
),
fileIsImportant=is_change_important,
onlyImportant=True,
builderNames=[b1.name for b1 in c["builders"]],
),
ForceScheduler(
Expand Down Expand Up @@ -1247,6 +1321,7 @@ c["www"] = {
"secret": WEBHOOK_TOKEN,
"skips": [],
"class": SafeGitHubEventHandler,
"token": GITHUB_TOKEN,
},
},
}
Expand Down
Loading