I was in the GitHub Actions beta program and forward ported my code to the latest version that just went public. It’s a pretty simple way to get your OCaml code tested on Linux, macOS and Windows, without requiring an external CI service. The action attempts to provide a homogenous interface across all three operating systems, so invoking ‘opam’ from subsequent actions should “just work”.
You can find it here:
- In the GitHub Marketplace at https://github.com/marketplace/actions/setup-ocaml
- Source code on https://github.com/avsm/setup-ocaml/
- Hello World usage on https://github.com/avsm/hello-world-action-ocaml
- Usage in ocaml-yaml:
This should be considered fairly experimental as GH Actions is so new. If you do use it, then consider updating this issue with your usage. It does not current supporting caching yet, but is pretty fast to bootstrap (~4minutes).
It also doesn’t have any higher level purpose other than to set up an opam environment, since most of the additional functionality such as revdeps testing is planned for addition to the ocurrent DSL. Nevertheless, this GH feature will hopefully be useful for smaller projects without a lot of computational requirements. Let me know how it goes!
Windows is currently supported through @fdopen’s excellent fork that uses Cygwin. As Windows support is being mainlined into opam itself at the moment, I’m hoping that we will gradually move over to that. That should eventually remove the need for two separate opam-repositories, so I won’t be adding any features that are Linux or macOS-specific and do not work on the Cygwin version.