What is the simplest/best way to set up continuous integration for projects using Dune + GitHub in 2023? The goal is to build and test my code for every PR, perhaps with a few different versions of OCaml and a few different operating systems.
@smolkaj have you looked into GitHub - ocaml/setup-ocaml: GitHub Action for the OCaml programming language
I used it run the CI against several OS/compiler versions and it worked great.
Awesome, this looks like what I want!
Does it use caching by default, or is that something I would have to add (i.e. using Cache · Actions · GitHub Marketplace · GitHub)?
EDIT: Caching seems to be built in.
I haven’t really looked into fine-grained caching: the CI actions were fast enough as-is for my use-case.
You might also be interested in trying out https://ocaml.ci.dev.
OCaml-CI is a Continuous Integration tool specially built for OCaml projects using opam and Dune. It helps the development process by automatically testing code against several versions of the OCaml compiler and various operating systems. In particular it gives access to Linux on ARM64/s390x/PPC64/Risc-V and macOS on ARM64 that is difficult to cover with other CI solutions.