Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/rust
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: db32f7524e6c21aeeb16c836036eb54f184433e3
Choose a base ref
..
head repository: rust-lang/rust
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 40269a1c426222ea487408d521cf36be1a84ec26
Choose a head ref
Showing 8,496 changed files with 163,261 additions and 108,387 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bootstrap.md
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ Describe what you expected to happen.
Describe what actually happened.
-->

### Bootstrap configuration (config.toml)
### Bootstrap configuration (bootstrap.toml)
```toml
<config>
```
70 changes: 60 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# This file defines our primary CI workflow that runs on pull requests
# 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/ci.py, which
# The actual definition of the executed jobs is calculated by the
# `src/ci/citool` crate, 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.
@@ -56,7 +56,10 @@ jobs:
- name: Calculate the CI job matrix
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: python3 src/ci/github-actions/ci.py calculate-job-matrix >> $GITHUB_OUTPUT
run: |
cd src/ci/citool
CARGO_INCREMENTAL=0 cargo test
CARGO_INCREMENTAL=0 cargo run calculate-job-matrix >> $GITHUB_OUTPUT
id: jobs
job:
name: ${{ matrix.full_name }}
@@ -65,11 +68,13 @@ jobs:
timeout-minutes: 360
env:
CI_JOB_NAME: ${{ matrix.name }}
CI_JOB_DOC_URL: ${{ matrix.doc_url }}
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 }}
DOCKER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCCACHE_BUCKET: rust-lang-ci-sccache2
SCCACHE_REGION: us-west-1
CACHE_DOMAIN: ci-caches.rust-lang.org
continue-on-error: ${{ matrix.continue_on_error || false }}
strategy:
@@ -173,9 +178,33 @@ jobs:
- name: ensure the stable version number is correct
run: src/ci/scripts/verify-stable-version-number.sh

# Show the environment just before we run the build
# This makes it easier to diagnose problems with the above install scripts.
- name: show the current environment
run: src/ci/scripts/dump-environment.sh

# Pre-build citool before the following step uninstalls rustup
# Build it into the build directory, to avoid modifying sources
- name: build citool
run: |
cd src/ci/citool
CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=../../../build/citool cargo build
- name: run the build
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
run: src/ci/scripts/run-build-from-ci.sh 2>&1
run: |
set +e
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
src/ci/scripts/run-build-from-ci.sh 2>&1
STATUS=$?
set -e
if [[ "$STATUS" -ne 0 && -n "$CI_JOB_DOC_URL" ]]; then
echo "****************************************************************************"
echo "To find more information about this job, visit the following URL:"
echo "$CI_JOB_DOC_URL"
echo "****************************************************************************"
fi
exit ${STATUS}
env:
AWS_ACCESS_KEY_ID: ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}
@@ -209,16 +238,37 @@ jobs:
# erroring about invalid credentials instead.
if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'

- name: postprocess metrics into the summary
# This step is not critical, and if some I/O problem happens, we don't want
# to cancel the build.
continue-on-error: true
run: |
if [ -f build/metrics.json ]; then
METRICS=build/metrics.json
elif [ -f obj/build/metrics.json ]; then
METRICS=obj/build/metrics.json
else
echo "No metrics.json found"
exit 0
fi
# Get closest bors merge commit
PARENT_COMMIT=`git rev-list --author='bors <bors@rust-lang.org>' -n1 --first-parent HEAD^1`
./build/citool/debug/citool postprocess-metrics \
--job-name ${CI_JOB_NAME} \
--parent ${PARENT_COMMIT} \
${METRICS} >> ${GITHUB_STEP_SUMMARY}
- name: upload job metrics to DataDog
# This step is not critical, and if some I/O problem happens, we don't want
# to cancel the build.
continue-on-error: true
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
run: ./build/citool/debug/citool upload-build-metrics 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).
7 changes: 7 additions & 0 deletions .github/workflows/ghcr.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,9 @@
# Docker Hub has a rate limit, while ghcr.io doesn't.
# Those images are pushed to ghcr.io by this job.
#
# While Docker Hub rate limit *shouldn't* be an issue on GitHub Actions,
# it certainly is for AWS codebuild.
#
# 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.
@@ -54,6 +57,10 @@ jobs:
"ubuntu:22.04"
# Mirrored because used by all linux CI jobs, including mingw-check-tidy
"moby/buildkit:buildx-stable-1"
# Mirrored because used when CI is running inside a Docker container
"alpine:3.4"
# Mirrored because used by dist-x86_64-linux
"centos:7"
)
# Mirror each image from DockerHub to ghcr.io
46 changes: 46 additions & 0 deletions .github/workflows/post-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Workflow that runs after a merge to master, analyses changes in test executions
# and posts the result to the merged PR.

name: Post merge analysis

on:
push:
branches:
- master

jobs:
analysis:
runs-on: ubuntu-24.04
if: github.repository == 'rust-lang/rust'
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
# Make sure that we have enough commits to find the parent merge commit.
# Since all merges should be through merge commits, fetching two commits
# should be enough to get the parent bors merge commit.
fetch-depth: 2
- name: Perform analysis and send PR
env:
GH_TOKEN: ${{ github.token }}
run: |
# Get closest bors merge commit
PARENT_COMMIT=`git rev-list --author='bors <bors@rust-lang.org>' -n1 --first-parent HEAD^1`
echo "Parent: ${PARENT_COMMIT}"
# Find PR for the current commit
HEAD_PR=`gh pr list --search "${{ github.sha }}" --state merged --json number --jq '.[0].number'`
echo "HEAD: ${{ github.sha }} (#${HEAD_PR})"
cd src/ci/citool
printf "<details>\n<summary>What is this?</summary>\n" >> output.log
printf "This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.\n" >> output.log
printf "</details>\n\n" >> output.log
cargo run --release post-merge-report ${PARENT_COMMIT} ${{ github.sha }} >> output.log
cat output.log
gh pr comment ${HEAD_PR} -F output.log
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file should only ignore things that are generated during a `x.py` build,
# generated by common IDEs, and optional files controlled by the user that
# affect the build (such as config.toml).
# affect the build (such as bootstrap.toml).
# In particular, things like `mir_dump` should not be listed here; they are only
# created during manual debugging and many people like to clean up instead of
# having git ignore such leftovers. You can use `.git/info/exclude` to
@@ -34,6 +34,7 @@ Session.vim
!/tests/run-make/thumb-none-qemu/example/.cargo

## Configuration
/bootstrap.toml
/config.toml
/Makefile
config.mk
@@ -53,7 +54,10 @@ no_llvm_build
/target
/library/target
/src/bootstrap/target
/src/ci/citool/target
/src/tools/x/target
# Created by `x vendor`
/vendor
# Created by default with `src/ci/docker/run.sh`
/obj/
# Created by nix dev shell / .envrc
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
[submodule "src/llvm-project"]
path = src/llvm-project
url = https://github.com/rust-lang/llvm-project.git
branch = rustc/19.1-2024-12-03
branch = rustc/20.1-2025-02-13
shallow = true
[submodule "src/doc/embedded-book"]
path = src/doc/embedded-book
3 changes: 2 additions & 1 deletion .ignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Make vscode *not* count `config.toml` as ignored, so it is included in search
# Make vscode *not* count `bootstrap.toml` and `config.toml` as ignored, so it is included in search
!/bootstrap.toml
!/config.toml
3 changes: 3 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -292,6 +292,9 @@ James Hinshelwood <jameshinshelwood1@gmail.com> <james.hinshelwood@bigpayme.com>
James Miller <bladeon@gmail.com> <james@aatch.net>
James Perry <james.austin.perry@gmail.com>
James Sanderson <zofrex@gmail.com>
Jana Dönszelmann <jana@donsz.nl>
Jana Dönszelmann <jana@donsz.nl> <jonathan@donsz.nl>
Jana Dönszelmann <jana@donsz.nl> <jonabent@gmail.com>
Jan-Erik Rediger <janerik@fnordig.de> <badboy@archlinux.us>
Jaro Fietz <jaro.fietz@gmx.de>
Jason Fager <jfager@gmail.com>
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ For submodules, changes need to be made against the repository corresponding the
submodule, and not the main `rust-lang/rust` repository.

For subtrees, prefer sending a PR against the subtree's repository if it does
not need to be made against the main `rust-lang/rust` repostory (e.g. a
not need to be made against the main `rust-lang/rust` repository (e.g. a
rustc-dev-guide change that does not accompany a compiler change).

## About the [rustc-dev-guide]
Loading