I’d like to gather feedback and perhaps help curate documentation on what are the best practices for setting up CI for OCaml projects. Pardon my naivety in this area, but I figured that asking the experts and following a good path would save me (and hopefully others) a lot of work.
I don’t have as many OCaml projects as many of the other developers on this forum, but even with one project I find my current setup and constraints stifling. I’m currently using ocaml-ci-scripts’s travis-opam.sh, but with a long delay and 10 minute+ wait times on several tests it is cumbersome. On top of that, recently, the failures are entirely unrelated to my code; failures like
opam not being available. I know that travis supports containerized builds, but I don’t understand how to use travis-docker.sh. My specific questions are:
- Is there a way to test on a container with a fixed opam environment (hopefully, with the relevant packages installed) such that when I push, Travis only tests based on the newest code? It is wasteful to repeatedly test the installation of opam and my projects dependencies during development. I’d like to fix my projects dependencies and upgrade them as I individually review newer versions as opposed to riding the wave of latest packages.
- Barring this (my personal) ideal setup, what is the next best way?
- Is Travis a good CI platform and are there better ones ? I’m unfortunately a bit wedded to Github for this project as I’ve heard good things about Gitlab. I do find Travis’s matrix functionality useful for dividing the testing.
Thank you in advance.