diff --git a/.travis-ci.sh b/.travis-ci.sh index cbc290c..1aaba1b 100755 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -1,25 +1,27 @@ -#!/bin/sh +#!/bin/bash set -ex -# build dependencies -sudo add-apt-repository --yes ppa:avsm/ocaml42+opam11 -sudo apt-get update -qq -sudo apt-get install -y ocaml camlp4-extra opam - # optional dependencies for running tests sudo apt-get install protobuf-compiler -export OPAMYES=1 -rm -rf ~/.opam +# build, run tests, build package, install package +wget https://raw.githubusercontent.com/ocaml/ocaml-travisci-skeleton/master/.travis-opam.sh + +. .travis-opam.sh + + +# build and test using the current development version of piqilib +if [ -n "${PIQILIB_DEV-}" ] +then + opam repo add piqi git://github.com/piqi/piqi-opam-repo.git -opam init -opam remote add piqi git://github.com/piqi/piqi-opam-repo.git -opam install piqilib + opam install piqilib.master + make distclean + make + make test +fi -eval `opam config env` -make -make -C tests diff --git a/.travis.yml b/.travis.yml index b6214da..259d129 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,2 +1,8 @@ language: c script: "./.travis-ci.sh" +env: + - PACKAGE="piqi" OCAML_VERSION=3.12 + - PACKAGE="piqi" OCAML_VERSION=4.00 + - PACKAGE="piqi" OCAML_VERSION=4.01 + - PACKAGE="piqi" OCAML_VERSION=4.02 PIQILIB_DEV=1 + - PACKAGE="piqi" OCAML_VERSION=latest