Cleaner way to install opam in travis CI

This commit is contained in:
Guillaume Bury 2016-07-23 13:50:13 +02:00
parent fda7b9ef3a
commit 13effa8969
2 changed files with 6 additions and 3 deletions

View file

@ -1,16 +1,15 @@
# Edit this for your own project dependencies # Edit this for your own project dependencies
OPAM_DEPENDS="ocamlfind ocamlbuild" 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 OPAMYES=1
export OPAMVERBOSE=1 export OPAMVERBOSE=1
opam init opam init
opam switch ${OCAML_VERSION} opam switch ${OCAML_VERSION}
eval `opam config env` eval `opam config env`
opam install ${OPAM_DEPENDS} opam install ${OPAM_DEPENDS}
eval `opam config env` eval `opam config env`
make lib make lib
make bin make bin
make test make test

View file

@ -1,6 +1,10 @@
language: c language: c
sudo: required sudo: required
script: bash -ex .travis-ci.sh 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: env:
- OCAML_VERSION=4.00.1 - OCAML_VERSION=4.00.1
- OCAML_VERSION=4.01.0 - OCAML_VERSION=4.01.0