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,15 @@ 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
- defaults :
66
- run :
67
- shell : ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}
68
65
timeout-minutes : 360
69
66
env :
70
- CI_JOB_NAME : ${{ matrix.image }}
67
+ CI_JOB_NAME : ${{ matrix.name }}
71
68
CARGO_REGISTRIES_CRATES_IO_PROTOCOL : sparse
72
69
# commit of PR sha or commit sha. `GITHUB_SHA` is not accurate for PRs.
73
70
HEAD_SHA : ${{ github.event.pull_request.head.sha || github.sha }}
80
77
# Check the `calculate_matrix` job to see how is the matrix defined.
81
78
include : ${{ fromJSON(needs.calculate_matrix.outputs.jobs) }}
82
79
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
-
99
80
- name : disable git crlf conversion
100
81
run : git config --global core.autocrlf false
101
82
109
90
# intensive jobs to run on free runners, which however also have
110
91
# less disk space.
111
92
- name : free up disk space
112
- uses : jlumbroso/ free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
93
+ run : src/ci/scripts/ free-disk-space.sh
113
94
if : matrix.free_disk
114
95
115
96
# Rust Log Analyzer can't currently detect the PR number of a GitHub
@@ -233,16 +214,17 @@ jobs:
233
214
env :
234
215
DATADOG_SITE : datadoghq.com
235
216
DATADOG_API_KEY : ${{ secrets.DATADOG_API_KEY }}
236
- DD_GITHUB_JOB_NAME : ${{ matrix.name }}
217
+ DD_GITHUB_JOB_NAME : ${{ matrix.full_name }}
237
218
run : |
238
- npm install -g @datadog/datadog-ci@^2.x.x
239
- python3 src/ci/scripts/upload-build-metrics.py build/cpu-usage.csv
219
+ cd src/ci
220
+ npm ci
221
+ python3 scripts/upload-build-metrics.py ../../build/cpu-usage.csv
240
222
241
223
# This job isused to tell bors the final status of the build, as there is no practical way to detect
242
224
# when a workflow is successful listening to webhooks only in our current bors implementation (homu).
243
225
outcome :
244
226
name : bors build finished
245
- runs-on : ubuntu-latest
227
+ runs-on : ubuntu-24.04
246
228
needs : [ calculate_matrix, job ]
247
229
# !cancelled() executes the job regardless of whether the previous jobs passed or failed
248
230
if : ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
0 commit comments