-
Notifications
You must be signed in to change notification settings - Fork 356
/
.travis.yml
64 lines (54 loc) · 1.39 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
dist: trusty
sudo: false
language: cpp
compiler:
- clang
- gcc
cache:
apt: true
addons:
apt:
packages:
- build-essential
- python-dev
- libboost-python-dev
- python-numpy-dev
- libeigen3-dev
env:
global:
# CMAKE minimal required version 3.1.0
- CMAKE_URL="https://cmake.org/files/v3.1/cmake-3.1.3-Linux-x86_64.tar.gz"
- CMAKE_ROOT=${TRAVIS_BUILD_DIR}/cmake
- CMAKE_SOURCE=${CMAKE_ROOT}/source
- CMAKE_INSTALL=${CMAKE_ROOT}/install
before_install:
# CMAKE most recent version
- >
if [ "$(ls -A ${CMAKE_INSTALL})" ]; then
echo "CMake found in cache.";
ls -A ${CMAKE_INSTALL}
export PATH=${CMAKE_INSTALL}/bin:${PATH};
cmake --version
else
mkdir --parent ${CMAKE_SOURCE}
mkdir --parent ${CMAKE_INSTALL}
ls -A ${CMAKE_INSTALL}
travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${CMAKE_INSTALL}
export PATH=${CMAKE_INSTALL}/bin:${PATH};
cmake --version
fi
before_script:
- mkdir build
- cd build
- >
if [ $CXX = "clang++" ]; then
cmake .. -DBUILD_TESTS:BOOL=ON -DBUILD_PYTHON:BOOL=ON -DCMAKE_CXX_FLAGS="-Wno-deprecated-register"
else
cmake .. -DBUILD_TESTS:BOOL=ON -DBUILD_PYTHON:BOOL=ON
fi
script:
- make -j2 VERBOSE=1
- make test
cache:
directories:
- $CMAKE_INSTALL