From 13effa89693c0969b363f92403ca12133486cd02 Mon Sep 17 00:00:00 2001 From: Guillaume Bury Date: Sat, 23 Jul 2016 13:50:13 +0200 Subject: [PATCH] Cleaner way to install opam in travis CI --- .travis-ci.sh | 5 ++--- .travis.yml | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis-ci.sh b/.travis-ci.sh index 76b27776..e5c6a74f 100644 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -1,16 +1,15 @@ # Edit this for your own project dependencies OPAM_DEPENDS="ocamlfind ocamlbuild" -echo "yes" | sudo add-apt-repository ppa:avsm/ocaml42+opam12 -sudo apt-get update -qq -sudo apt-get install -qq ocaml ocaml-native-compilers camlp4-extra opam export OPAMYES=1 export OPAMVERBOSE=1 + opam init opam switch ${OCAML_VERSION} eval `opam config env` opam install ${OPAM_DEPENDS} eval `opam config env` + make lib make bin make test diff --git a/.travis.yml b/.travis.yml index 7cad45c9..244a6f67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,10 @@ language: c sudo: required script: bash -ex .travis-ci.sh +before_install: + - echo "yes" | sudo add-apt-repository ppa:avsm/ocaml42+opam12 + - sudo apt-get update -qq + - sudo apt-get install -qq ocaml ocaml-native-compilers camlp4-extra opam env: - OCAML_VERSION=4.00.1 - OCAML_VERSION=4.01.0