This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Cache Rust build cache when building docker images#14130
Merged
Conversation
DMRobertson
reviewed
Oct 11, 2022
Comment on lines
+132
to
+133
| RUN --mount=type=cache,target=/synapse/target,sharing=locked \ | ||
| --mount=type=cache,target=${CARGO_HOME}/registry,sharing=locked \ |
Contributor
There was a problem hiding this comment.
Do we need sharing=locked on the other caching that we do?
Contributor
There was a problem hiding this comment.
Discussed in #synapse-dev,
I think the answer is probably? Otherwise concurrent runs will write over each others caches
though in practice I don't think you'd really build many docker images in parallel
DMRobertson
approved these changes
Oct 17, 2022
Contributor
DMRobertson
left a comment
There was a problem hiding this comment.
Probably want to wait for 1.69 to merge into develop, otherwise let's try it.
Comment on lines
+138
to
+139
| RUN --mount=type=cache,target=/synapse/target,sharing=locked \ | ||
| --mount=type=cache,target=${CARGO_HOME}/registry,sharing=locked \ |
Contributor
There was a problem hiding this comment.
Suggested change
| RUN --mount=type=cache,target=/synapse/target,sharing=locked \ | |
| --mount=type=cache,target=${CARGO_HOME}/registry,sharing=locked \ | |
| // | |
| // We also cache the Rust build in `/synapse/target` and Rust dependencies in `${CARGO_HOME}/registry` to speed-up rebuilds | |
| RUN --mount=type=cache,target=/synapse/target,sharing=locked \ | |
| --mount=type=cache,target=${CARGO_HOME}/registry,sharing=locked \ |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #14129
Hopefully helps with #13204