GitHub Actions for OCaml: now stable and on the ocaml org

I announced a beta of OCaml/opam support for GitHub Actions back in Nov 2019, and the functionality has turned out to be popular. A number of projects in our community have been using the Action, and it can be found in the GitHub Marketplace.

It has been sufficiently popular that it’s definitely time to get it off my personal GitHub account, and so I have transferred it to its new home at https://github.com/ocaml/setup-ocaml. I am also very pleased to announce that @smorimoto and @dra27 are also now maintainers – they have both made significant improvements to it, and @smorimoto in particular has been working with the GitHub ecosystem to further improve the efficiency of the Action (such as by adding reliable caching). Thank you to them both and all the other contributors for your help improving the CI experience around OCaml.

If anyone else wishes to contribute to improving the action, please do get involved on the issue tracker. And of course, if you are still referencing avsm/setup-ocaml in your own workflow definition, this is a good time to change it to ocaml/setup-ocaml.

This is probably a good time to note that the other ci-scripts repository on the ocaml/ GitHub organisation is in sore need of either new maintainers (for the Travis CI), or being retired due to lack of support (primarily due to the shift to GitHub Actions). I’m immensely grateful to Travis CI for the decade of mostly free builds they have provided our community to date.

24 Likes

Thank you @avsm and the other maintainers, this action has been super useful. I’m excited to try the new caching system :slight_smile:

3 Likes

I just released the first alpha release of v2 with features such as reliable cache. I hope you enjoy that!

3 Likes

Sorry to bump a thread, but I tried using this today and it was quite slow compared to a simple apt install ocaml (which takes ~40s on average). Is this normal?

It also looks like it doesn’t have the same effect, as ocaml-rs doesn’t work anymore (GitHub - zshipko/ocaml-rs: OCaml extensions in Rust) if I install it with your github action

apt install ocaml only installs the version available in the OS distribution of the runner. It’s faster as it installs a precompiled binary instead of compiling from source. Depends on your CI use case, but in most cases you want to be testing a specific version of OCaml (or, more likely, a range of versions) so the OS distributed OCaml is of limited use.

2 Likes