-
Notifications
You must be signed in to change notification settings - Fork 36
/
.travis-ci.sh
executable file
·64 lines (41 loc) · 1.28 KB
/
.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
set -ex
if [ -n "${PACKAGE-}" ]
then
# build using opam, run tests, build package, install package
wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh
. .travis-opam.sh
else
# install ocaml, install basic build dependencies, run standard build
if [ "$TRAVIS_OS_NAME" = "osx" ]
then
brew update
# see https://github.com/Homebrew/homebrew-core/issues/26358
brew upgrade python
# build dependencies (Mac OS X)
brew install ocaml opam
# optional dependencies for running tests
brew install protobuf
echo OCaml version
ocaml -version
echo OPAM versions
opam --version
opam --git-version
export OPAMYES=1
opam init
eval `opam config env`
# so that tests pass with the latest protobuf version
export CXXFLAGS='-std=c++14'
else
# install specific ocaml version
wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-ocaml.sh
. .travis-ocaml.sh
fi
opam install --deps-only ./opam
./configure
make
make test
make doc
# checking for broken doc links -- the test is flaky, disabling for now
#make -C doc test
fi