forked from alicevision/AliceVision
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
115 lines (105 loc) · 4.06 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#
# 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:
- boost-latest
- ubuntu-toolchain-r-test
packages:
- cmake
- libeigen3-dev
- libboost1.55-all-dev
- 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
- BUILD_TYPE="Release"
- BUILD_SYSTEM="`uname -s`"
- BUILD_PROCESSOR="`uname -p`"
- OPENMVG_SOURCE=${TRAVIS_BUILD_DIR}/src
- OPENMVG_BUILD=${TRAVIS_BUILD_DIR}/build
# GT tests
- GT_TEST_ROOT=${TRAVIS_BUILD_DIR}/gt_test
- GT_TEST_SOURCE=${GT_TEST_ROOT}/gt_source
- GT_TEST_RESULTS=${GT_TEST_ROOT}/result.json
- GT_TEST_OUTPUT=${GT_TEST_ROOT}/gt_output
# OPENCV
- OPENCV_ROOT=${TRAVIS_BUILD_DIR}/opencv3
- OPENCV_SOURCE=${OPENCV_ROOT}/source
- OPENCV_CONTRIB=${OPENCV_ROOT}/contrib
- OPENCV_BUILD=${OPENCV_ROOT}/build
- OPENCV_INSTALL=${OPENCV_ROOT}/install
before_install:
- gem install coveralls-lcov
# OPENCV
- mkdir --parent $OPENCV_SOURCE
- mkdir --parent $OPENCV_CONTRIB
- mkdir --parent $OPENCV_BUILD
- mkdir --parent $OPENCV_INSTALL
- if [ ! "$(ls -A $OPENCV_INSTALL)" ]; then git clone --recursive --branch 3.0.0 --depth 1 https://github.com/Itseez/opencv.git $OPENCV_SOURCE; fi
- if [ ! "$(ls -A $OPENCV_CONTRIB)" ]; then git clone --branch 3.0.0 --depth 1 https://github.com/Itseez/opencv_contrib.git $OPENCV_CONTRIB; fi
install:
# OPENCV
- cd $OPENCV_BUILD
- if [ ! "$(ls -A $OPENCV_INSTALL)" ]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$OPENCV_INSTALL -DOPENCV_EXTRA_MODULES_PATH=$OPENCV_CONTRIB/modules $OPENCV_SOURCE; fi
- if [ ! "$(ls -A $OPENCV_INSTALL)" ]; then make -j 16; fi
- if [ ! "$(ls -A $OPENCV_INSTALL)" ]; then make install; fi
- ls -l $OPENCV_INSTALL
before_script:
- export CXX="g++-4.8"
# Create build folder
- mkdir $OPENMVG_BUILD
- cd $OPENMVG_BUILD
# Classic release build
- cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DOpenMVG_BUILD_TESTS=ON -DOpenMVG_BUILD_EXAMPLES=ON -DOpenMVG_USE_OPENCV=ON -DOpenCV_DIR=$OPENCV_INSTALL/share/OpenCV -DOpenMVG_BUILD_VOCTREE=ON -DOpenMVG_USE_CCTAG=OFF -DBOOST_NO_CXX11=ON . $OPENMVG_SOURCE
# 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
- make -j 2 VERBOSE=1
# Perform unit tests only on GCC builds
- if [ "$CC" = "gcc" ]; then make test; fi
# Perform benchmark through ground truth tests with many scenes
- if [ ! "$(ls -A $GT_TEST_SOURCE)" ]; then git clone --branch dev https://github.com/caymard/SfM_quality_evaluation.git $GT_TEST_SOURCE; fi
- cd $GT_TEST_SOURCE
- git pull
- python EvaluationLauncher.py -s "$OPENMVG_BUILD/$BUILD_SYSTEM-$BUILD_PROCESSOR-$BUILD_TYPE" -i Benchmarking_Camera_Calibration_2008/ -o ${GT_TEST_OUTPUT} -r ${GT_TEST_RESULTS}
- cat ${GT_TEST_RESULTS}
# Return to root and remove GT huge files to avoid cache problems
- cd $TRAVIS_BUILD_DIR
- rm -rf $GT_TEST_SOURCE
- rm -rf $GT_TEST_OUTPUT
after_success:
- du -hs $OPENCV_SOURCE
- du -hs $OPENCV_CONTRIB
- du -hs $OPENCV_BUILD
- du -hs $OPENCV_INSTALL
#- 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
cache:
directories:
- $OPENCV_INSTALL