22# and also on pushes to special branches (auto, try).
33#
44# The actual definition of the executed jobs is calculated by a Python
5- # script located at src/ci/github-actions/calculate-job-matrix .py, which
5+ # script located at src/ci/github-actions/ci .py, which
66# uses job definition data from src/ci/github-actions/jobs.yml.
77# You should primarily modify the `jobs.yml` file if you want to modify
88# what jobs are executed in CI.
4646 # If you want to modify CI jobs, take a look at src/ci/github-actions/jobs.yml.
4747 calculate_matrix :
4848 name : Calculate job matrix
49- runs-on : ubuntu-latest
49+ runs-on : ubuntu-24.04
5050 outputs :
5151 jobs : ${{ steps.jobs.outputs.jobs }}
5252 run_type : ${{ steps.jobs.outputs.run_type }}
@@ -56,46 +56,28 @@ jobs:
5656 - name : Calculate the CI job matrix
5757 env :
5858 COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
59- run : python3 src/ci/github-actions/calculate-job-matrix.py >> $GITHUB_OUTPUT
59+ run : python3 src/ci/github-actions/ci.py calculate-job-matrix >> $GITHUB_OUTPUT
6060 id : jobs
6161 job :
62- name : ${{ matrix.name }}
62+ name : ${{ matrix.full_name }}
6363 needs : [ calculate_matrix ]
6464 runs-on : " ${{ matrix.os }}"
65- defaults :
66- run :
67- shell : ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}
68- timeout-minutes : 240
65+ timeout-minutes : 360
6966 env :
70- CI_JOB_NAME : ${{ matrix.image }}
67+ CI_JOB_NAME : ${{ matrix.name }}
7168 CARGO_REGISTRIES_CRATES_IO_PROTOCOL : sparse
7269 # commit of PR sha or commit sha. `GITHUB_SHA` is not accurate for PRs.
7370 HEAD_SHA : ${{ github.event.pull_request.head.sha || github.sha }}
7471 DOCKER_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7572 SCCACHE_BUCKET : rust-lang-ci-sccache2
73+ SCCACHE_REGION : us-west-1
7674 CACHE_DOMAIN : ci-caches.rust-lang.org
7775 continue-on-error : ${{ matrix.continue_on_error || false }}
7876 strategy :
7977 matrix :
8078 # Check the `calculate_matrix` job to see how is the matrix defined.
8179 include : ${{ fromJSON(needs.calculate_matrix.outputs.jobs) }}
8280 steps :
83- - if : contains(matrix.os, 'windows')
84- 85- with :
86- # i686 jobs use mingw32. x86_64 and cross-compile jobs use mingw64.
87- msystem : ${{ contains(matrix.name, 'i686') && 'mingw32' || 'mingw64' }}
88- # don't try to download updates for already installed packages
89- update : false
90- # don't try to use the msys that comes built-in to the github runner,
91- # so we can control what is installed (i.e. not python)
92- release : true
93- # Inherit the full path from the Windows environment, with MSYS2's */bin/
94- # dirs placed in front. This lets us run Windows-native Python etc.
95- path-type : inherit
96- install : >
97- make
98-
9981 - name : disable git crlf conversion
10082 run : git config --global core.autocrlf false
10183
@@ -109,12 +91,8 @@ jobs:
10991 # intensive jobs to run on free runners, which however also have
11092 # less disk space.
11193 - name : free up disk space
112- uses : jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
113- if : contains(matrix.os, 'ubuntu')
114- with :
115- # Removing packages with APT saves ~5 GiB, but takes several
116- # minutes (and potentially removes important packages).
117- large-packages : false
94+ run : src/ci/scripts/free-disk-space.sh
95+ if : matrix.free_disk
11896
11997 # Rust Log Analyzer can't currently detect the PR number of a GitHub
12098 # Actions build on its own, so a hint in the log message is needed to
@@ -196,6 +174,11 @@ jobs:
196174 - name : ensure the stable version number is correct
197175 run : src/ci/scripts/verify-stable-version-number.sh
198176
177+ # Show the environment just before we run the build
178+ # This makes it easier to diagnose problems with the above install scripts.
179+ - name : show the current environment
180+ run : src/ci/scripts/dump-environment.sh
181+
199182 - name : run the build
200183 # Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
201184 run : src/ci/scripts/run-build-from-ci.sh 2>&1
@@ -237,16 +220,17 @@ jobs:
237220 env :
238221 DATADOG_SITE : datadoghq.com
239222 DATADOG_API_KEY : ${{ secrets.DATADOG_API_KEY }}
240- DD_GITHUB_JOB_NAME : ${{ matrix.name }}
223+ DD_GITHUB_JOB_NAME : ${{ matrix.full_name }}
241224 run : |
242- npm install -g @datadog/datadog-ci@^2.x.x
243- python3 src/ci/scripts/upload-build-metrics.py build/cpu-usage.csv
225+ cd src/ci
226+ npm ci
227+ python3 scripts/upload-build-metrics.py ../../build/cpu-usage.csv
244228
245229 # This job isused to tell bors the final status of the build, as there is no practical way to detect
246230 # when a workflow is successful listening to webhooks only in our current bors implementation (homu).
247231 outcome :
248232 name : bors build finished
249- runs-on : ubuntu-latest
233+ runs-on : ubuntu-24.04
250234 needs : [ calculate_matrix, job ]
251235 # !cancelled() executes the job regardless of whether the previous jobs passed or failed
252236 if : ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
0 commit comments