chore: only ci use sccache (#26774)
This commit is contained in:
parent
a55e34da87
commit
f7ebaa76ba
|
@ -44,6 +44,15 @@ ARGS=(
|
||||||
if [[ -n $CI ]]; then
|
if [[ -n $CI ]]; then
|
||||||
# Share the real ~/.cargo between docker containers in CI for speed
|
# Share the real ~/.cargo between docker containers in CI for speed
|
||||||
ARGS+=(--volume "$HOME:/home")
|
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
|
else
|
||||||
# Avoid sharing ~/.cargo when building locally to avoid a mixed macOS/Linux
|
# Avoid sharing ~/.cargo when building locally to avoid a mixed macOS/Linux
|
||||||
# ~/.cargo
|
# ~/.cargo
|
||||||
|
@ -83,15 +92,6 @@ ARGS+=(
|
||||||
--env CRATES_IO_TOKEN
|
--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
|
# Also propagate environment variables needed for codecov
|
||||||
# https://docs.codecov.io/docs/testing-with-docker#section-codecov-inside-docker
|
# 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...
|
# We normalize CI to `1`; but codecov expects it to be `true` to detect Buildkite...
|
||||||
|
|
Loading…
Reference in New Issue