cxx-modules-sandbox
cxx-modules-sandbox copied to clipboard
Add Docker autobuilding
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)?).
Seems the Cirrus CI can do this.
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.
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.
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.
I've pushed a .cirrus.yml to the docker branch but it seems that it is ignored?