Skip to content

Commit 1e0204b

Browse files
committed
Merge from rustc
2 parents 808bd95 + ecda83b commit 1e0204b

File tree

1,586 files changed

+30606
-18454
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,586 files changed

+30606
-18454
lines changed

.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/workflows/ci.yml

+5-5
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.
@@ -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' }}
6868
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 }}
@@ -233,7 +233,7 @@ jobs:
233233
env:
234234
DATADOG_SITE: datadoghq.com
235235
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
236-
DD_GITHUB_JOB_NAME: ${{ matrix.name }}
236+
DD_GITHUB_JOB_NAME: ${{ matrix.full_name }}
237237
run: |
238238
cd src/ci
239239
npm ci

.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)