|
42 | 42 | all_ports_all_boards,
|
43 | 43 | )
|
44 | 44 |
|
45 |
| -PORT_TO_ARCH = { |
| 45 | +PORT_TO_JOB = { |
46 | 46 | "atmel-samd": "atmel",
|
47 | 47 | "broadcom": "aarch",
|
48 | 48 | "cxd56": "arm",
|
@@ -110,7 +110,7 @@ def set_output(name: str, value):
|
110 | 110 |
|
111 | 111 |
|
112 | 112 | def set_boards_to_build(build_all: bool):
|
113 |
| - if last_failed_jobs.get("mpy_cross") or last_failed_jobs.get("tests"): |
| 113 | + if last_failed_jobs.get("mpy-cross") or last_failed_jobs.get("tests"): |
114 | 114 | build_all = True
|
115 | 115 |
|
116 | 116 | # Get boards in json format
|
@@ -224,33 +224,32 @@ def get_settings(board):
|
224 | 224 | boards_to_build = all_board_ids
|
225 | 225 | break
|
226 | 226 |
|
227 |
| - # Split boards by architecture. |
228 |
| - arch_to_boards = {"aarch": [], "arm": [], "atmel": [], "esp": [], "riscv": []} |
| 227 | + # Split boards by job |
| 228 | + job_to_boards = {"aarch": [], "arm": [], "atmel": [], "esp": [], "riscv": []} |
229 | 229 |
|
230 | 230 | # Append previously failed boards
|
231 |
| - for arch in arch_to_boards: |
232 |
| - if arch in last_failed_jobs: |
233 |
| - for board in last_failed_jobs[arch]: |
234 |
| - if not board in boards_to_build: |
235 |
| - boards_to_build.append(board) |
| 231 | + for job in job_to_boards: |
| 232 | + if job in last_failed_jobs: |
| 233 | + for board in last_failed_jobs[job]: |
| 234 | + boards_to_build.add(board) |
236 | 235 |
|
237 | 236 | build_boards = bool(boards_to_build)
|
238 | 237 | print("Building boards:", build_boards)
|
239 | 238 | set_output("build-boards", build_boards)
|
240 | 239 |
|
241 |
| - # Append boards according to arch |
| 240 | + # Append boards according to job |
242 | 241 | for board in sorted(boards_to_build):
|
243 | 242 | port = board_to_port.get(board)
|
244 | 243 | # A board can appear due to its _deletion_ (rare)
|
245 | 244 | # if this happens it's not in `board_to_port`.
|
246 | 245 | if not port:
|
247 | 246 | continue
|
248 |
| - arch_to_boards[PORT_TO_ARCH[port]].append(board) |
| 247 | + job_to_boards[PORT_TO_JOB[port]].append(board) |
249 | 248 | print(" ", board)
|
250 | 249 |
|
251 |
| - # Set the step outputs for each architecture |
252 |
| - for arch in arch_to_boards: |
253 |
| - set_output(f"boards-{arch}", json.dumps(arch_to_boards[arch])) |
| 250 | + # Set the step outputs for each job |
| 251 | + for job in job_to_boards: |
| 252 | + set_output(f"boards-{job}", json.dumps(job_to_boards[job])) |
254 | 253 |
|
255 | 254 |
|
256 | 255 | def set_docs_to_build(build_doc: bool):
|
|
0 commit comments