Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add basic travis setup to test compilation
- Loading branch information
Showing
2 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|