Skip to content

Commit f43efc9

Browse files
committed
ci_set_matrix: the boards set needs to be a copy
Recently in adafruit#10026 this script was altered so that sometimes items are removed from `boards`. However, this could have side effects. For instance, when a file like `shared/runtime/context_manager_helpers.c` is modified, it doesn't match any per-port or per-board rule so we execute `boards_to_build = all_board_ids`. But if the object `all_board_ids` refers to has been modified by `boards.remove(board)` in an earlier iteration, then we don't end up really building all boards. Noticed during development of adafruit#10040.
1 parent 4ba872c commit f43efc9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/ci_set_matrix.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ def get_settings(board):
187187
# As a (nearly) last resort, for some certain files, we compute the settings from the
188188
# makefile for each board and determine whether to build them that way
189189
if file.startswith("frozen") or file.startswith("supervisor") or module_matches:
190-
boards = port_to_board[port] if port else all_board_ids
190+
# Take a copy, because we remove items from it below. For
191+
# instance, if we remove items from, say, all_board_ids, then
192+
# the logic to build all boards breaks.
193+
boards = set(port_to_board[port] if port else all_board_ids)
191194

192195
# Zephyr boards don't use make, so build them and don't compute their settings.
193196
for board in port_to_board["zephyr-cp"]:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy