From d0835dc7aa2ea6885798170302ea33de57af9e15 Mon Sep 17 00:00:00 2001 From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> Date: Thu, 5 Dec 2024 13:05:14 +0100 Subject: [PATCH 1/2] [experiment] test code build runner --- src/ci/github-actions/jobs.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index 2ea37c168dd3c..6bb7e2230d0fd 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -46,6 +46,10 @@ runners: - &job-aarch64-linux os: ubuntu-22.04-arm64-8core-32gb + - &job-linux-4c-codebuild + os: codebuild-ubuntu-24-4c-${{ github.run_id }}-${{ github.run_attempt }} + <<: *base-job + envs: env-x86_64-apple-tests: &env-x86_64-apple-tests SCRIPT: ./x.py --stage 2 test --skip tests/ui --skip tests/rustdoc -- --exact @@ -237,7 +241,7 @@ auto: <<: *job-linux-4c - image: x86_64-gnu - <<: *job-linux-4c + <<: *job-linux-4c-codebuild # This job ensures commits landing on nightly still pass the full # test suite on the stable channel. There are some UI tests that From efb9f7135f7f2fbd731c8de2e41944c9ad434b2f Mon Sep 17 00:00:00 2001 From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> Date: Thu, 5 Dec 2024 15:28:03 +0100 Subject: [PATCH 2/2] fix python script --- src/ci/github-actions/calculate-job-matrix.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/ci/github-actions/calculate-job-matrix.py b/src/ci/github-actions/calculate-job-matrix.py index 7de6d5fcd5f75..faa6da7243c01 100755 --- a/src/ci/github-actions/calculate-job-matrix.py +++ b/src/ci/github-actions/calculate-job-matrix.py @@ -176,6 +176,21 @@ def format_run_type(run_type: WorkflowRunType) -> str: raise AssertionError() +# Add new function before main: +def substitute_github_vars(jobs: list) -> list: + """Replace GitHub context variables with environment variables in job configs.""" + for job in jobs: + if "os" in job: + job["os"] = job["os"].replace( + "${{ github.run_id }}", + os.environ["GITHUB_RUN_ID"] + ).replace( + "${{ github.run_attempt }}", + os.environ["GITHUB_RUN_ATTEMPT"] + ) + return jobs + + if __name__ == "__main__": logging.basicConfig(level=logging.INFO) @@ -195,6 +210,7 @@ def format_run_type(run_type: WorkflowRunType) -> str: 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")