forked from openMVG/openMVG
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
71 lines (60 loc) · 1.83 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
#
# http://travis-ci.org configuration file for openMVG
#
language: cpp
compiler:
- gcc
#- clang: #Consider clang later, since cereal does not build fine on the clang CI version
# - "3.3"
sudo: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- cmake
- lcov
- libpng-dev
- libjpeg8-dev
- libtiff4-dev
- libxxf86vm1
- libxxf86vm-dev
- x11proto-xf86vidmode-dev
- libxrandr-dev
- g++-4.8
env:
global:
- NUM_CPU="`grep processor /proc/cpuinfo | wc -l`"; echo $NUM_CPU
- OPENMVG_SOURCE=${TRAVIS_BUILD_DIR}/src
- OPENMVG_BUILD=${TRAVIS_BUILD_DIR}/build
before_install:
- gem install coveralls-lcov
before_script:
- export CXX="g++-4.8"
# Create build folder
- mkdir $OPENMVG_BUILD
- cd $OPENMVG_BUILD
# Classic release build
- cmake -DCMAKE_BUILD_TYPE=release -DOpenMVG_BUILD_TESTS=ON -DOpenMVG_BUILD_EXAMPLES=ON . $OPENMVG_SOURCE
# Build for code coverage evaluation
#- cmake -DOpenMVG_BUILD_COVERAGE=ON -DOpenMVG_BUILD_TESTS=ON -DOpenMVG_BUILD_EXAMPLES=ON . $OPENMVG_SOURCE
script:
# limit GCC builds to a reduced number of thread for the virtual machine
- make -j 2
# Perform unit tests only on GCC builds
- if [ "$CC" = "gcc" ]; then make test; fi
branches:
only:
- develop
after_success:
#- cd ../openMVG
# If GCC: compute code coverage and export it to coveralls
#- if [ "$CC" = "gcc" ];
# then
# lcov --directory ../build/openMVG --base-directory=./src --capture --output-file=coverage.info;
# lcov --remove coverage.info '/usr*' -o coverage.info;
# lcov --remove coverage.info '*_test.cpp*' -o coverage.info;
# lcov --remove coverage.info '*/third_party/*' -o coverage.info;
# lcov --remove coverage.info '*/src/dependencies/*' -o coverage.info;
# coveralls-lcov coverage.info;
# fi