Skip to content

Commit

Permalink
Merge branch 'master' into Support-more-suggestions-in-template-for-b…
Browse files Browse the repository at this point in the history
…ad-attribute-use-#61288
  • Loading branch information
Blindspot22 authored Jan 24, 2025
2 parents 0f5bfcb + 48ef38d commit 9fae9f4
Show file tree
Hide file tree
Showing 17,632 changed files with 870,261 additions and 281,447 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ b2d2184edea578109a48ec3d8decbee5948e8f35
ec2cc761bc7067712ecc7734502f703fe3b024c8
# format use declarations
84ac80f1921afc243d71fd0caaa4f2838c294102
# bless mir-opt tests to add `copy`
99cb0c6bc399fb94a0ddde7e9b38e9c00d523bad
# reformat with rustfmt edition 2024
c682aa162b0d41e21cc6748f4fecfe01efb69d1f
4 changes: 0 additions & 4 deletions .github/ISSUE_TEMPLATE/blank_issue.md

This file was deleted.

70 changes: 70 additions & 0 deletions .github/ISSUE_TEMPLATE/bootstrap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
name: Bootstrap (Rust Build System) Report
about: Issues encountered on bootstrap build system
labels: C-bug, T-bootstrap
---

<!--
Thank you for submitting a bootstrap report! Please provide detailed information to help us reproduce and diagnose the issue.
-->

### Summary

<!--
Provide a brief description of the problem you are experiencing.
-->

### Command used

```sh
<command>
```

### Expected behaviour

<!--
Describe what you expected to happen.
-->

### Actual behaviour

<!--
Describe what actually happened.
-->

### Bootstrap configuration (config.toml)
```toml
<config>
```

### Operating system

<!--
e.g., Ubuntu 22.04, macOS 12, Windows 10
-->

### HEAD

<!--
Output of `git rev-parse HEAD` command, or content of the `git-commit-hash` file if using a tarball source.
-->

### Additional context
<!--
Include any other relevant information (e.g., if you have custom patches or modifications on the project).
-->


<!--
Include the complete build log in the section below.
Enable backtrace and verbose mode if possible for more detailed information e.g., with `RUST_BACKTRACE=1 ./x build -v`.
-->
<details><summary>Build Log</summary>
<p>

```txt
<log>
```

</p>
</details>
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/tracking_issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ for larger features an implementation could be broken up into multiple PRs.

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

### Unresolved Questions
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ tracking issue or there are none, feel free to ignore this.
This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using
r? <reviewer name>
r? <reviewer name>
-->
<!-- homu-ignore:end -->
14 changes: 14 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
// Let Renovatebot keep an opened issue that tracks our dependencies
"dependencyDashboard": true,
// Disable "normal" package updates
"enabledManagers": [],
// Update lockfiles once per week
"lockFileMaintenance": {
"enabled": true,
"schedule": [
"before 5am on Tuesday"
]
}
}
41 changes: 34 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# and also on pushes to special branches (auto, try).
#
# The actual definition of the executed jobs is calculated by a Python
# script located at src/ci/github-actions/calculate-job-matrix.py, which
# script located at src/ci/github-actions/ci.py, which
# uses job definition data from src/ci/github-actions/jobs.yml.
# You should primarily modify the `jobs.yml` file if you want to modify
# what jobs are executed in CI.
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
# If you want to modify CI jobs, take a look at src/ci/github-actions/jobs.yml.
calculate_matrix:
name: Calculate job matrix
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
outputs:
jobs: ${{ steps.jobs.outputs.jobs }}
run_type: ${{ steps.jobs.outputs.run_type }}
Expand All @@ -56,18 +56,18 @@ jobs:
- name: Calculate the CI job matrix
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: python3 src/ci/github-actions/calculate-job-matrix.py >> $GITHUB_OUTPUT
run: python3 src/ci/github-actions/ci.py calculate-job-matrix >> $GITHUB_OUTPUT
id: jobs
job:
name: ${{ matrix.name }}
name: ${{ matrix.full_name }}
needs: [ calculate_matrix ]
runs-on: "${{ matrix.os }}"
defaults:
run:
shell: ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}
timeout-minutes: 240
timeout-minutes: 360
env:
CI_JOB_NAME: ${{ matrix.image }}
CI_JOB_NAME: ${{ matrix.name }}
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
# commit of PR sha or commit sha. `GITHUB_SHA` is not accurate for PRs.
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
Expand Down Expand Up @@ -104,6 +104,14 @@ jobs:
with:
fetch-depth: 2

# Free up disk space on Linux by removing preinstalled components that
# we do not need. We do this to enable some of the less resource
# intensive jobs to run on free runners, which however also have
# less disk space.
- name: free up disk space
run: src/ci/scripts/free-disk-space.sh
if: matrix.free_disk

# Rust Log Analyzer can't currently detect the PR number of a GitHub
# Actions build on its own, so a hint in the log message is needed to
# point it in the right direction.
Expand All @@ -122,6 +130,9 @@ jobs:
# which then uses log commands to actually set them.
EXTRA_VARIABLES: ${{ toJson(matrix.env) }}

- name: setup upstream remote
run: src/ci/scripts/setup-upstream-remote.sh

- name: ensure the channel matches the target branch
run: src/ci/scripts/verify-channel.sh

Expand Down Expand Up @@ -191,6 +202,11 @@ jobs:
- name: create github artifacts
run: src/ci/scripts/create-doc-artifacts.sh

- name: print disk usage
run: |
echo "disk usage:"
df -h
- name: upload artifacts to github
uses: actions/upload-artifact@v4
with:
Expand All @@ -212,11 +228,22 @@ jobs:
# erroring about invalid credentials instead.
if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'

- name: upload job metrics to DataDog
if: needs.calculate_matrix.outputs.run_type != 'pr'
env:
DATADOG_SITE: datadoghq.com
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
DD_GITHUB_JOB_NAME: ${{ matrix.full_name }}
run: |
cd src/ci
npm ci
python3 scripts/upload-build-metrics.py ../../build/cpu-usage.csv
# This job isused to tell bors the final status of the build, as there is no practical way to detect
# when a workflow is successful listening to webhooks only in our current bors implementation (homu).
outcome:
name: bors build finished
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: [ calculate_matrix, job ]
# !cancelled() executes the job regardless of whether the previous jobs passed or failed
if: ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
not-waiting-on-bors:
if: github.repository_owner == 'rust-lang'
name: skip if S-waiting-on-bors
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -47,7 +47,7 @@ jobs:
if: github.repository_owner == 'rust-lang'
name: update dependencies
needs: not-waiting-on-bors
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: checkout the source code
uses: actions/checkout@v4
Expand All @@ -61,19 +61,26 @@ jobs:
rustup toolchain install --no-self-update --profile minimal $TOOLCHAIN
rustup default $TOOLCHAIN
- name: cargo update
- name: cargo update compiler & tools
# Remove first line that always just says "Updating crates.io index"
run: cargo update 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
run: |
echo -e "\ncompiler & tools dependencies:" >> cargo_update.log
cargo update 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
- name: cargo update library
run: |
echo -e "\nlibrary dependencies:" >> cargo_update.log
cargo update --manifest-path library/Cargo.toml 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
- name: cargo update rustbook
run: |
echo -e "\nrustbook dependencies:" >> cargo_update.log
cargo update --manifest-path src/tools/rustbook 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
cargo update --manifest-path src/tools/rustbook/Cargo.toml 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
- name: upload Cargo.lock artifact for use in PR
uses: actions/upload-artifact@v4
with:
name: Cargo-lock
path: |
Cargo.lock
library/Cargo.lock
src/tools/rustbook/Cargo.lock
retention-days: 1
- name: upload cargo-update log artifact for use in PR
Expand All @@ -87,7 +94,7 @@ jobs:
if: github.repository_owner == 'rust-lang'
name: amend PR
needs: update
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: write
pull-requests: write
Expand Down Expand Up @@ -119,7 +126,7 @@ jobs:
git config user.name github-actions
git config user.email [email protected]
git switch --force-create cargo_update
git add ./Cargo.lock ./src/tools/rustbook/Cargo.lock
git add ./Cargo.lock ./library/Cargo.lock ./src/tools/rustbook/Cargo.lock
git commit --no-verify --file=commit.txt
- name: push
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/ghcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Mirror DockerHub images used by the Rust project to ghcr.io.
# Images are available at https://github.com/orgs/rust-lang/packages.
#
# In some CI jobs, we pull images from ghcr.io instead of Docker Hub because
# Docker Hub has a rate limit, while ghcr.io doesn't.
# Those images are pushed to ghcr.io by this job.
#
# Note that authenticating to DockerHub or other registries isn't possible
# for PR jobs, because forks can't access secrets.
# That's why we use ghcr.io: it has no rate limit and it doesn't require authentication.

name: GHCR image mirroring

on:
workflow_dispatch:
schedule:
# Run daily at midnight UTC
- cron: '0 0 * * *'

jobs:
mirror:
name: DockerHub mirror
runs-on: ubuntu-24.04
if: github.repository == 'rust-lang/rust'
permissions:
# Needed to write to the ghcr.io registry
packages: write
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin

# Download crane in the current directory.
# We use crane because it copies the docker image for all the architectures available in
# DockerHub for the image.
# Learn more about crane at
# https://github.com/google/go-containerregistry/blob/main/cmd/crane/README.md
- name: Download crane
run: |
curl -sL "https://github.com/google/go-containerregistry/releases/download/${VERSION}/go-containerregistry_${OS}_${ARCH}.tar.gz" | tar -xzf -
env:
VERSION: v0.20.2
OS: Linux
ARCH: x86_64

- name: Mirror DockerHub
run: |
# List of DockerHub images to mirror to ghcr.io
images=(
# Mirrored because used by the mingw-check-tidy, which doesn't cache Docker images
"ubuntu:22.04"
# Mirrored because used by all linux CI jobs, including mingw-check-tidy
"moby/buildkit:buildx-stable-1"
)
# Mirror each image from DockerHub to ghcr.io
for img in "${images[@]}"; do
echo "Mirroring ${img}..."
# Remove namespace from the image if any.
# E.g. "moby/buildkit:buildx-stable-1" becomes "buildkit:buildx-stable-1"
dest_image=$(echo "${img}" | cut -d'/' -f2-)
./crane copy \
"docker.io/${img}" \
"ghcr.io/${{ github.repository_owner }}/${dest_image}"
done
Loading

0 comments on commit 9fae9f4

Please sign in to comment.