Skip to content

Commit 91d4fed

Browse files
committed
explicitly check for failure of certain jobs
1 parent 64ba371 commit 91d4fed

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

tools/ci_changes_per_commit.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,7 @@ def get_bad_check_runs(query_check_runs):
171171
more_pages = True
172172

173173
run_types = ["failed", "incomplete"]
174-
175-
regex_matrix = re.compile(r"^\S+ \/ (build|run) \(\S+\)$")
174+
have_dependent_jobs = ["scheduler", "mpy-cross", "tests"]
176175

177176
while more_pages:
178177
check_runs = query_check_runs.fetch()["data"]["node"]
@@ -184,14 +183,15 @@ def get_bad_check_runs(query_check_runs):
184183

185184
for check_run in check_runs[run_type]["nodes"]:
186185
name = check_run["name"]
187-
if name.startswith("ports") or regex_matrix.search(name):
188-
matrix = name.split(" ", 1)[0]
186+
187+
if any([name.startswith(job) for job in have_dependent_jobs]):
188+
return {}
189+
190+
if name.startswith("ports"):
189191
matrix_job = name.rsplit(" (", 1)[1][:-1]
190-
bad_runs.setdefault(matrix, []).append(matrix_job)
191-
elif name != "scheduler":
192-
bad_runs[name] = True
192+
bad_runs.setdefault("ports", []).append(matrix_job)
193193
else:
194-
return {}
194+
bad_runs[name] = True
195195

196196
if query_check_runs.paginate(
197197
check_runs[run_type]["pageInfo"], "after" + run_type_camel

tools/ci_set_matrix.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,6 @@ def set_output(name: str, value):
9898

9999

100100
def set_boards(build_all: bool):
101-
if last_failed_jobs.get("mpy-cross") or last_failed_jobs.get("tests"):
102-
build_all = True
103-
104101
# Get boards in json format
105102
boards_info_json = build_board_info.get_board_mapping()
106103
all_board_ids = set()

0 commit comments

Comments
 (0)