-
Notifications
You must be signed in to change notification settings - Fork 269
/
.travis.yml
87 lines (81 loc) · 2.33 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
language: cpp
sudo: true
dist: trusty
matrix:
include:
- os: linux
env: CMAKE_OPTIONS="-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=bin -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
- libeigen3-dev
- libatlas-base-dev
- libsuitesparse-dev
- libfreeimage-dev
- libgoogle-glog-dev
- libgflags-dev
- libglew-dev
- os: osx
env: CMAKE_OPTIONS="-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=bin -DIPO_ENABLED=OFF -DQt5_DIR=/usr/local/opt/qt5/lib/cmake/Qt5 -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 \
eigen \
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
sudo apt-get -y install libopencv-dev
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
make -j2
make install
cd ${TRAVIS_BUILD_DIR}
fi
script:
- cmake --version
- cd build
- |
if [[ -z "$(ls -A GSLAM)" ]]; then
git clone https://github.com/zdzhaoyong/GSLAM.git
fi
- cd GSLAM
- git checkout ${TRAVIS_BRANCH}
- git pull
- mkdir -p build
- cd build
- pwd
- cmake .. -DCMAKE_BUILD_TYPE=Release -DTESTS_ENABLED=ON ${CMAKE_OPTIONS}
- make -j2
- ./bin/gslam Act=Tests