Skip to content

Instantly share code, notes, and snippets.

@vietlq
Forked from avsm/.travis-ci.sh
Created November 12, 2018 10:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vietlq/35ea7b37949bdd4838be3c7786f70ee8 to your computer and use it in GitHub Desktop.
Save vietlq/35ea7b37949bdd4838be3c7786f70ee8 to your computer and use it in GitHub Desktop.
Sample Travis setup for OCaml projects
# Edit this for your own project dependencies
OPAM_DEPENDS="ocamlfind ounit re"
case "$OCAML_VERSION,$OPAM_VERSION" in
3.12.1,1.0.0) ppa=avsm/ocaml312+opam10 ;;
3.12.1,1.1.0) ppa=avsm/ocaml312+opam11 ;;
4.00.1,1.0.0) ppa=avsm/ocaml40+opam10 ;;
4.00.1,1.1.0) ppa=avsm/ocaml40+opam11 ;;
4.01.0,1.0.0) ppa=avsm/ocaml41+opam10 ;;
4.01.0,1.1.0) ppa=avsm/ocaml41+opam11 ;;
*) echo Unknown $OCAML_VERSION,$OPAM_VERSION; exit 1 ;;
esac
echo "yes" | sudo add-apt-repository ppa:$ppa
sudo apt-get update -qq
sudo apt-get install -qq ocaml ocaml-native-compilers camlp4-extra opam
export OPAMYES=1
export OPAMVERBOSE=1
echo OCaml version
ocaml -version
echo OPAM versions
opam --version
opam --git-version
opam init
opam install ${OPAM_DEPENDS}
eval `opam config env`
make
make test
language: c
script: bash -ex .travis-ci.sh
env:
- OCAML_VERSION=4.01.0 OPAM_VERSION=1.0.0
- OCAML_VERSION=4.01.0 OPAM_VERSION=1.1.0
- OCAML_VERSION=4.00.1 OPAM_VERSION=1.0.0
- OCAML_VERSION=4.00.1 OPAM_VERSION=1.1.0
- OCAML_VERSION=3.12.1 OPAM_VERSION=1.0.0
- OCAML_VERSION=3.12.1 OPAM_VERSION=1.1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment