-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into contribute-highlights
- Loading branch information
Showing
4 changed files
with
2 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,18 +17,6 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | |
binutils \ | ||
lld | ||
|
||
# install cargo chef to cache dependencies | ||
RUN --mount=type=cache,target=/root/.cargo <<EOT | ||
cargo install [email protected] | ||
cargo install cargo-cache --no-default-features --features ci-autoclean | ||
EOT | ||
|
||
### Build Rust dependencies ### | ||
FROM rust-base as planner | ||
|
||
COPY --link . . | ||
RUN cargo chef prepare --recipe-path recipe.json | ||
|
||
### Build Rust code ### | ||
FROM rust-base as builder-base | ||
|
||
|
@@ -52,15 +40,6 @@ RUN ARCHITECTURE=$(uname -m | sed -e "s/arm64/arm_64/g" | sed -e "s/aarch64/aarc | |
&& chmod +x "/usr/local/bin/protoc" \ | ||
&& rm "protoc-21.5-linux-$ARCHITECTURE.zip" | ||
|
||
# Use cargo chef | ||
COPY --link --from=planner /aptos/recipe.json recipe.json | ||
|
||
# Build dependencies - this is the caching Docker layer! | ||
RUN <<EOT | ||
cargo chef cook --profile ${PROFILE} --workspace --recipe-path recipe.json | ||
cargo cache | ||
EOT | ||
|
||
COPY --link . /aptos/ | ||
|
||
FROM builder-base as aptos-node-builder | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters