Merge pull request #8442 from jepler/issue8441

Fixes for ci_set_matrix
This commit is contained in:
Dan Halbert 2023-09-28 10:21:36 -04:00 committed by GitHub
commit 4ea0e4735d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -170,9 +170,11 @@ def get_settings_from_makefile(port_dir, board_name):
This means that the effect of all Makefile directives is taken This means that the effect of all Makefile directives is taken
into account, without having to re-encode the logic that sets them into account, without having to re-encode the logic that sets them
in this script, something that has proved error-prone in this script, something that has proved error-prone
This list must explicitly include any setting queried by tools/ci_set_matrix.py.
""" """
contents = subprocess.run( contents = subprocess.run(
["make", "-C", port_dir, "-f", "Makefile", f"BOARD={board_name}", "print-CFLAGS", "print-CIRCUITPY_BUILD_EXTENSIONS", "print-FROZEN_MPY_DIRS", "print-SRC_PATTERNS"], ["make", "-C", port_dir, "-f", "Makefile", f"BOARD={board_name}", "print-CFLAGS", "print-CIRCUITPY_BUILD_EXTENSIONS", "print-FROZEN_MPY_DIRS", "print-SRC_PATTERNS", "print-SRC_SUPERVISOR"],
encoding="utf-8", encoding="utf-8",
errors="replace", errors="replace",
stdout=subprocess.PIPE, stdout=subprocess.PIPE,

View File

@ -189,23 +189,20 @@ def set_boards(build_all: bool):
# Check frozen files to see if they are in each board # Check frozen files to see if they are in each board
if file.startswith("frozen"): if file.startswith("frozen"):
if file in settings.get("FROZEN_MPY_DIRS", ""): if file in settings["FROZEN_MPY_DIRS"]:
boards_to_build.add(board) boards_to_build.add(board)
continue continue
# Check supervisor files # Check supervisor files
# This is useful for limiting workflow changes to the relevant boards # This is useful for limiting workflow changes to the relevant boards
if file.startswith("supervisor"): if file.startswith("supervisor"):
if file in settings.get("SRC_SUPERVISOR", ""): if file in settings["SRC_SUPERVISOR"]:
boards_to_build.add(board) boards_to_build.add(board)
continue continue
if file.startswith("supervisor/shared/web_workflow/static/"): if file.startswith("supervisor/shared/web_workflow/static/"):
web_workflow = settings["CIRCUITPY_WEB_WORKFLOW"] web_workflow = settings["CIRCUITPY_WEB_WORKFLOW"]
while web_workflow.startswith("$("):
web_workflow = settings[web_workflow[2:-1]]
if web_workflow != "0": if web_workflow != "0":
boards_to_build.add(board) boards_to_build.add(board)
continue continue