Use cachepot to cache more rustc builds

This commit is contained in:
Kirill Bulatov
2022-03-25 11:27:21 +02:00
committed by Kirill Bulatov
parent 5e04dad360
commit 18dfc769d8
3 changed files with 20 additions and 5 deletions

View File

@@ -1,12 +1,17 @@
# First transient image to build compute_tools binaries
# NB: keep in sync with rust image version in .circle/config.yml
FROM rust:1.56.1-slim-buster AS rust-build
FROM zenithdb/build:buster-20220309 AS rust-build
WORKDIR /zenith
ARG CACHEPOT_BUCKET=zenith-rust-cachepot
ARG AWS_ACCESS_KEY_ID
ARG AWS_SECRET_ACCESS_KEY
ENV RUSTC_WRAPPER /usr/local/cargo/bin/cachepot
COPY . .
RUN cargo build -p compute_tools --release
RUN cargo build -p compute_tools --release && /usr/local/cargo/bin/cachepot -s
# Final image that only has one binary
FROM debian:buster-slim