-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
154 lines (139 loc) · 4.7 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
language:
- cpp
os:
- linux
dist: trusty
sudo: required
compiler:
- gcc
- clang
env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "addQ5v77eMIlPUb3gT1XXS+ZFsjPk9VdJEhifAaPjgv4yLo2HdKJ31+S009+luPVvgWMbd6Rjl40XpymPU85QPNm1mCIJQ7JCWGnZW0UNvtGdFfi7TegtXrBUjb1tWdKi2mhumS93Zi5adoPP27aJpZj0+8apNvqbtarV657U931FJw6Zn1DK2PKjVDDujFjejX9t33AWXggjB4xOIgPELmZ7OTxWFSTvHWNNQThcRkwd3d5i3a3f/YnPCids5cwyQG5eKHdT9DmEeFbKIdFhV9oZoukW5E4dcdnAXWPYYIkRyoOqwo/Kb6ynu6o5SCfLX+ijSKsqShi0d7mAAGzAPhePQxSwDbsD7ueuK6jDeCMElJQifwJ/dr2r93rPf+sriwdOsozy1Mkhrg6NB+QJe2n/CfffgKw5na+ImkQQ2Giybbvl261Z8pbBx1H9GswlfS5H4XKnLgueF9VYChqre5qarzTI4F8/Qimb67XPASxWJ9/hvFy8D5LLr/oADDoZpX8SeZnJ7IWWQcoDNrsgZxMbKnArr96nHRNdxcp5PdmrZi37BJsyRhrY4niu7WY+w7c7L9lGCtn9s4u3QLLls4KYiFsXlE9gzL3qGcBlonN6W/pk1Ew/lP1HxHBHzD2eugo8qs+t9WqpCFj1DzrYbtnaG5w6k32+jX6x09qBUk="
addons:
coverity_scan:
project:
name: "annotatorproject/annotatorlib"
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command_prepend: "cmake -DCMAKE_BUILD_TYPE=Debug ."
build_command: "cmake --build ."
branch_pattern: coverity_scan
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5
- g++-5
- build-essential
- cmake
- git
- rpm
- libgtk2.0-dev
- pkg-config
- libavcodec-dev
- libavformat-dev
- libswscale-dev
- python-dev
- python-numpy
- libtbb2
- libtbb-dev
- libjpeg-dev
- libpng-dev
- libtiff-dev
- libjasper-dev
- libdc1394-22-dev
- libboost-all-dev
- libpoco-dev
- libmysqlclient-dev
- libmongo-client-dev
- lcov
- texlive-fonts-recommended
- texlive-latex-extra
- texlive-fonts-extra
- dvipng
- texlive-latex-recommended
- texlive-full
install:
before_install:
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
- if [ $TRAVIS_OS_NAME == linux ]; then eval "$(curl -sL https://raw.githubusercontent.com/ryuichis/oclint-cpp-travis-ci-examples/master/oclint-ci-install.sh)"; fi
- sudo pip install cpp-coveralls
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
sudo apt-get update -qq
&& sudo apt-get install -qq qt5-qmake qtbase5-dev qtdeclarative5-dev qttools5-dev libqt5webkit5-dev
;
else
brew tap homebrew/science
&& brew update
&& brew install cmake
&& brew install qt5
&& brew install opencv3 --with-contrib
;
fi
before_script:
- sudo unlink /usr/bin/gcc && sudo ln -s /usr/bin/gcc-5 /usr/bin/gcc
- sudo unlink /usr/bin/g++ && sudo ln -s /usr/bin/g++-5 /usr/bin/g++
- gcc -v
- g++ -v
- wget http://www.cmake.org/files/v3.6/cmake-3.6.0.tar.gz
- tar xf cmake-3.6.0.tar.gz
- cd cmake-3.6.0
- ./configure
- make
- sudo make install
- cd ..
- curl -sL https://github.com/Itseez/opencv/archive/3.1.0.zip > opencv.zip
- unzip opencv.zip
- cd opencv-3.1.0
- mkdir build install
- cd build
- cmake -DCMAKE_BUILD_TYPE=RELEASE -DWITH_FFMPEG=OFF -DWITH_IPP=OFF ..
- make -j8
- sudo make install
- cd ../../
- git clone https://github.com/pocoproject/poco
- cd poco
- git checkout poco-1.8.0
- sed -i 's#mysqlclient_r#mysqlclient mysqlclient_r#g' cmake/FindMySQL.cmake
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release .. && make -j3 && sudo make install && sudo ldconfig
- cd ../..
- mkdir build
- cd build
- cmake -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DOPTION_BUILD_TESTS=1 -DOPTION_BUILD_PYTHON=0 -DOPTION_BUILD_DOCS=1 -DCMAKE_BUILD_TYPE=Coverage ..
script:
- make -j4
- make pack
after_success:
- make annotatorlib_coverage
- lcov --directory . --capture --output-file coverage.info # capture coverage info
- lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system
- lcov --list coverage.info #debug info
# Uploading report to CodeCov
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
- cd ..
- coveralls --root "." -E ".*/cmake-3.6.0/.*" -E ".*/opencv-3.1.0/.*" -E ".*/poco/.*" -E ".*/build/gtest/.*" -E ".*CMakeFiles.*" -E ".*tests/.*.cpp.*"
- cp build/compile_commands.json .
- oclint-json-compilation-database
deploy:
provider: releases
api_key: "$GH_TOKEN"
file_glob: true
file:
- $TRAVIS_BUILD_DIR/build/*.deb
- $TRAVIS_BUILD_DIR/build/*.rpm
- $TRAVIS_BUILD_DIR/build/docs/manual/annotatorlib.pdf
skip_cleanup: true
on:
tags: true
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/0b9437d0824d4035cf45
on_success: change
on_failure: always
on_start: never