chore: only ci use sccache (#26774)

This commit is contained in:
Yihau Chen 2022-07-26 01:22:15 +08:00 committed by GitHub
parent a55e34da87
commit f7ebaa76ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 9 deletions

View File

@ -44,6 +44,15 @@ ARGS=(
if [[ -n $CI ]]; then
# Share the real ~/.cargo between docker containers in CI for speed
ARGS+=(--volume "$HOME:/home")
# sccache
ARGS+=(
--env "RUSTC_WRAPPER=/home/.cargo/bin/sccache"
--env AWS_ACCESS_KEY_ID
--env AWS_SECRET_ACCESS_KEY
--env SCCACHE_BUCKET
--env SCCACHE_REGION
)
else
# Avoid sharing ~/.cargo when building locally to avoid a mixed macOS/Linux
# ~/.cargo
@ -83,15 +92,6 @@ ARGS+=(
--env CRATES_IO_TOKEN
)
# sccache
ARGS+=(
--env "RUSTC_WRAPPER=/home/.cargo/bin/sccache"
--env AWS_ACCESS_KEY_ID
--env AWS_SECRET_ACCESS_KEY
--env SCCACHE_BUCKET
--env SCCACHE_REGION
)
# Also propagate environment variables needed for codecov
# https://docs.codecov.io/docs/testing-with-docker#section-codecov-inside-docker
# We normalize CI to `1`; but codecov expects it to be `true` to detect Buildkite...