Skip to content
Snippets Groups Projects
Commit 14c20720 authored by Hugo Trentesaux's avatar Hugo Trentesaux
Browse files

wip add cache to dockerfile

parent f56ea6c3
No related branches found
No related tags found
No related merge requests found
Pipeline #36350 waiting for manual action
......@@ -21,7 +21,8 @@ WORKDIR /root
# Copy source tree
COPY . .
RUN apt-get update && \
RUN --mount=type=cache,target=/var/cache/apt &&
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y clang cmake protobuf-compiler
# build duniter
......@@ -34,7 +35,7 @@ RUN if [ "$debug" = 0 ]; then \
fi
# Configure cross-build environment if need be
RUN set -x && \
RUN --mount=type=cache,target=/var/cache/apt && set -x && \
if [ "$TARGETPLATFORM" != "$BUILDPLATFORM" ]; then \
. /root/dynenv && \
apt install -y gcc-$DEBIAN_ARCH_TRIPLET binutils-$DEBIAN_ARCH_TRIPLET && \
......@@ -45,7 +46,7 @@ RUN set -x && \
# Build
ARG chain="gdev"
RUN set -x && \
RUN --mount=type=cache,target=build && set -x && \
cat /root/dynenv && \
. /root/dynenv && \
cargo build --locked $CARGO_OPTIONS --no-default-features $BENCH_OPTIONS --features $chain --target "$RUST_ARCH_TRIPLET" && \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment