forked from openMVG/openMVG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (41 loc) · 1.53 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
#
# http://travis-ci.org configuration file for openMVG
#
language: cpp
compiler:
- gcc
- clang
before_install:
- sudo apt-get update -qq
- export NUM_CPU="`grep processor /proc/cpuinfo | wc -l`"; echo $NUM_CPU
- sudo apt-get install lcov
- gem install coveralls-lcov
install: sudo apt-get install cmake libpng-dev libjpeg8-dev libxxf86vm1 libxxf86vm1 libxxf86vm-dev x11proto-xf86vidmode-dev libxrandr-dev
before_script:
- cd ..
- mkdir build
- cd build
# Classic release build
#- cmake -DCMAKE_BUILD_TYPE=release -DOpenMVG_BUILD_TESTS=ON -DOpenMVG_BUILD_EXAMPLES=ON . ../openMVG/src
# Build for code coverage evaluation
- cmake -DOpenMVG_BUILD_COVERAGE=ON -DOpenMVG_BUILD_TESTS=ON -DOpenMVG_BUILD_EXAMPLES=ON . ../openMVG/src
script:
# limit GCC builds to a reduced number of thread for the virtual machine
- if [ "$CC" = "gcc" ]; then make -j 2; else make -j 4; fi
# 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