Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't share the target mount across branches #62

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
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
3 changes: 2 additions & 1 deletion rust/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ SET_CACHE_MOUNTS_ENV:
ARG target_cache_suffix
ARG TARGETPLATFORM
ARG EARTHLY_TARGET_NAME #https://docs.earthly.dev/docs/earthfile/builtin-args
ARG EARTHLY_GIT_BRANCH
ENV EARTHLY_RUST_CARGO_HOME_CACHE="type=cache,mode=0777,id=$EARTHLY_CACHE_PREFIX#cargo-home,sharing=shared,target=$CARGO_HOME"
ENV EARTHLY_RUST_TARGET_CACHE="type=cache,mode=0777,id=$EARTHLY_CACHE_PREFIX#target#$EARTHLY_TARGET_NAME#$TARGETPLATFORM#$target_cache_suffix,sharing=locked,target=target"
ENV EARTHLY_RUST_TARGET_CACHE="type=cache,mode=0777,id=$EARTHLY_CACHE_PREFIX#target#$EARTHLY_TARGET_NAME#$TARGETPLATFORM#$EARTHLY_GIT_BRANCH#$target_cache_suffix,sharing=locked,target=target"

# COPY_OUTPUT copies files out of the target cache into the image layers.
# Use this function when you want to SAVE an ARTIFACT from the target folder (mounted cache), always trying to minimize the total size of the copied fileset.
Expand Down
Loading