Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add basic travis setup to test compilation
  • Loading branch information
ihodes committed Nov 15, 2016
1 parent 6521241 commit edc663d
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
@@ -0,0 +1,8 @@
language: c
script: bash -e ./tools/travis.sh
os:
- linux
- osx
sudo: true
env:
- OCAML_VERSION=4.03.0 OPAM_VERSION=1.2.1
63 changes: 63 additions & 0 deletions tools/travis.sh
@@ -0,0 +1,63 @@
#!/usr/bin/env bash


travis_install_on_linux () {
# Install OCaml and OPAM PPAs
export ppa=avsm/ocaml42+opam12

echo "yes" | sudo add-apt-repository ppa:$ppa
sudo apt-get update -qq

export opam_init_options="--comp=$OCAML_VERSION"
sudo apt-get install -qq opam time git
}

travis_install_on_osx () {
curl -OL "http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.6.dmg"
sudo hdiutil attach XQuartz-2.7.6.dmg
sudo installer -verbose -pkg /Volumes/XQuartz-2.7.6/XQuartz.pkg -target /

brew update
brew install opam
export opam_init_options="--comp=$OCAML_VERSION"
}

case $TRAVIS_OS_NAME in
osx) travis_install_on_osx ;;
linux) travis_install_on_linux ;;
*) echo "Unknown $TRAVIS_OS_NAME"; exit 1
esac

# configure and view settings
export OPAMYES=1
echo "ocaml -version"
ocaml -version
echo "opam --version"
opam --version
echo "git --version"
git --version

# install OCaml packages
opam init $opam_init_options
eval `opam config env`

opam update

# Cf. https://github.com/mirleft/ocaml-nocrypto/issues/104
opam pin add oasis 0.4.6

opam pin add ketrew https://github.com/hammerlab/ketrew.git#575d592f09d099725133e221a921324de998743f
opam pin add biokepi https://github.com/hammerlab/biokepi.git


echo 'ocamlfind list | grep lwt'
ocamlfind list | grep lwt
echo 'ocamlfind list | grep cohttp'
ocamlfind list | grep cohttp

echo "Setting Warn-Error for the Travis test"
export OCAMLPARAM="warn-error=A,_"

opam pin add epidisco --yes .
opam install --yes epidisco

0 comments on commit edc663d

Please sign in to comment.