Yesterday, I wanted to setup automatic build for a project written in OCaml, using Travis-CI. However, there is no preinstalled OCaml environment available there, so I wrote my custom
language: c before_install: sudo apt-get update -qq install: sudo apt-get -y install ocaml before_script: ocaml --version script: sh build.sh && ./a.out os: linux dist: focal
build.sh is a simple script that calls
ocamlopt with all my files in the project)
What about adding OCaml support directly to Travis-CI?
I saw that the system which converts the
.travis.yml file to a build file is here:
Starting with the file
lib/travis/build/script.rb, and then adding a file
lib/travis/build/script/ocaml.rb, I think we can get it to work. Then we might have to update the documentation as well, but easy part.
Issues are not enabled on this repository, so I will try to do my own pull request, and post an update here with what I end with.