Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d71ca93

Browse files
committedMar 10, 2025·
Merge branch 'master' into slice_chunkby_clone
2 parents e61f64d + 2b285cd commit d71ca93

File tree

1,311 files changed

+15693
-15341
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,311 files changed

+15693
-15341
lines changed
 

‎.github/workflows/ci.yml

+20-7
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,6 +182,13 @@ jobs:
182182
- name: show the current environment
183183
run: src/ci/scripts/dump-environment.sh
184184

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+
run: |
189+
cd src/ci/citool
190+
CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=../../../build/citool cargo build
191+
185192
- name: run the build
186193
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
187194
run: src/ci/scripts/run-build-from-ci.sh 2>&1
@@ -218,16 +225,22 @@ jobs:
218225
# erroring about invalid credentials instead.
219226
if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
220227

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+
221238
- name: upload job metrics to DataDog
222239
if: needs.calculate_matrix.outputs.run_type != 'pr'
223240
env:
224-
DATADOG_SITE: datadoghq.com
225241
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
226242
DD_GITHUB_JOB_NAME: ${{ matrix.full_name }}
227-
run: |
228-
cd src/ci
229-
npm ci
230-
python3 scripts/upload-build-metrics.py ../../build/cpu-usage.csv
243+
run: ./build/citool/debug/citool upload-build-metrics build/cpu-usage.csv
231244

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

‎.github/workflows/post-merge.yml

+36
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)