Permalink
Browse files

Travis: Initial support for TravisCI

Change-Id: Ic8c2410b7e26df7f40afeadcebda41fc86ad6ea9
  • Loading branch information...
NicolasT committed Dec 6, 2012
1 parent 95aa93e commit ca9418d5f3c1c4ab8967dc061f0a190ee72c76ba
Showing with 60 additions and 0 deletions.
  1. +2 −0 .travis.yml
  2. +31 −0 travis/before_install.sh
  3. +7 −0 travis/env.sh
  4. +20 −0 travis/script.sh
View
@@ -0,0 +1,2 @@
+before_install: travis/before_install.sh
+script: travis/script.sh
View
@@ -0,0 +1,31 @@
+#!/bin/bash -xue
+
+source travis/env.sh
+
+sudo apt-get update -qq
+sudo apt-get install -qq build-essential m4 ocaml-nox libbz2-dev libev-dev camlp4-extra
+
+mkdir ${OPAM_DIR}
+
+pushd ${OPAM_DIR}
+git clone git://github.com/OCamlPro/opam.git src
+pushd src
+./configure --prefix=${OPAM_DIR}
+make
+make install
+
+popd
+popd
+
+which opam
+opam init
+
+opam remote add incubaid-devel --kind git git://github.com/Incubaid/opam-repository-devel.git
+
+eval `opam config -env`
+
+opam install conf-libev
+echo 'y' | opam install lwt
+opam install camlbz2
+opam install ounit
+opam install camltc
View
@@ -0,0 +1,7 @@
+OPAM_DIR=/tmp/opam
+PATH=$OPAM_DIR/bin:$PATH
+
+if test -d $OPAM_DIR/bin;
+then
+ eval `opam config -env`
+fi
View
@@ -0,0 +1,20 @@
+#!/bin/bash -xue
+
+source travis/env.sh
+
+make
+./arakoon.native --run-all-tests > test_output 2>&1
+
+# This seems not to work...
+# RES=$?
+
+tail -n 500 test_output
+
+if ! (tail -n1 test_output | grep ^OK);
+then
+ echo "Detected failure"
+ exit 1
+else
+ echo "Detected success"
+ exit 0
+fi

0 comments on commit ca9418d

Please sign in to comment.