|
1 | 1 | # This file defines our primary CI workflow that runs on pull requests
|
2 | 2 | # and also on pushes to special branches (auto, try).
|
3 | 3 | #
|
4 |
| -# The actual definition of the executed jobs is calculated by a Python |
5 |
| -# script located at src/ci/github-actions/ci.py, which |
| 4 | +# The actual definition of the executed jobs is calculated by the |
| 5 | +# `src/ci/citool` crate, 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.
|
|
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/ci.py calculate-job-matrix >> $GITHUB_OUTPUT |
| 59 | + run: | |
| 60 | + cd src/ci/citool |
| 61 | + CARGO_INCREMENTAL=0 cargo test |
| 62 | + CARGO_INCREMENTAL=0 cargo run calculate-job-matrix >> $GITHUB_OUTPUT |
60 | 63 | id: jobs
|
61 | 64 | job:
|
62 | 65 | name: ${{ matrix.full_name }}
|
@@ -179,19 +182,12 @@ jobs:
|
179 | 182 | - name: show the current environment
|
180 | 183 | run: src/ci/scripts/dump-environment.sh
|
181 | 184 |
|
182 |
| - # Temporary fix to unblock CI |
183 |
| - # Remove the latest Windows SDK for 32-bit Windows MSVC builds. |
184 |
| - # See issue https://github.com/rust-lang/rust/issues/137733 for more details. |
185 |
| - - name: Remove Windows SDK 10.0.26100.0 |
186 |
| - shell: powershell |
187 |
| - if: ${{ matrix.name == 'i686-msvc-1' || matrix.name == 'i686-msvc-2' || matrix.name == 'dist-i686-msvc' }} |
| 185 | + # Pre-build citool before the following step uninstalls rustup |
| 186 | + # Build it into the build directory, to avoid modifying sources |
| 187 | + - name: build citool |
188 | 188 | run: |
|
189 |
| - $kits = (Get-ItemProperty -path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots').KitsRoot10 |
190 |
| - $sdk_version = "10.0.26100.0" |
191 |
| -
|
192 |
| - foreach ($kind in 'Bin', 'Lib', 'Include') { |
193 |
| - Remove-Item -Force -Recurse $kits\$kind\$sdk_version -ErrorAction Continue |
194 |
| - } |
| 189 | + cd src/ci/citool |
| 190 | + CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=../../../build/citool cargo build |
195 | 191 |
|
196 | 192 | - name: run the build
|
197 | 193 | # Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
|
@@ -229,16 +225,22 @@ jobs:
|
229 | 225 | # erroring about invalid credentials instead.
|
230 | 226 | if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
|
231 | 227 |
|
| 228 | + - name: postprocess metrics into the summary |
| 229 | + run: | |
| 230 | + if [ -f build/metrics.json ]; then |
| 231 | + ./build/citool/debug/citool postprocess-metrics build/metrics.json ${GITHUB_STEP_SUMMARY} |
| 232 | + elif [ -f obj/build/metrics.json ]; then |
| 233 | + ./build/citool/debug/citool postprocess-metrics obj/build/metrics.json ${GITHUB_STEP_SUMMARY} |
| 234 | + else |
| 235 | + echo "No metrics.json found" |
| 236 | + fi |
| 237 | +
|
232 | 238 | - name: upload job metrics to DataDog
|
233 | 239 | if: needs.calculate_matrix.outputs.run_type != 'pr'
|
234 | 240 | env:
|
235 |
| - DATADOG_SITE: datadoghq.com |
236 | 241 | DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
|
237 | 242 | DD_GITHUB_JOB_NAME: ${{ matrix.full_name }}
|
238 |
| - run: | |
239 |
| - cd src/ci |
240 |
| - npm ci |
241 |
| - python3 scripts/upload-build-metrics.py ../../build/cpu-usage.csv |
| 243 | + run: ./build/citool/debug/citool upload-build-metrics build/cpu-usage.csv |
242 | 244 |
|
243 | 245 | # This job isused to tell bors the final status of the build, as there is no practical way to detect
|
244 | 246 | # when a workflow is successful listening to webhooks only in our current bors implementation (homu).
|
|
0 commit comments