cxx-modules-sandbox icon indicating copy to clipboard operation
cxx-modules-sandbox copied to clipboard

Add Docker autobuilding

Open mathstuf opened this issue 6 years ago • 5 comments

Something to make and upload Docker images from the docker branch should be done. I looked at Docker Hub's support, but it wants write access to all repositories which I cannot justify, so something else would need to be done (possibly also Cirrus CI (#1)?).

mathstuf avatar Apr 04 '19 12:04 mathstuf

Seems the Cirrus CI can do this.

mathstuf avatar Apr 05 '19 18:04 mathstuf

Hi, Cirrus CI tried to build the image after my PR about the clang isntall. Unfortunately, their infrastructure doesn't allow a job to take more than an hour. It timed out before even finishing building GCC.

FYI, I also had a look at Travis CI, and they have a 50 minutes timeout too, plus a log limited to 4MB which was rather annoying to circumvent.

I'm pretty sure even the Docker Hub Automated builds have too low timeouts (and requires unacceptable write access to github, as you pointed out!). Found a somewhat old note about their limitations here: https://stackoverflow.com/questions/34440753/docker-hub-timeout-in-automated-build#34588866

It seems we're out of luck if we want to auto-build the image using free third-party infrastructures.

johan-boule avatar Apr 08 '19 12:04 johan-boule

Hmm. The docs mention that using an existing image can seed the cache and skip over unnecessary steps. I think if we place the compilers first in the file, then updating CMake, ninja, or build2, and other fast-to-build projects at the end allow for updating them to be automatic. Compiler bumps would still need to be manual, but hopefully those are rare.

mathstuf avatar Apr 08 '19 13:04 mathstuf

ccache may also be able to help here. CirrusCI has decent caching support, though we'll need some way to derive a cache key from the .ccache directory.

mathstuf avatar Apr 08 '19 13:04 mathstuf

I've pushed a .cirrus.yml to the docker branch but it seems that it is ignored?

mathstuf avatar Apr 09 '19 21:04 mathstuf