Skip to content

Commit 29474ac

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 3e9b70d commit 29474ac

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
@@ -38,6 +38,7 @@ jobs:
3838
pr:
3939
name: "PR - ${{ matrix.name }}"
4040
env:
41+
DOWNLOAD_RUSTC: 1
4142
PR_CI_JOB: 1
4243
CI_JOB_NAME: "${{ matrix.name }}"
4344
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
@@ -277,8 +278,9 @@ jobs:
277278
os: ubuntu-20.04-8core-32gb
278279
env: {}
279280
- name: x86_64-gnu
281+
env:
282+
DOWNLOAD_RUSTC: 1
280283
os: ubuntu-20.04-4core-16gb
281-
env: {}
282284
- name: x86_64-gnu-stable
283285
env:
284286
IMAGE: x86_64-gnu

src/ci/docker/run.sh

+1
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ docker \
290290
--env DEPLOY \
291291
--env DEPLOY_ALT \
292292
--env CI \
293+
--env DOWNLOAD_RUSTC \
293294
--env GITHUB_ACTIONS \
294295
--env GITHUB_REF \
295296
--env GITHUB_STEP_SUMMARY="/checkout/obj/${SUMMARY_FILE}" \

src/ci/github-actions/ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ jobs:
321321
<<: *base-ci-job
322322
name: PR - ${{ matrix.name }}
323323
env:
324+
DOWNLOAD_RUSTC: 1
324325
<<: [*shared-ci-variables, *public-variables]
325326
PR_CI_JOB: 1
326327
if: github.event_name == 'pull_request'
@@ -450,6 +451,8 @@ jobs:
450451
<<: *job-linux-8c
451452

452453
- name: x86_64-gnu
454+
env:
455+
DOWNLOAD_RUSTC: 1
453456
<<: *job-linux-4c
454457

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

src/ci/run.sh

+4
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ else
124124
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-assertions"
125125
fi
126126

127+
if [ "$DOWNLOAD_RUSTC" = 1 ]; then
128+
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.download-rustc=if-unchanged"
129+
fi
130+
127131
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.verify-llvm-ir"
128132

129133
# When running gcc backend tests, we need to install `libgccjit` and to not run llvm codegen

0 commit comments

Comments
 (0)