Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions packages/rs-drive-abci/Dockerfile
Comment thread
lklimek marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,24 @@ ARG ACTIONS_RUNTIME_TOKEN
ARG CARGO_INCREMENTAL=false
Comment thread
lklimek marked this conversation as resolved.
Outdated

# Run the build, with extensive caching.
#
# Note:
# 1. All these --mount... are to cache reusable info between runs.
# See https://doc.rust-lang.org/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci
# --mount=type=cache,sharing=private,target=/usr/src/platform/target \
# 2. We add `--config net.git-fetch-with-cli=true` to address ARM build issue,
# see https://github.com/rust-lang/cargo/issues/10781#issuecomment-1441071052
# 3. To preserve space on github cache, we call `cargo clean`.
RUN --mount=type=cache,sharing=shared,target=/root/.cache/sccache \
--mount=type=cache,sharing=shared,target=${CARGO_HOME}/.crates.toml \
--mount=type=cache,sharing=shared,target=${CARGO_HOME}/.crates2.json \
--mount=type=cache,sharing=shared,target=${CARGO_HOME}/registry/index \
--mount=type=cache,sharing=shared,target=${CARGO_HOME}/registry/cache \
--mount=type=cache,sharing=shared,target=${CARGO_HOME}/git/db \
cargo build -p drive-abci \
&& cp /usr/src/platform/target/${CARGO_BUILD_PROFILE}/drive-abci /usr/src/platform/drive-abci
cargo build \
--package drive-abci \
--config net.git-fetch-with-cli=true && \
cp /usr/src/platform/target/${CARGO_BUILD_PROFILE}/drive-abci /usr/src/platform/drive-abci && \
cargo clean

#
# FINAL IMAGE
Expand Down