-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy path.travis.yml
138 lines (132 loc) · 3.43 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
131
132
133
134
135
136
137
138
language: cpp
env:
global:
- DEPS_DIR=${HOME}/deps
- INSTALL_PREFIX=${HOME}/usr
- EIGEN3_VERSION=3.3.4
cache:
ccache: true
directories:
- ${DEPS_DIR}/eigen-${EIGEN3_VERSION}
- ${DEPS_DIR}/opencv-${OPENCV_VERSION}
matrix:
include:
- os: linux
dist: xenial
addons:
apt:
update: true
packages:
build-essential
pkg-config
cmake
wget
env:
- OPENCV_VERSION=3.3.1
- os: linux
dist: xenial
addons:
apt:
update: true
packages:
build-essential
pkg-config
cmake
wget
env:
- OPENCV_VERSION=4.1.0
- os: osx
osx_image: xcode10.2
addons:
homebrew:
update: true
packages:
pkg-config
cmake
git
env:
- OPENCV_VERSION=3.3.1
- os: osx
osx_image: xcode10.2
addons:
homebrew:
update: true
packages:
pkg-config
cmake
git
env:
- OPENCV_VERSION=4.1.0
before_install:
- |
mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
if [ ! -d eigen-${EIGEN3_VERSION} ]; then
echo "download Eigen3"
wget -q http://bitbucket.org/eigen/eigen/get/${EIGEN3_VERSION}.tar.bz2
tar xf ${EIGEN3_VERSION}.tar.bz2
rm -rf ${EIGEN3_VERSION}.tar.bz2
mv eigen-eigen-* eigen-${EIGEN3_VERSION}
elif [ -z "$(ls eigen-${EIGEN3_VERSION})" ]; then
echo "redownload Eigen3"
rm -rf eigen-${EIGEN3_VERSION}
wget -q http://bitbucket.org/eigen/eigen/get/${EIGEN3_VERSION}.tar.bz2
tar xf ${EIGEN3_VERSION}.tar.bz2
rm -rf ${EIGEN3_VERSION}.tar.bz2
mv eigen-eigen-* eigen-${EIGEN3_VERSION}
fi
cd eigen-${EIGEN3_VERSION}
mkdir -p build && cd build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
..
make -j 2
make install
export Eigen3_DIR=${INSTALL_PREFIX}/share/eigen3/cmake
- |
mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
if [ ! -d opencv-${OPENCV_VERSION} ]; then
echo "download OpenCV"
wget -q https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip
unzip -q ${OPENCV_VERSION}.zip
rm -rf ${OPENCV_VERSION}.zip
elif [ -z "$(ls opencv-${OPENCV_VERSION})" ]; then
echo "redownload OpenCV"
rm -rf opencv-${OPENCV_VERSION}
wget -q https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip
unzip -q ${OPENCV_VERSION}.zip
rm -rf ${OPENCV_VERSION}.zip
fi
cd opencv-${OPENCV_VERSION}
mkdir -p build && cd build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
-DENABLE_CXX11=ON \
-DBUILD_DOCS=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_JASPER=OFF \
-DBUILD_OPENEXR=OFF \
-DBUILD_PERF_TESTS=OFF \
-DBUILD_TESTS=OFF \
-DWITH_EIGEN=ON \
-DWITH_FFMPEG=ON \
-DWITH_OPENMP=ON \
..
make -j 2
make install
export OpenCV_DIR=${INSTALL_PREFIX}/share/OpenCV
install:
- |
cd ${TRAVIS_BUILD_DIR}
mkdir -p build && cd build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
..
make -j 2
make install
script:
- cd ${TRAVIS_BUILD_DIR}
- cd build
- ctest -V