Skip to content

Commit a6dcffa

Browse files
committed
Use download-rustc = "if-unchanged" in PR CI and x86_64-gnu
This has two main benefits: 1. It tests that download-rustc doesn't regress. This doesn't reduce our test coverage, since we still never use `download-rustc` in a full bors merge, but it should make it a lot less likely that this breaks by accident. 2. It greatly speeds up CI when compiler/ and library/ haven't been modified. Once the changes in rust-lang/compiler-team#619 land, this will also be faster for changes to library/, and only changes to compiler/ will have to rebuild.
1 parent b80c2f8 commit a6dcffa

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

.github/workflows/ci.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
pr:
3838
name: "PR - ${{ matrix.name }}"
3939
env:
40+
DOWNLOAD_RUSTC: 1
4041
PR_CI_JOB: 1
4142
CI_JOB_NAME: "${{ matrix.name }}"
4243
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
@@ -268,8 +269,9 @@ jobs:
268269
os: ubuntu-20.04-8core-32gb
269270
env: {}
270271
- name: x86_64-gnu
272+
env:
273+
DOWNLOAD_RUSTC: 1
271274
os: ubuntu-20.04-4core-16gb
272-
env: {}
273275
- name: x86_64-gnu-stable
274276
env:
275277
IMAGE: x86_64-gnu

src/ci/docker/run.sh

+1
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ docker \
254254
--env DEPLOY \
255255
--env DEPLOY_ALT \
256256
--env CI \
257+
--env DOWNLOAD_RUSTC \
257258
--env GITHUB_ACTIONS \
258259
--env GITHUB_REF \
259260
--env TOOLSTATE_REPO_ACCESS_TOKEN \

src/ci/github-actions/ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ jobs:
310310
<<: *base-ci-job
311311
name: PR - ${{ matrix.name }}
312312
env:
313+
DOWNLOAD_RUSTC: 1
313314
<<: [*shared-ci-variables, *public-variables]
314315
PR_CI_JOB: 1
315316
if: github.event_name == 'pull_request'
@@ -433,6 +434,8 @@ jobs:
433434
<<: *job-linux-8c
434435

435436
- name: x86_64-gnu
437+
env:
438+
DOWNLOAD_RUSTC: 1
436439
<<: *job-linux-4c
437440

438441
# This job ensures commits landing on nightly still pass the full

src/ci/run.sh

+4
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ else
121121
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-assertions"
122122
fi
123123

124+
if [ "$DOWNLOAD_RUSTC" = 1 ]; then
125+
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.download-rustc=if-unchanged"
126+
fi
127+
124128
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.verify-llvm-ir"
125129

126130
# We enable this for non-dist builders, since those aren't trying to produce

0 commit comments

Comments
 (0)