forked from mirage/mirage-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis-ci.sh
executable file
·43 lines (31 loc) · 968 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
40
41
42
43
PACKAGES="lwt ssl mirage cstruct ipaddr io-page crunch"
## different PPAs required to cover the test matrix
case "$OCAML_VERSION,$OPAM_VERSION" in
4.01.0,1.1.0) ppa=avsm/ocaml41+opam11 ;;
4.02.0,1.1.0) ppa=avsm/ocaml42+opam11 ;;
4.01.0,1.2.0) ppa=avsm/ocaml41+opam12 ;;
4.02.0,1.2.0) ppa=avsm/ocaml42+opam12 ;;
*) echo Unknown $OCAML_VERSION,$OPAM_VERSION; exit 1 ;;
esac
## install OCaml and OPAM
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
export OPAMYES=1
echo OCaml version
ocaml -version
echo OPAM versions
opam --version
opam --git-version
git config --global user.name "Travis"
git config --global user.email [email protected]
opam init >/dev/null 2>&1
opam update
eval `opam config env`
## install Mirage
opam install $PACKAGES
## execute the build
cd $TRAVIS_BUILD_DIR
make configure MODE=$MIRAGE_BACKEND
make depend
make build