edgedb / edgedb-pkg

EdgeDB Release Packaging Toolkit
1 stars 2 forks source link

Optimize the build time by doing manual docker image builds #4

Open elprans opened 4 years ago

elprans commented 4 years ago

Github does not support expressions in the Docker URI, so we explicitly unroll the build matrix into a bunch of steps gated by a conditional expression instead. This works, but the downside is that Github builds all docker images in every matrix iteration, effectively building images n^2 times. All that without using any build cache. The result is that nightly builds easily spend more time in preparing the build images than actually building the packages.

This can be fixed by pre-building all necessary docker images in a separate workflow step, preferably using some sort of build cache (see actions/cached-docker-build-push). The build steps would then use pushed images.

ambv commented 4 years ago

As discussed, we will rather drop usage of GHA's matrix and treat all specific Linux distro builds as separate jobs, just as macOS is a separate job.

ambv commented 4 years ago

Let's keep this open until we evaluate caching.

tailhook commented 3 years ago

Looks like this was accidentally closed.

elprans commented 1 year ago

The strategy here should be to implement an action that automatically builds all images and pushes them to this repository's container registry. Consuming workflows would then refer to the ghcr.io image.