cache solc (#181)

* cache solc

* adds solc binaries to cache
This commit is contained in:
TheArchitect108 2022-12-08 19:00:57 -06:00 committed by GitHub
parent af86b7a499
commit cc917a217d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,12 +18,24 @@ WORKDIR /serai
RUN rustup update
# Install Solc @ 0.8.16
RUN pip3 install solc-select==0.2.1
RUN solc-select install 0.8.16
RUN solc-select use 0.8.16
RUN --mount=type=cache,target=/root/.cache/ \
--mount=type=cache,target=/root/.local/ \
--mount=type=cache,target=/root/.solc-select \
pip3 install solc-select==0.2.1
RUN --mount=type=cache,target=/root/.cache/ \
--mount=type=cache,target=/root/.local/ \
--mount=type=cache,target=/root/.solc-select \
solc-select install 0.8.16
RUN --mount=type=cache,target=/root/.cache/ \
--mount=type=cache,target=/root/.local/ \
--mount=type=cache,target=/root/.solc-select \
solc-select use 0.8.16
# Mount cargo and serai cache for Cache & Build
RUN --mount=type=cache,target=/usr/local/cargo/git \
RUN --mount=type=cache,target=/root/.local/ \
--mount=type=cache,target=/root/.solc-select \
--mount=type=cache,target=/root/.cache/ \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/serai/target/release/build \
--mount=type=cache,target=/serai/target/release/deps \