-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Use docker cache mounts for apt, pip and cargo #11106
base: main
Are you sure you want to change the base?
Conversation
6f11fe5
to
63481da
Compare
63481da
to
d0b6d49
Compare
Is this just for Docker image build performance? |
See also, previous discussion at #3372 |
Yes, both locally and CI workflows. I had completely missed the other PR 🤦 so thanks for the reference! I'll review the discussion and see if this needs closing or updating or if I change the merge target to that PR. |
I think that one might have been a little more aggressive about refactoring. I'm more liable to just accept cache mounts. The big caveat there is probably captured by #3372 (comment) with the notable update that we're now using Depot runners in our org! So... we could set up Depot for Docker builds. |
Yeah, the author of that pr clearly has a lot of rust-in-docker build knowledge, more than I have. Bottom line is that this PR makes an incremental change with the aim of improving build time here in the GH pipeline. If you are moving the build to a different platform however then there is not much value in merging this one. |
d0b6d49
to
70224a9
Compare
Dockerfile
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, I would see #3372 for context as to why some of these changes haven't been done.
(edit: woops, hadn't seen this was already mentioned #11106 (comment))
70224a9
to
6cc484d
Compare
This comment was marked as outdated.
This comment was marked as outdated.
6cc484d
to
0bdeea0
Compare
81a3559
to
5c013ec
Compare
0bdeea0
to
79d5163
Compare
79d5163
to
5850449
Compare
5850449
to
44a6f92
Compare
44a6f92
to
3c2dc0f
Compare
I've now refactored the cache mounts to be simpler and (hopefully) more effective in the Github pipeline All in-docker build tool caches now live in a single The |
3c2dc0f
to
589c740
Compare
589c740
to
7d7320a
Compare
7d7320a
to
a74d19e
Compare
I forced a push and this does make the build faster, by about 90-120 seconds. Compare the times for the latest release:
I've since pushed another small update to add a |
a74d19e
to
95d45aa
Compare
The cache mounts are cached using standard github actions cache when building in the CI pipeline. Note that the build stage no longer contains the whole source tree, these are instead mounted into the build container when building to avoid invalidating cached build container layers.
95d45aa
to
4973fc3
Compare
The cache mounts are cached using standard github actions cache when building in the CI pipeline.
Note that the build stage no longer contains the whole source tree, these are instead mounted into the build container when building to avoid invalidating cached build container layers.