Skip to content

Commit eeb9035

Browse files
committed
Auto merge of #137023 - Kobzol:bump-sccache, r=marcoieni
Bump sccache in CI to 0.9.1 We haven't updated the used sccache version for years, it has accrued a bunch of fixes and features in the meantime. It now supports the `--show-adv-stats` flag, which gives a more detailed summary of the results of caching. And it can also cache Rust code, which could be useful in the future (#136942 - although now there are no large wins). It also supports caching PGO now, but since the PGO profiles are always different, it won't make any real difference. #133076 previously tried to update the version to 0.3 (CC `@klensy)` r? `@marcoieni`
2 parents 6d3c050 + 0d0a2a3 commit eeb9035

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ jobs:
7070
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
7171
DOCKER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7272
SCCACHE_BUCKET: rust-lang-ci-sccache2
73+
SCCACHE_REGION: us-west-1
7374
CACHE_DOMAIN: ci-caches.rust-lang.org
7475
continue-on-error: ${{ matrix.continue_on_error || false }}
7576
strategy:

src/ci/docker/run.sh

+8-2
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,15 @@ args=
236236
if [ "$SCCACHE_BUCKET" != "" ]; then
237237
args="$args --env SCCACHE_BUCKET"
238238
args="$args --env SCCACHE_REGION"
239-
args="$args --env AWS_ACCESS_KEY_ID"
240-
args="$args --env AWS_SECRET_ACCESS_KEY"
241239
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
242248
else
243249
mkdir -p $HOME/.cache/sccache
244250
args="$args --env SCCACHE_DIR=/sccache --volume $HOME/.cache/sccache:/sccache"

src/ci/docker/scripts/sccache.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ set -ex
66

77
case "$(uname -m)" in
88
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"
1010
;;
1111
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"
1313
;;
1414
*)
1515
echo "unsupported architecture: $(uname -m)"

src/ci/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,5 +279,5 @@ if [ "$RUN_CHECK_WITH_PARALLEL_QUERIES" != "" ]; then
279279
fi
280280

281281
echo "::group::sccache stats"
282-
sccache --show-stats || true
282+
sccache --show-adv-stats || true
283283
echo "::endgroup::"

0 commit comments

Comments
 (0)