about summary refs log tree commit diff
path: root/src/ci/github-actions
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2024-05-05 08:05:10 +0200
committerJakub Beránek <berykubik@gmail.com>2024-05-05 14:06:23 +0200
commitb3e9060178780b51c21b50c30f04f2b3d339164a (patch)
treec3fc502e1b1945bbd2cc856ac94a2f945bdf11ab /src/ci/github-actions
parentbf8bcc4c2d3b0b9c44bc7286b9377a9674b67186 (diff)
downloadrust-b3e9060178780b51c21b50c30f04f2b3d339164a.tar.gz
rust-b3e9060178780b51c21b50c30f04f2b3d339164a.zip
CI: fix auto builds and make sure that we always have at least a single CI job
Diffstat (limited to 'src/ci/github-actions')
-rwxr-xr-xsrc/ci/github-actions/calculate-job-matrix.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ci/github-actions/calculate-job-matrix.py b/src/ci/github-actions/calculate-job-matrix.py
index 115f2e0ad78..4f9bc39a628 100755
--- a/src/ci/github-actions/calculate-job-matrix.py
+++ b/src/ci/github-actions/calculate-job-matrix.py
@@ -136,7 +136,7 @@ def calculate_jobs(run_type: WorkflowRunType, job_data: Dict[str, Any]) -> List[
                 raise Exception(f"Custom job(s) `{unknown_jobs}` not found in auto jobs")
 
         return add_base_env(name_jobs(jobs, "try"), job_data["envs"]["try"])
-    elif run_type is AutoRunType:
+    elif isinstance(run_type, AutoRunType):
         return add_base_env(name_jobs(job_data["auto"], "auto"), job_data["envs"]["auto"])
 
     return []
@@ -192,6 +192,10 @@ if __name__ == "__main__":
     if run_type is not None:
         jobs = calculate_jobs(run_type, data)
     jobs = skip_jobs(jobs, channel)
+
+    if not jobs:
+        raise Exception("Scheduled job list is empty, this is an error")
+
     run_type = format_run_type(run_type)
 
     logging.info(f"Output:\n{yaml.dump(dict(jobs=jobs, run_type=run_type), indent=4)}")