Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 52f39ff

Browse files
authoredMar 10, 2025
Merge pull request rust-lang#19331 from lnicola/sync-from-rust
minor: Sync from downstream
2 parents af32b22 + 1d983bf commit 52f39ff

File tree

1,544 files changed

+21901
-16954
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,544 files changed

+21901
-16954
lines changed
 

‎.github/workflows/ci.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ jobs:
5858
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
5959
run: |
6060
cd src/ci/citool
61-
cargo test
62-
cargo run calculate-job-matrix >> $GITHUB_OUTPUT
61+
CARGO_INCREMENTAL=0 cargo test
62+
CARGO_INCREMENTAL=0 cargo run calculate-job-matrix >> $GITHUB_OUTPUT
6363
id: jobs
6464
job:
6565
name: ${{ matrix.full_name }}
@@ -182,19 +182,12 @@ jobs:
182182
- name: show the current environment
183183
run: src/ci/scripts/dump-environment.sh
184184

185-
# Temporary fix to unblock CI
186-
# Remove the latest Windows SDK for 32-bit Windows MSVC builds.
187-
# See issue https://github.com/rust-lang/rust/issues/137733 for more details.
188-
- name: Remove Windows SDK 10.0.26100.0
189-
shell: powershell
190-
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
191188
run: |
192-
$kits = (Get-ItemProperty -path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots').KitsRoot10
193-
$sdk_version = "10.0.26100.0"
194-
195-
foreach ($kind in 'Bin', 'Lib', 'Include') {
196-
Remove-Item -Force -Recurse $kits\$kind\$sdk_version -ErrorAction Continue
197-
}
189+
cd src/ci/citool
190+
CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=../../../build/citool cargo build
198191
199192
- name: run the build
200193
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
@@ -232,16 +225,22 @@ jobs:
232225
# erroring about invalid credentials instead.
233226
if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
234227

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+
235238
- name: upload job metrics to DataDog
236239
if: needs.calculate_matrix.outputs.run_type != 'pr'
237240
env:
238-
DATADOG_SITE: datadoghq.com
239241
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
240242
DD_GITHUB_JOB_NAME: ${{ matrix.full_name }}
241-
run: |
242-
cd src/ci
243-
npm ci
244-
python3 scripts/upload-build-metrics.py ../../build/cpu-usage.csv
243+
run: ./build/citool/debug/citool upload-build-metrics build/cpu-usage.csv
245244

246245
# This job isused to tell bors the final status of the build, as there is no practical way to detect
247246
# when a workflow is successful listening to webhooks only in our current bors implementation (homu).

‎.github/workflows/post-merge.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Workflow that runs after a merge to master, analyses changes in test executions
2+
# and posts the result to the merged PR.
3+
4+
name: Post merge analysis
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
analysis:
13+
runs-on: ubuntu-24.04
14+
if: github.repository == 'rust-lang/rust'
15+
permissions:
16+
pull-requests: write
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Perform analysis and send PR
20+
run: |
21+
# Get closest bors merge commit
22+
PARENT_COMMIT=`git rev-list --author='bors <bors@rust-lang.org>' -n1 --first-parent HEAD^1`
23+
24+
# Find PR for the current commit
25+
HEAD_PR=`gh pr list --search "${{ github.sha }}" --state merged --json number --jq '.[0].number'`
26+
27+
echo "Parent: ${PARENT_COMMIT}"
28+
echo "HEAD: ${{ github.sha }} (#${HEAD_PR})"
29+
30+
cd src/ci/citool
31+
32+
echo "Post-merge analysis result" > output.log
33+
cargo run --release post-merge-analysis ${PARENT_COMMIT} ${{ github.sha }} >> output.log
34+
cat output.log
35+
36+
gh pr comment ${HEAD_PR} -F output.log

0 commit comments

Comments
 (0)