File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,21 @@ def format_run_type(run_type: WorkflowRunType) -> str:
176176 raise AssertionError ()
177177
178178
179+ # Add new function before main:
180+ def substitute_github_vars (jobs : list ) -> list :
181+ """Replace GitHub context variables with environment variables in job configs."""
182+ for job in jobs :
183+ if "os" in job :
184+ job ["os" ] = job ["os" ].replace (
185+ "${{ github.run_id }}" ,
186+ os .environ ["GITHUB_RUN_ID" ]
187+ ).replace (
188+ "${{ github.run_attempt }}" ,
189+ os .environ ["GITHUB_RUN_ATTEMPT" ]
190+ )
191+ return jobs
192+
193+
179194if __name__ == "__main__" :
180195 logging .basicConfig (level = logging .INFO )
181196
@@ -195,6 +210,7 @@ def format_run_type(run_type: WorkflowRunType) -> str:
195210 jobs = calculate_jobs (run_type , data )
196211 jobs = skip_jobs (jobs , channel )
197212
213+
198214 if not jobs :
199215 raise Exception ("Scheduled job list is empty, this is an error" )
200216
Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ runners:
4646 - &job-aarch64-linux
4747 os : ubuntu-22.04-arm64-8core-32gb
4848
49+ - &job-linux-4c-codebuild
50+ os : codebuild-ubuntu-24-4c-${{ github.run_id }}-${{ github.run_attempt }}
51+ << : *base-job
52+
4953envs :
5054 env-x86_64-apple-tests : &env-x86_64-apple-tests
5155 SCRIPT : ./x.py --stage 2 test --skip tests/ui --skip tests/rustdoc -- --exact
@@ -237,7 +241,7 @@ auto:
237241 << : *job-linux-4c
238242
239243 - image : x86_64-gnu
240- << : *job-linux-4c
244+ << : *job-linux-4c-codebuild
241245
242246 # This job ensures commits landing on nightly still pass the full
243247 # test suite on the stable channel. There are some UI tests that
You can’t perform that action at this time.
0 commit comments