Skip to content

Commit

Permalink
Auto merge of rust-lang#133912 - MarcoIeni:test-codebuild-runner, r=<…
Browse files Browse the repository at this point in the history
…try>

[experiment] test code build runner

try-job: x86_64-gnu
  • Loading branch information
bors committed Dec 5, 2024
2 parents 0e98766 + efb9f71 commit 96988fe
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
16 changes: 16 additions & 0 deletions src/ci/github-actions/calculate-job-matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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")

Expand Down
6 changes: 5 additions & 1 deletion src/ci/github-actions/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 96988fe

Please sign in to comment.