summaryrefslogtreecommitdiff
path: root/tools/build.py
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2026-08-25 09:46:42 +0700
committerGitHub <[email protected]>2026-08-25 09:46:42 +0700
commitda255b1d2db10b8f31332a779b2a526f579acee1 (patch)
tree154c8b8b9cf48f4a111edd385b8df7cc6919f3b8 /tools/build.py
parentaa0f4a40b59012e6ab421949c153088ca4984df4 (diff)
ci: an empty selection must build nothing, plus selector follow-ups (#3845)
ci: an empty selection must build nothing, plus selector follow-ups A PR whose build axis legitimately selected nothing rebuilt everything. build.yml reads .build.families twice - as a |-joined regex, and implicitly as "is anything selected" - but tested only -z "$FAMILY_REGEX", which an empty list and a charset-rejected one both satisfy while meaning opposite things. ci_set_matrix had already returned the correct all-empty matrix; the fall-open branch discarded it. #3842 and #3840 each spent 74 cmake legs on it. Branch on the two cases instead, rename FAM_* to FAMILY_*, and cover the block with a test that extracts it from build.yml and executes it - it had no test at all, which is how this shipped through two merges. Follow-ups to the same machinery: glob.escape the repo root at five sites, so a checkout path containing [ or * stops failing closed; drop the ci-full label, read after the matrix was already computed and so never functional; delete 13 mcu:MKL25ZXX / mcu:SAME5X skip tokens matching no board; carry the rule table in the module docstring, guarded against drift; and pin six selection behaviours a mutation pass proved untested. Cut the selector's cost 1.8x (26.0s -> 14.6s) with 0 divergences over 260 paths, and stop scoping the membrowse upload by the PR example filter.
Diffstat (limited to 'tools/build.py')
-rwxr-xr-xtools/build.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/build.py b/tools/build.py
index eeefca22d..0bb366e3d 100755
--- a/tools/build.py
+++ b/tools/build.py
@@ -356,11 +356,11 @@ def get_family_boards(family, one_random, one_first, examples=None, build_system
# the WHOLE preferred list, in order - stopping at entry one would abandon a
# curated list for the raw alphabetical order the moment its first board cannot
# build the filter, which also moves the board the metrics baseline is keyed on
+ # the whole preferred list, in order. Unreachable-when-unfiltered: with
+ # examples is None, buildable() is True and the loop returns on entry one.
for b in preferred_list:
if buildable(b):
return [b]
- if preferred_list and examples is None:
- return [preferred_list[0]]
candidates = [b for b in all_boards if buildable(b)] or all_boards
if one_first:
return [candidates[0]]