forked from andrewray/iocaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis-ci.sh
executable file
·40 lines (32 loc) · 988 Bytes
/
.travis-ci.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# install OCaml + OPAM
case "$OCAML_VERSION,$OPAM_VERSION" in
3.12.1,1.0.0) ppa=avsm/ocaml312+opam10 ;;
3.12.1,1.1.0) ppa=avsm/ocaml312+opam11 ;;
4.00.1,1.0.0) ppa=avsm/ocaml40+opam10 ;;
4.00.1,1.1.0) ppa=avsm/ocaml40+opam11 ;;
4.01.0,1.0.0) ppa=avsm/ocaml41+opam10 ;;
4.01.0,1.1.0) ppa=avsm/ocaml41+opam11 ;;
4.02.3,1.2.2) ppa=avsm/ocaml42+opam12;;
*) echo Unknown $OCAML_VERSION,$OPAM_VERSION; exit 1 ;;
esac
PKG=iocaml-kernel.999.9.9
# install ocaml compilers
echo "yes" | sudo add-apt-repository ppa:$ppa
sudo apt-get update -qq
sudo apt-get install -qq ocaml ocaml-native-compilers camlp4-extra opam libffi-dev
# initialize opam
export OPAMYES=1
opam init
eval `opam config env`
opam remote add iocaml-dev git://github.com/andrewray/opam.git
opam update
# install external deps
DEPEXT=`opam install $PKG -e ubuntu`
if [ "$DEPEXT" != "" ]; then
sudo apt-get install -qq $DEPEXT
fi
# install package deps
opam install ctypes-foreign
opam install $PKG --deps-only
# build
make