forked from alicevision/AliceVision
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
126 lines (110 loc) · 3.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
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
116
117
118
119
120
121
122
123
124
125
#
# 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
- boost-latest
packages:
#- cmake # Manually install latest version (>=3.0)
- libboost1.55-all-dev
- lcov
- libpng-dev
- libjpeg8-dev
- libtiff4-dev
- libxxf86vm1
- libxxf86vm-dev
- x11proto-xf86vidmode-dev
- libxrandr-dev
- g++-4.8
- libatlas-base-dev
- libsuitesparse-dev
env:
global:
- NUM_CPU="`grep processor /proc/cpuinfo | wc -l`"; echo $NUM_CPU
- BUILD_TYPE="Release"
- BUILD_SYSTEM="`uname -s`"
- BUILD_PROCESSOR="`uname -p`"
- DEPS_INSTALL_PATH=${TRAVIS_BUILD_DIR}/install-deps
before_install:
- date -u
- uname -a
- if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
lsb_release -a;
elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
sw_vers -productVersion;
fi
- ccache -s
- gem install coveralls-lcov
install:
- ./ci/install-cmake.sh
- ./ci/install-dependencies.sh
before_script:
- . ./ci/env.sh
- export CXX="g++-4.8"
- mkdir $OPENMVG_BUILD
- cd $OPENMVG_BUILD
- >
cmake \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DOpenMVG_BUILD_TESTS=ON \
-DOpenMVG_BUILD_EXAMPLES=ON \
-DOpenMVG_USE_OPENCV=ON \
-DOpenCV_DIR="${DEPS_INSTALL_PATH}/share/OpenCV" \
-DOpenMVG_USE_OPENGV=ON \
-DOPENGV_DIR="${DEPS_INSTALL_PATH}" \
-DOpenMVG_USE_BOOST=ON \
-DBOOST_NO_CXX11=ON \
-DOpenMVG_USE_INTERNAL_CERES=OFF \
-DCeres_DIR="${DEPS_INSTALL_PATH}/share/Ceres" \
-DEIGEN_INCLUDE_DIR_HINTS="${DEPS_INSTALL_PATH}" \
-DOpenMVG_USE_CCTAG=OFF \
. $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 folder_not_empty "$GT_TEST_SOURCE"; then
echo "Evaluation benchmark found in cache.";
else
git clone --branch master https://github.com/alicevision/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} > ../gt_log.log 2>&1
- cat ../gt_log.log | tail -n 150
- 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:
# - 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
# Before uploading the new cache archive
before_cache:
- ccache -s
cache:
# Enable compiler cache
ccache: true