ocaml-containers
ocaml-containers copied to clipboard
use custom image for CI
https://github.com/mjambon/ocaml-layer seems super nice to build a docker image with exactly what's needed on it (in our case: OCaml switches in {4.03, 4.08, 4.11}
at least, with dune and the other dependencies) so that CI finishes in < 1 min. Sadly I'm not good with docker. Any help setting up CI with this would be appreciated.
ocaml-layer
doesn't have any non-linux OS's; how would we deal with those?
That's a good point. I don't know. Build times on macOS are also a problem, however (13 minutes! :scream:), I just don't know how to improve that…
Conceivably we could try to roll our own equivalent for macOS? It looks to me like ocaml-layer doesn't actually do anything particularly magical; it's just a set of convenience scripts to setup a Docker image with the right OCaml tools. As long as Docker images exist for macOS/Windows (server), then we should be able to make our own pre-loaded images to speed up CI.
I don't think docker accommodates macOS or windows?
Haha, oops, hmm. I thought I read somewhere that macOS/Windows containers were a thing, but guess I'm wrong...
Well, one problem at a time, I guess.
I investigated using custom images for the same reason, but found it was much easier/faster to use my CI provider's cache facility to hold whatever switches I wanted to carry along from build to build. The approach was discussed here, and it seems that github actions offers an analogous caching facility:
https://discuss.ocaml.org/t/basic-gitlab-ci-configuration/3327/