forked from colmap/colmap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
93 lines (87 loc) · 2.42 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
language: cpp
sudo: true
dist: trusty
matrix:
include:
- os: linux
env: CMAKE_OPTIONS="-DOPENGL_ENABLED=OFF -DCeres_DIR=${TRAVIS_BUILD_DIR}/deps/ceres-solver/install/lib/cmake/Ceres -DQt5Core_DIR=/opt/qt54/lib/cmake/Qt5Core -DQt5OpenGL_DIR=/opt/qt54/lib/cmake/Qt5OpenGL" QT_QPA_PLATFORM=offscreen
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- cmake
- build-essential
- libboost-program-options-dev
- libboost-filesystem-dev
- libboost-regex-dev
- libboost-system-dev
- libboost-test-dev
- libeigen3-dev
- libatlas-base-dev
- libsuitesparse-dev
- libfreeimage-dev
- libgoogle-glog-dev
- libgflags-dev
- libglew-dev
- os: osx
env: CMAKE_OPTIONS="-DIPO_ENABLED=OFF -DQt5Core_DIR=/usr/local/opt/qt5/lib/cmake/Qt5Core -DQt5OpenGL_DIR=/usr/local/opt/qt5/lib/cmake/Qt5OpenGL"
cache:
directories:
- ${TRAVIS_BUILD_DIR}/deps
- ${TRAVIS_BUILD_DIR}/build
before_script:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew tap homebrew/science
brew install \
cmake \
boost \
eigen \
freeimage \
glog \
gflags \
suite-sparse \
ceres-solver \
qt5 \
glew || true
fi
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
sleep 3
sudo add-apt-repository --yes ppa:beineri/opt-qt542-trusty
sudo apt-get update -qq
sudo apt-get -y install qt54base
cd ${TRAVIS_BUILD_DIR}/deps
if [[ -z "$(ls -A ceres-solver)" ]]; then
git clone https://ceres-solver.googlesource.com/ceres-solver
fi
cd ceres-solver
git pull
mkdir -p build install
cd build
cmake .. \
-DBUILD_TESTING=OFF \
-DBUILD_EXAMPLES=OFF \
-DCMAKE_INSTALL_PREFIX=../install
make -j2
make install
cd ${TRAVIS_BUILD_DIR}
fi
script:
- cmake --version
- cd build
- |
if [[ -z "$(ls -A colmap)" ]]; then
git clone https://github.com/colmap/colmap.git
fi
- cd colmap
- git checkout ${TRAVIS_BRANCH}
- git pull
- mkdir -p build
- cd build
- cmake .. -DCMAKE_BUILD_TYPE=Release -DTESTS_ENABLED=ON ${CMAKE_OPTIONS}
- make -j2
- CTEST_OUTPUT_ON_FAILURE=1 make test