Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for ci_set_matrix #8442

Merged
merged 3 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion docs/shared_bindings_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,11 @@ def get_settings_from_makefile(port_dir, board_name):
This means that the effect of all Makefile directives is taken
into account, without having to re-encode the logic that sets them
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(
["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",
errors="replace",
stdout=subprocess.PIPE,
Expand Down
7 changes: 2 additions & 5 deletions tools/ci_set_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,23 +189,20 @@ def get_settings(board):

# Check frozen files to see if they are in each board
if file.startswith("frozen"):
if file in settings.get("FROZEN_MPY_DIRS", ""):
if file in settings["FROZEN_MPY_DIRS"]:
boards_to_build.add(board)
continue

# Check supervisor files
# This is useful for limiting workflow changes to the relevant boards
if file.startswith("supervisor"):
if file in settings.get("SRC_SUPERVISOR", ""):
if file in settings["SRC_SUPERVISOR"]:
boards_to_build.add(board)
continue

if file.startswith("supervisor/shared/web_workflow/static/"):
web_workflow = settings["CIRCUITPY_WEB_WORKFLOW"]

while web_workflow.startswith("$("):
web_workflow = settings[web_workflow[2:-1]]

if web_workflow != "0":
boards_to_build.add(board)
continue
Expand Down