-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
130 lines (120 loc) · 3.75 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Copyright - Benjamin Laugraud <blaugraud@ulg.ac.be> - 2017
# http://www.montefiore.ulg.ac.be/~blaugraud
# http://www.telecom.ulg.ac.be/labgen
#
# This file is part of LaBGen.
#
# LaBGen is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# LaBGen is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LaBGen. If not, see <http://www.gnu.org/licenses/>.
language: cpp
cache:
directories: $HOME/opencv-3.2.0
matrix:
include:
- os: linux
dist: trusty
compiler: g++
env: OPENCV_VERSION=2
- os: linux
dist: trusty
compiler: g++
env: OPENCV_VERSION=3
- os: osx
compiler: clang++
env: OPENCV_VERSION=2
- os: osx
compiler: clang++
env: OPENCV_VERSION=3
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]];
then
sudo apt-get update -qq;
elif [[ "$TRAVIS_OS_NAME" == "osx" ]];
then
/usr/bin/yes | pip uninstall numpy;
brew update;
brew tap homebrew/science;
fi
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]];
then
sudo apt-get install -qq libboost-program-options-dev;
if [[ "$OPENCV_VERSION" == "2" ]];
then
sudo apt-get install -qq libopencv-dev;
elif [[ "$OPENCV_VERSION" == "3" ]];
then
sudo apt-get install -qq libavcodec54
libavcodec-dev
libavformat54
libavformat-dev
libavresample1
libavresample-dev
libavutil52
libavutil-dev
libswscale2
libswscale-dev
libtbb2
libtbb-dev
libjpeg-dev
libpng-dev
libtiff-dev
libjasper-dev
libeigen3-dev;
fi;
elif [[ "$TRAVIS_OS_NAME" == "osx" ]];
then
if [[ "$OPENCV_VERSION" == "2" ]];
then
brew install opencv;
elif [[ "$OPENCV_VERSION" == "3" ]];
then
brew install opencv3;
brew ln opencv3 --force;
fi;
fi
before_script:
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$OPENCV_VERSION" == "3" ]];
then
cd "$HOME";
if [[ -n "$(ls -A opencv-3.2.0)" ]];
then
echo "OpenCV 3.2 has been fetched from the cache";
cd opencv-3.2.0/build;
else
echo "Compiling and installing OpenCV 3.2";
wget https://github.com/opencv/opencv/archive/3.2.0.tar.gz;
tar zxf 3.2.0.tar.gz;
cd opencv-3.2.0;
mkdir build;
cd build;
cmake -DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=/usr/local
-DWITH_OPENCL=OFF
-DWITH_CUDA=OFF
-DWITH_VTK=OFF
-DWITH_MATLAB=OFF
-DBUILD_opencv_java=OFF
-DBUILD_opencv_python2=OFF
-DBUILD_opencv_python3=OFF
-DBUILD_TESTS=OFF
-DBUILD_PERF_TESTS=OFF ..;
make -j4;
fi;
sudo make -j4 install;
cd "$TRAVIS_BUILD_DIR";
fi
script:
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j4