2
2
# and also on pushes to special branches (auto, try).
3
3
#
4
4
# 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
6
6
# uses job definition data from src/ci/github-actions/jobs.yml.
7
7
# You should primarily modify the `jobs.yml` file if you want to modify
8
8
# what jobs are executed in CI.
46
46
# If you want to modify CI jobs, take a look at src/ci/github-actions/jobs.yml.
47
47
calculate_matrix :
48
48
name : Calculate job matrix
49
- runs-on : ubuntu-latest
49
+ runs-on : ubuntu-24.04
50
50
outputs :
51
51
jobs : ${{ steps.jobs.outputs.jobs }}
52
52
run_type : ${{ steps.jobs.outputs.run_type }}
@@ -56,18 +56,18 @@ jobs:
56
56
- name : Calculate the CI job matrix
57
57
env :
58
58
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
60
60
id : jobs
61
61
job :
62
- name : ${{ matrix.name }}
62
+ name : ${{ matrix.full_name }}
63
63
needs : [ calculate_matrix ]
64
64
runs-on : " ${{ matrix.os }}"
65
65
defaults :
66
66
run :
67
67
shell : ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}
68
- timeout-minutes : 240
68
+ timeout-minutes : 360
69
69
env :
70
- CI_JOB_NAME : ${{ matrix.image }}
70
+ CI_JOB_NAME : ${{ matrix.name }}
71
71
CARGO_REGISTRIES_CRATES_IO_PROTOCOL : sparse
72
72
# commit of PR sha or commit sha. `GITHUB_SHA` is not accurate for PRs.
73
73
HEAD_SHA : ${{ github.event.pull_request.head.sha || github.sha }}
@@ -104,6 +104,14 @@ jobs:
104
104
with :
105
105
fetch-depth : 2
106
106
107
+ # Free up disk space on Linux by removing preinstalled components that
108
+ # we do not need. We do this to enable some of the less resource
109
+ # intensive jobs to run on free runners, which however also have
110
+ # less disk space.
111
+ - name : free up disk space
112
+ uses : jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
113
+ if : matrix.free_disk
114
+
107
115
# Rust Log Analyzer can't currently detect the PR number of a GitHub
108
116
# Actions build on its own, so a hint in the log message is needed to
109
117
# point it in the right direction.
@@ -122,6 +130,9 @@ jobs:
122
130
# which then uses log commands to actually set them.
123
131
EXTRA_VARIABLES : ${{ toJson(matrix.env) }}
124
132
133
+ - name : setup upstream remote
134
+ run : src/ci/scripts/setup-upstream-remote.sh
135
+
125
136
- name : ensure the channel matches the target branch
126
137
run : src/ci/scripts/verify-channel.sh
127
138
@@ -191,6 +202,11 @@ jobs:
191
202
- name : create github artifacts
192
203
run : src/ci/scripts/create-doc-artifacts.sh
193
204
205
+ - name : print disk usage
206
+ run : |
207
+ echo "disk usage:"
208
+ df -h
209
+
194
210
- name : upload artifacts to github
195
211
uses : actions/upload-artifact@v4
196
212
with :
@@ -217,16 +233,17 @@ jobs:
217
233
env :
218
234
DATADOG_SITE : datadoghq.com
219
235
DATADOG_API_KEY : ${{ secrets.DATADOG_API_KEY }}
220
- DD_GITHUB_JOB_NAME : ${{ matrix.name }}
236
+ DD_GITHUB_JOB_NAME : ${{ matrix.full_name }}
221
237
run : |
222
- npm install -g @datadog/datadog-ci@^2.x.x
223
- python3 src/ci/scripts/upload-build-metrics.py build/cpu-usage.csv
238
+ cd src/ci
239
+ npm ci
240
+ python3 scripts/upload-build-metrics.py ../../build/cpu-usage.csv
224
241
225
242
# This job isused to tell bors the final status of the build, as there is no practical way to detect
226
243
# when a workflow is successful listening to webhooks only in our current bors implementation (homu).
227
244
outcome :
228
245
name : bors build finished
229
- runs-on : ubuntu-latest
246
+ runs-on : ubuntu-24.04
230
247
needs : [ calculate_matrix, job ]
231
248
# !cancelled() executes the job regardless of whether the previous jobs passed or failed
232
249
if : ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
0 commit comments