Skip to content

Commit c36d78e

Browse files
committed
Turn CI_ONLY_WHEN_CHANNEL from an environment variable to a job attribute
1 parent c59bc9a commit c36d78e

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

src/ci/github-actions/calculate-job-matrix.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def skip_jobs(jobs: List[Dict[str, Any]], channel: str) -> List[Job]:
9595
"""
9696
Skip CI jobs that are not supposed to be executed on the given `channel`.
9797
"""
98-
return [j for j in jobs if j.get("CI_ONLY_WHEN_CHANNEL", channel) == channel]
98+
return [j for j in jobs if j.get("only_on_channel", channel) == channel]
9999

100100

101101
def get_github_ctx() -> GitHubCtx:

src/ci/github-actions/jobs.yml

+8-9
Original file line numberDiff line numberDiff line change
@@ -200,24 +200,23 @@ auto:
200200
# channel name on the output), and this builder prevents landing
201201
# changes that would result in broken builds after a promotion.
202202
- image: x86_64-gnu-stable
203+
# Only run this job on the nightly channel. Running this on beta
204+
# could cause failures when `dev: 1` in `stage0.txt`, and running
205+
# this on stable is useless.
206+
only_on_channel: nightly
203207
env:
204208
IMAGE: x86_64-gnu
205209
RUST_CI_OVERRIDE_RELEASE_CHANNEL: stable
206-
# Only run this job on the nightly channel. Running this on beta
207-
# could cause failures when `dev: 1` in `stage0.txt`, and running
208-
# this on stable is useless.
209-
CI_ONLY_WHEN_CHANNEL: nightly
210210
<<: *job-linux-4c
211211

212212
- image: x86_64-gnu-aux
213213
<<: *job-linux-4c
214214

215215
- image: x86_64-gnu-integration
216-
env:
217-
# Only run this job on the nightly channel. Fuchsia requires
218-
# nightly features to compile, and this job would fail if
219-
# executed on beta and stable.
220-
CI_ONLY_WHEN_CHANNEL: nightly
216+
# Only run this job on the nightly channel. Fuchsia requires
217+
# nightly features to compile, and this job would fail if
218+
# executed on beta and stable.
219+
only_on_channel: nightly
221220
<<: *job-linux-8c
222221

223222
- image: x86_64-gnu-debug

0 commit comments

Comments
 (0)