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

Try using Depot #44

Merged
merged 17 commits into from
Jan 28, 2023
Merged

Try using Depot #44

merged 17 commits into from
Jan 28, 2023

Conversation

mnapoli
Copy link
Member

@mnapoli mnapoli commented Jan 22, 2023

This is an attempt at using https://depot.dev to accelerate builds with caches.

This is to avoid having the dangling base-devel-xx Docker images that are used only to cache internal steps (common throughout PHP versions).

Since Depot caches all intermediary layers very aggressively, that intermediary image that serves as a cache becomes useless.
This will help to solve build dependency issues and image visibility with Depot.dev. The added complexity (duplicated code) is very minor, and Docker will cache the build steps anyway, so I find that acceptable.
@mnapoli
Copy link
Member Author

mnapoli commented Jan 28, 2023

This is a complete success!

Without Depot:

  • x86, without cache: ? (don't have a base rn)
  • x86, with cache: 10m
  • arm, without cache: 2h30 - 3h (!!)
  • arm, with cache: no reference, probably 10m

Important note: with full caching, I managed to get done to 2-3 minutes, but that wasn't stable as the cache was too big and failed most of the time. That's why I cached less things and got to 10min, but even then that wasn't stable enough to work all the time.

With Depot:

  • x86, without cache: 10m
  • x86, with cache: 1-2m
  • arm, without cache: 9m
  • arm, with cache: 1-2m
    To be concrete, I upgraded the PHP versions and the PR was green in 10 minutes. That's the end-user experience and I'm very happy with it!

Also note that using Depot is completely optional, and used only in CI by default. Locally it will build with docker buildx bake by default, so we are closing the build for users.

@mnapoli mnapoli self-assigned this Jan 28, 2023
@mnapoli mnapoli merged commit a30f3e0 into compile-php Jan 28, 2023
@mnapoli mnapoli deleted the depot branch January 28, 2023 21:53
@mnapoli mnapoli mentioned this pull request Jan 29, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant