about summary refs log tree commit diff
path: root/src/ci/github-actions
diff options
context:
space:
mode:
authorJakub Beránek <jakub.beranek@vsb.cz>2024-07-04 12:34:07 +0200
committerJakub Beránek <jakub.beranek@vsb.cz>2024-07-04 12:34:07 +0200
commit410f760ed530954a3f3da66b41207833207efdf2 (patch)
tree8677f25e0ef184140f2eba678965e23ca555e366 /src/ci/github-actions
parent1cfd47fe0b78f48a04ac8fce792a406b638da40b (diff)
downloadrust-410f760ed530954a3f3da66b41207833207efdf2.tar.gz
rust-410f760ed530954a3f3da66b41207833207efdf2.zip
Make CI more agnostic of the owning GitHub organization
This should make it possible to switch running `auto` and `try` builds from `rust-lang-ci` to `rust-lang`.
Diffstat (limited to 'src/ci/github-actions')
-rwxr-xr-xsrc/ci/github-actions/calculate-job-matrix.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/ci/github-actions/calculate-job-matrix.py b/src/ci/github-actions/calculate-job-matrix.py
index 4f9bc39a628..d03bbda1008 100755
--- a/src/ci/github-actions/calculate-job-matrix.py
+++ b/src/ci/github-actions/calculate-job-matrix.py
@@ -91,21 +91,17 @@ def find_run_type(ctx: GitHubCtx) -> Optional[WorkflowRunType]:
     if ctx.event_name == "pull_request":
         return PRRunType()
     elif ctx.event_name == "push":
-        old_bors_try_build = (
-            ctx.ref in ("refs/heads/try", "refs/heads/try-perf") and
-            ctx.repository == "rust-lang-ci/rust"
+        try_build = ctx.ref in (
+            "refs/heads/try",
+            "refs/heads/try-perf",
+            "refs/heads/automation/bors/try"
         )
-        new_bors_try_build = (
-            ctx.ref == "refs/heads/automation/bors/try" and
-            ctx.repository == "rust-lang/rust"
-        )
-        try_build = old_bors_try_build or new_bors_try_build
 
         if try_build:
             jobs = get_custom_jobs(ctx)
             return TryRunType(custom_jobs=jobs)
 
-        if ctx.ref == "refs/heads/auto" and ctx.repository == "rust-lang-ci/rust":
+        if ctx.ref == "refs/heads/auto":
             return AutoRunType()
 
     return None