forked from OSVR/OSVR-Core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
115 lines (115 loc) · 3.82 KB
/
.travis.yml
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
language: cpp
compiler:
- clang
- gcc
os:
- osx
- linux
env:
- CONFIG=Release
- CONFIG=Debug
matrix:
exclude:
- os: osx
compiler: gcc
cache:
directories:
$HOME/deps-rel
$HOME/deps-dbg
before_install:
- if [ $CC = gcc ]; then export CXX="g++-5" CC="gcc-5"; fi
- if [ $TRAVIS_OS_NAME = 'linux' -a $CC = 'clang' ]; then export CXX="clang++-3.7" CC="clang-3.7"; fi
- $CC -v
- if [ $TRAVIS_OS_NAME = 'linux' ]; then export INSTPRF=$HOME/p; mkdir -p $INSTPRF; fi
- if [ $TRAVIS_OS_NAME = 'linux' ]; then export OPENCV_VER=3.0.0; fi
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then brew update; fi"
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then brew tap homebrew/science; fi"
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then brew tap d235j/osvr; fi"
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then
if [ $CONFIG = 'Release' ]; then
export DEPSDIR=$HOME/deps-rel;
else
export DEPSDIR=$HOME/deps-dbg;
fi;
fi"
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then
mkdir -p $DEPSDIR;
pushd $DEPSDIR;
if [ -d jsoncpp ]; then
pushd jsoncpp;
git pull;
popd;
else
git clone https://github.com/open-source-parsers/jsoncpp.git;
fi;
if [ -d libfunctionality ]; then
pushd libfunctionality;
git pull;
popd;
else
git clone https://github.com/OSVR/libfunctionality.git;
fi;
if [ ! -d opencv-${OPENCV_VER} ]; then
curl -LR https://github.com/Itseez/opencv/archive/${OPENCV_VER}.zip -o opencv-${OPENCV_VER}.zip;
unzip opencv-${OPENCV_VER}.zip;
fi;
popd;
fi"
install:
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then brew uninstall json-c; fi"
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then brew install libusb opencv; fi"
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then brew install jsoncpp; fi"
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then brew install libfunctionality --HEAD; fi"
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then
pushd $DEPSDIR;
mkdir -p libfunctionality/build;
pushd libfunctionality/build;
cmake .. -DCMAKE_INSTALL_PREFIX=$INSTPRF -DCMAKE_BUILD_TYPE=${CONFIG};
make -j2 install;
popd;
mkdir -p jsoncpp/build;
pushd jsoncpp/build;
cmake .. -DCMAKE_INSTALL_PREFIX=$INSTPRF -DCMAKE_BUILD_TYPE=${CONFIG} -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DJSONCPP_WITH_CMAKE_PACKAGE=ON;
make -j2 install;
popd;
mkdir -p opencv-${OPENCV_VER}/build;
pushd opencv-${OPENCV_VER}/build;
cmake .. -DCMAKE_INSTALL_PREFIX=$INSTPRF -DCMAKE_BUILD_TYPE=${CONFIG} \
-DWITH_1394=OFF -DWITH_FFMPEG=OFF -DWITH_IPP=OFF -DWITH_WEBP=OFF \
-DBUILD_DOCS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF \
-DBUILD_opencv_apps=OFF -DBUILD_opencv_java=OFF -DBUILD_opencv_python2=OFF \
-DBUILD_opencv_ts=OFF;
make -j2 install;
popd;
popd;
fi"
script:
- "git submodule update --init --recursive;"
- "mkdir build;"
- "cd build;"
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then cmake .. -DCMAKE_BUILD_TYPE=${CONFIG} -DCMAKE_OSX_ARCHITECTURES=x86_64; fi"
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then cmake .. -DCMAKE_PREFIX_PATH=$INSTPRF -DCMAKE_BUILD_TYPE=${CONFIG}; fi"
- "make all -j2"
# TODO need to sort out false-failures due to container/platform issues.
# - "ctest -V"
sudo: false
addons:
apt:
sources:
- boost-latest
- george-edison55-precise-backports
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
packages:
- libusb-1.0-0-dev
- libboost-thread1.55-dev
- libboost-system1.55-dev
- libboost-date-time1.55-dev
- libboost-chrono1.55-dev
- libboost-program-options1.55-dev
- libboost-filesystem1.55-dev
- cmake-data
- cmake
- gcc-5
- g++-5
- clang-3.7