Skip to content

Commit

Permalink
enable travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mlin committed Aug 25, 2013
1 parent 66e991d commit db14896
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,3 +8,4 @@
*.cmxs
*.cmxa
.c9revisions
setup.data
2 changes: 2 additions & 0 deletions .travis.yml
@@ -0,0 +1,2 @@
language: c
script: bash -ex travis-ci.sh
27 changes: 27 additions & 0 deletions travis-ci.sh
@@ -0,0 +1,27 @@
#!/bin/bash -ex

# OPAM version to install
export OPAM_VERSION=1.0.0
# OPAM packages needed to build tests
export OPAM_PACKAGES='ounit'

# install ocaml from apt
sudo apt-get update -qq
sudo apt-get install -qq ocaml

# install opam
curl -L https://github.com/OCamlPro/opam/archive/${OPAM_VERSION}.tar.gz | tar xz -C /tmp
pushd /tmp/opam-${OPAM_VERSION}
./configure
make
sudo make install
opam init -y
eval `opam config env`
popd

# install packages from opam
opam install -q -y ${OPAM_PACKAGES}

# compile & run tests (an OASIS DevFiles project might use ./configure --enable-tests && make test)
./configure --enable-tests
make test

0 comments on commit db14896

Please sign in to comment.