improve sccache

This commit is contained in:
Bryan Stitt 2023-07-21 23:43:42 -07:00
parent 7c4de5ea8b
commit 352726872a

@ -55,9 +55,11 @@ RUN --mount=type=cache,target=/root/.cargo/git \
# sccache # sccache
RUN --mount=type=cache,target=/root/.cargo/git \ RUN --mount=type=cache,target=/root/.cargo/git \
--mount=type=cache,target=/root/.cargo/registry \ --mount=type=cache,target=/root/.cargo/registry \
--mount=type=cache,target=/root/.cache/sccache \
set -eux; \ set -eux; \
\ \
cargo binstall -y sccache cargo binstall -y sccache; \
sccache -s
ENV RUSTC_WRAPPER "/root/.cargo/bin/sccache" ENV RUSTC_WRAPPER "/root/.cargo/bin/sccache"
@ -78,7 +80,8 @@ RUN --mount=type=cache,target=/root/.cargo/git \
--mount=type=cache,target=/root/.cache/sccache \ --mount=type=cache,target=/root/.cache/sccache \
set -eux; \ set -eux; \
\ \
curl -L https://foundry.paradigm.xyz | bash && foundryup curl -L https://foundry.paradigm.xyz | bash && foundryup; \
sccache -s
FROM rust as rust_with_env FROM rust as rust_with_env
@ -120,6 +123,7 @@ RUN --mount=type=cache,target=/root/.cargo/git \
nextest run \ nextest run \
--features "$WEB3_PROXY_FEATURES" --no-default-features \ --features "$WEB3_PROXY_FEATURES" --no-default-features \
; \ ; \
sccache -s; \
touch /test_success touch /test_success
FROM rust_with_env as build_app FROM rust_with_env as build_app
@ -143,6 +147,7 @@ RUN --mount=type=cache,target=/root/.cargo/git \
--root /usr/local \ --root /usr/local \
--verbose \ --verbose \
; \ ; \
sccache -s; \
/usr/local/bin/web3_proxy_cli --help | grep 'Usage: web3_proxy_cli' /usr/local/bin/web3_proxy_cli --help | grep 'Usage: web3_proxy_cli'
# copy this file so that docker actually creates the build_tests container # copy this file so that docker actually creates the build_tests container