Skip to content

Commit df6ccaa

Browse files
author
David Scott
committed
Add travis test files
Signed-off-by: David Scott <[email protected]>
1 parent dbb5722 commit df6ccaa

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.travis-ci.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# OPAM packages needed to build tests.
2+
OPAM_PACKAGES="vhd-format lwt cstruct uuidm cmdliner tapctl nbd.0.9.1 cohttp xcp xenstore xenstore_transport uri"
3+
4+
5+
case "$OCAML_VERSION,$OPAM_VERSION" in
6+
3.12.1,1.0.0) ppa=avsm/ocaml312+opam10 ;;
7+
3.12.1,1.1.0) ppa=avsm/ocaml312+opam11 ;;
8+
4.00.1,1.0.0) ppa=avsm/ocaml40+opam10 ;;
9+
4.00.1,1.1.0) ppa=avsm/ocaml40+opam11 ;;
10+
4.01.0,1.0.0) ppa=avsm/ocaml41+opam10 ;;
11+
4.01.0,1.1.0) ppa=avsm/ocaml41+opam11 ;;
12+
*) echo Unknown $OCAML_VERSION,$OPAM_VERSION; exit 1 ;;
13+
esac
14+
15+
echo "yes" | sudo add-apt-repository ppa:$ppa
16+
sudo apt-get update -qq
17+
sudo apt-get install -qq ocaml ocaml-native-compilers camlp4-extra opam
18+
export OPAMYES=1
19+
export OPAMVERBOSE=1
20+
echo OCaml version
21+
ocaml -version
22+
echo OPAM versions
23+
opam --version
24+
opam --git-version
25+
26+
opam init
27+
opam remote add xapi-project git://github.com/xapi-project/opam-repo-dev
28+
opam install ${OPAM_PACKAGES}
29+
30+
eval `opam config -env`
31+
make

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
language: c
2+
script: bash -ex .travis-ci.sh
3+
env:
4+
- OCAML_VERSION=4.01.0 OPAM_VERSION=1.1.0

0 commit comments

Comments
 (0)