File tree 5 files changed +26
-5
lines changed
bootstrap/src/core/build_steps
5 files changed +26
-5
lines changed Original file line number Diff line number Diff line change 70
70
HEAD_SHA : ${{ github.event.pull_request.head.sha || github.sha }}
71
71
DOCKER_TOKEN : ${{ secrets.GITHUB_TOKEN }}
72
72
SCCACHE_BUCKET : rust-lang-ci-sccache2
73
+ SCCACHE_REGION : us-west-1
73
74
CACHE_DOMAIN : ci-caches.rust-lang.org
74
75
continue-on-error : ${{ matrix.continue_on_error || false }}
75
76
strategy :
Original file line number Diff line number Diff line change @@ -164,6 +164,20 @@ pub fn prepare_tool_cargo(
164
164
}
165
165
}
166
166
167
+ // The stage0 compiler changes infrequently and does not directly depend on code
168
+ // in the current working directory. Therefore, caching it with sccache should be
169
+ // useful.
170
+ // This is only performed for non-incremental builds, as ccache cannot deal with these.
171
+ if let Some ( ref ccache) = builder. config . ccache {
172
+ eprintln ! (
173
+ "TOOL SCCACHE CONFIGURED at {}, mode: {:?}, incremental: {}" ,
174
+ ccache, mode, builder. config. incremental
175
+ ) ;
176
+ if matches ! ( mode, Mode :: ToolBootstrap ) && !builder. config . incremental {
177
+ cargo. env ( "RUSTC_WRAPPER" , ccache) ;
178
+ }
179
+ }
180
+
167
181
// clippy tests need to know about the stage sysroot. Set them consistently while building to
168
182
// avoid rebuilding when running tests.
169
183
cargo. env ( "SYSROOT" , builder. sysroot ( compiler) ) ;
Original file line number Diff line number Diff line change @@ -236,9 +236,15 @@ args=
236
236
if [ " $SCCACHE_BUCKET " != " " ]; then
237
237
args=" $args --env SCCACHE_BUCKET"
238
238
args=" $args --env SCCACHE_REGION"
239
- args=" $args --env AWS_ACCESS_KEY_ID"
240
- args=" $args --env AWS_SECRET_ACCESS_KEY"
241
239
args=" $args --env AWS_REGION"
240
+
241
+ # Disable S3 authentication for PR builds, because the access keys are missing
242
+ if [ " $PR_CI_JOB " != " " ]; then
243
+ args=" $args --env SCCACHE_S3_NO_CREDENTIALS=1"
244
+ else
245
+ args=" $args --env AWS_ACCESS_KEY_ID"
246
+ args=" $args --env AWS_SECRET_ACCESS_KEY"
247
+ fi
242
248
else
243
249
mkdir -p $HOME /.cache/sccache
244
250
args=" $args --env SCCACHE_DIR=/sccache --volume $HOME /.cache/sccache:/sccache"
Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ set -ex
6
6
7
7
case " $( uname -m) " in
8
8
x86_64)
9
- url=" https://ci-mirrors.rust-lang.org/rustc/2021-08-24 -sccache-v0.2.15 -x86_64-unknown-linux-musl"
9
+ url=" https://ci-mirrors.rust-lang.org/rustc/2025-01-07 -sccache-v0.9.1 -x86_64-unknown-linux-musl"
10
10
;;
11
11
aarch64)
12
- url=" https://ci-mirrors.rust-lang.org/rustc/2021-08-25 -sccache-v0.2.15 -aarch64-unknown-linux-musl"
12
+ url=" https://ci-mirrors.rust-lang.org/rustc/2025-01-07 -sccache-v0.9.1 -aarch64-unknown-linux-musl"
13
13
;;
14
14
* )
15
15
echo " unsupported architecture: $( uname -m) "
Original file line number Diff line number Diff line change @@ -279,5 +279,5 @@ if [ "$RUN_CHECK_WITH_PARALLEL_QUERIES" != "" ]; then
279
279
fi
280
280
281
281
echo " ::group::sccache stats"
282
- sccache --show-stats || true
282
+ sccache --show-adv- stats || true
283
283
echo " ::endgroup::"
You can’t perform that action at this time.
0 commit comments