Skip to content

Commit 9fae9f4

Browse files
authored
Merge branch 'master' into Support-more-suggestions-in-template-for-bad-attribute-use-#61288
2 parents 0f5bfcb + 48ef38d commit 9fae9f4

File tree

17,632 files changed

+870261
-281447
lines changed

Some content is hidden

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

17,632 files changed

+870261
-281447
lines changed

.git-blame-ignore-revs

+4
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ b2d2184edea578109a48ec3d8decbee5948e8f35
2525
ec2cc761bc7067712ecc7734502f703fe3b024c8
2626
# format use declarations
2727
84ac80f1921afc243d71fd0caaa4f2838c294102
28+
# bless mir-opt tests to add `copy`
29+
99cb0c6bc399fb94a0ddde7e9b38e9c00d523bad
30+
# reformat with rustfmt edition 2024
31+
c682aa162b0d41e21cc6748f4fecfe01efb69d1f

.github/ISSUE_TEMPLATE/blank_issue.md

-4
This file was deleted.

.github/ISSUE_TEMPLATE/bootstrap.md

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
name: Bootstrap (Rust Build System) Report
3+
about: Issues encountered on bootstrap build system
4+
labels: C-bug, T-bootstrap
5+
---
6+
7+
<!--
8+
Thank you for submitting a bootstrap report! Please provide detailed information to help us reproduce and diagnose the issue.
9+
-->
10+
11+
### Summary
12+
13+
<!--
14+
Provide a brief description of the problem you are experiencing.
15+
-->
16+
17+
### Command used
18+
19+
```sh
20+
<command>
21+
```
22+
23+
### Expected behaviour
24+
25+
<!--
26+
Describe what you expected to happen.
27+
-->
28+
29+
### Actual behaviour
30+
31+
<!--
32+
Describe what actually happened.
33+
-->
34+
35+
### Bootstrap configuration (config.toml)
36+
```toml
37+
<config>
38+
```
39+
40+
### Operating system
41+
42+
<!--
43+
e.g., Ubuntu 22.04, macOS 12, Windows 10
44+
-->
45+
46+
### HEAD
47+
48+
<!--
49+
Output of `git rev-parse HEAD` command, or content of the `git-commit-hash` file if using a tarball source.
50+
-->
51+
52+
### Additional context
53+
<!--
54+
Include any other relevant information (e.g., if you have custom patches or modifications on the project).
55+
-->
56+
57+
58+
<!--
59+
Include the complete build log in the section below.
60+
Enable backtrace and verbose mode if possible for more detailed information e.g., with `RUST_BACKTRACE=1 ./x build -v`.
61+
-->
62+
<details><summary>Build Log</summary>
63+
<p>
64+
65+
```txt
66+
<log>
67+
```
68+
69+
</p>
70+
</details>

.github/ISSUE_TEMPLATE/tracking_issue.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ for larger features an implementation could be broken up into multiple PRs.
4646

4747
[stabilization-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#stabilization-pr
4848
[doc-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#documentation-prs
49-
[nightly-style-procedure]: https://github.com/rust-lang/style-team/blob/master/nightly-style-procedure.md
49+
[nightly-style-procedure]: https://github.com/rust-lang/style-team/blob/main/nightly-style-procedure.md
5050
[Style Guide]: https://github.com/rust-lang/rust/tree/master/src/doc/style-guide
5151

5252
### Unresolved Questions

.github/pull_request_template.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ tracking issue or there are none, feel free to ignore this.
77
This PR will get automatically assigned to a reviewer. In case you would like
88
a specific user to review your work, you can assign it to them by using
99
10-
r? <reviewer name>
10+
r? <reviewer name>
1111
-->
1212
<!-- homu-ignore:end -->

.github/renovate.json5

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
// Let Renovatebot keep an opened issue that tracks our dependencies
4+
"dependencyDashboard": true,
5+
// Disable "normal" package updates
6+
"enabledManagers": [],
7+
// Update lockfiles once per week
8+
"lockFileMaintenance": {
9+
"enabled": true,
10+
"schedule": [
11+
"before 5am on Tuesday"
12+
]
13+
}
14+
}

.github/workflows/ci.yml

+34-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# and also on pushes to special branches (auto, try).
33
#
44
# 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
66
# uses job definition data from src/ci/github-actions/jobs.yml.
77
# You should primarily modify the `jobs.yml` file if you want to modify
88
# what jobs are executed in CI.
@@ -46,7 +46,7 @@ jobs:
4646
# If you want to modify CI jobs, take a look at src/ci/github-actions/jobs.yml.
4747
calculate_matrix:
4848
name: Calculate job matrix
49-
runs-on: ubuntu-latest
49+
runs-on: ubuntu-24.04
5050
outputs:
5151
jobs: ${{ steps.jobs.outputs.jobs }}
5252
run_type: ${{ steps.jobs.outputs.run_type }}
@@ -56,18 +56,18 @@ jobs:
5656
- name: Calculate the CI job matrix
5757
env:
5858
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
6060
id: jobs
6161
job:
62-
name: ${{ matrix.name }}
62+
name: ${{ matrix.full_name }}
6363
needs: [ calculate_matrix ]
6464
runs-on: "${{ matrix.os }}"
6565
defaults:
6666
run:
6767
shell: ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}
68-
timeout-minutes: 240
68+
timeout-minutes: 360
6969
env:
70-
CI_JOB_NAME: ${{ matrix.image }}
70+
CI_JOB_NAME: ${{ matrix.name }}
7171
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
7272
# commit of PR sha or commit sha. `GITHUB_SHA` is not accurate for PRs.
7373
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
@@ -104,6 +104,14 @@ jobs:
104104
with:
105105
fetch-depth: 2
106106

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+
run: src/ci/scripts/free-disk-space.sh
113+
if: matrix.free_disk
114+
107115
# Rust Log Analyzer can't currently detect the PR number of a GitHub
108116
# Actions build on its own, so a hint in the log message is needed to
109117
# point it in the right direction.
@@ -122,6 +130,9 @@ jobs:
122130
# which then uses log commands to actually set them.
123131
EXTRA_VARIABLES: ${{ toJson(matrix.env) }}
124132

133+
- name: setup upstream remote
134+
run: src/ci/scripts/setup-upstream-remote.sh
135+
125136
- name: ensure the channel matches the target branch
126137
run: src/ci/scripts/verify-channel.sh
127138

@@ -191,6 +202,11 @@ jobs:
191202
- name: create github artifacts
192203
run: src/ci/scripts/create-doc-artifacts.sh
193204

205+
- name: print disk usage
206+
run: |
207+
echo "disk usage:"
208+
df -h
209+
194210
- name: upload artifacts to github
195211
uses: actions/upload-artifact@v4
196212
with:
@@ -212,11 +228,22 @@ jobs:
212228
# erroring about invalid credentials instead.
213229
if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
214230

231+
- name: upload job metrics to DataDog
232+
if: needs.calculate_matrix.outputs.run_type != 'pr'
233+
env:
234+
DATADOG_SITE: datadoghq.com
235+
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
236+
DD_GITHUB_JOB_NAME: ${{ matrix.full_name }}
237+
run: |
238+
cd src/ci
239+
npm ci
240+
python3 scripts/upload-build-metrics.py ../../build/cpu-usage.csv
241+
215242
# This job isused to tell bors the final status of the build, as there is no practical way to detect
216243
# when a workflow is successful listening to webhooks only in our current bors implementation (homu).
217244
outcome:
218245
name: bors build finished
219-
runs-on: ubuntu-latest
246+
runs-on: ubuntu-24.04
220247
needs: [ calculate_matrix, job ]
221248
# !cancelled() executes the job regardless of whether the previous jobs passed or failed
222249
if: ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}

.github/workflows/dependencies.yml

+14-7
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
not-waiting-on-bors:
2828
if: github.repository_owner == 'rust-lang'
2929
name: skip if S-waiting-on-bors
30-
runs-on: ubuntu-latest
30+
runs-on: ubuntu-24.04
3131
steps:
3232
- env:
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -47,7 +47,7 @@ jobs:
4747
if: github.repository_owner == 'rust-lang'
4848
name: update dependencies
4949
needs: not-waiting-on-bors
50-
runs-on: ubuntu-latest
50+
runs-on: ubuntu-24.04
5151
steps:
5252
- name: checkout the source code
5353
uses: actions/checkout@v4
@@ -61,19 +61,26 @@ jobs:
6161
rustup toolchain install --no-self-update --profile minimal $TOOLCHAIN
6262
rustup default $TOOLCHAIN
6363
64-
- name: cargo update
64+
- name: cargo update compiler & tools
6565
# Remove first line that always just says "Updating crates.io index"
66-
run: cargo update 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
66+
run: |
67+
echo -e "\ncompiler & tools dependencies:" >> cargo_update.log
68+
cargo update 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
69+
- name: cargo update library
70+
run: |
71+
echo -e "\nlibrary dependencies:" >> cargo_update.log
72+
cargo update --manifest-path library/Cargo.toml 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
6773
- name: cargo update rustbook
6874
run: |
6975
echo -e "\nrustbook dependencies:" >> cargo_update.log
70-
cargo update --manifest-path src/tools/rustbook 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
76+
cargo update --manifest-path src/tools/rustbook/Cargo.toml 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
7177
- name: upload Cargo.lock artifact for use in PR
7278
uses: actions/upload-artifact@v4
7379
with:
7480
name: Cargo-lock
7581
path: |
7682
Cargo.lock
83+
library/Cargo.lock
7784
src/tools/rustbook/Cargo.lock
7885
retention-days: 1
7986
- name: upload cargo-update log artifact for use in PR
@@ -87,7 +94,7 @@ jobs:
8794
if: github.repository_owner == 'rust-lang'
8895
name: amend PR
8996
needs: update
90-
runs-on: ubuntu-latest
97+
runs-on: ubuntu-24.04
9198
permissions:
9299
contents: write
93100
pull-requests: write
@@ -119,7 +126,7 @@ jobs:
119126
git config user.name github-actions
120127
git config user.email github-actions@github.com
121128
git switch --force-create cargo_update
122-
git add ./Cargo.lock ./src/tools/rustbook/Cargo.lock
129+
git add ./Cargo.lock ./library/Cargo.lock ./src/tools/rustbook/Cargo.lock
123130
git commit --no-verify --file=commit.txt
124131
125132
- name: push

.github/workflows/ghcr.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Mirror DockerHub images used by the Rust project to ghcr.io.
2+
# Images are available at https://github.com/orgs/rust-lang/packages.
3+
#
4+
# In some CI jobs, we pull images from ghcr.io instead of Docker Hub because
5+
# Docker Hub has a rate limit, while ghcr.io doesn't.
6+
# Those images are pushed to ghcr.io by this job.
7+
#
8+
# Note that authenticating to DockerHub or other registries isn't possible
9+
# for PR jobs, because forks can't access secrets.
10+
# That's why we use ghcr.io: it has no rate limit and it doesn't require authentication.
11+
12+
name: GHCR image mirroring
13+
14+
on:
15+
workflow_dispatch:
16+
schedule:
17+
# Run daily at midnight UTC
18+
- cron: '0 0 * * *'
19+
20+
jobs:
21+
mirror:
22+
name: DockerHub mirror
23+
runs-on: ubuntu-24.04
24+
if: github.repository == 'rust-lang/rust'
25+
permissions:
26+
# Needed to write to the ghcr.io registry
27+
packages: write
28+
steps:
29+
- uses: actions/checkout@v4
30+
with:
31+
persist-credentials: false
32+
33+
- name: Log in to registry
34+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
35+
36+
# Download crane in the current directory.
37+
# We use crane because it copies the docker image for all the architectures available in
38+
# DockerHub for the image.
39+
# Learn more about crane at
40+
# https://github.com/google/go-containerregistry/blob/main/cmd/crane/README.md
41+
- name: Download crane
42+
run: |
43+
curl -sL "https://github.com/google/go-containerregistry/releases/download/${VERSION}/go-containerregistry_${OS}_${ARCH}.tar.gz" | tar -xzf -
44+
env:
45+
VERSION: v0.20.2
46+
OS: Linux
47+
ARCH: x86_64
48+
49+
- name: Mirror DockerHub
50+
run: |
51+
# List of DockerHub images to mirror to ghcr.io
52+
images=(
53+
# Mirrored because used by the mingw-check-tidy, which doesn't cache Docker images
54+
"ubuntu:22.04"
55+
# Mirrored because used by all linux CI jobs, including mingw-check-tidy
56+
"moby/buildkit:buildx-stable-1"
57+
)
58+
59+
# Mirror each image from DockerHub to ghcr.io
60+
for img in "${images[@]}"; do
61+
echo "Mirroring ${img}..."
62+
# Remove namespace from the image if any.
63+
# E.g. "moby/buildkit:buildx-stable-1" becomes "buildkit:buildx-stable-1"
64+
dest_image=$(echo "${img}" | cut -d'/' -f2-)
65+
./crane copy \
66+
"docker.io/${img}" \
67+
"ghcr.io/${{ github.repository_owner }}/${dest_image}"
68+
done

0 commit comments

Comments
 (0)