forked from OpenLightingProject/ola
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
225 lines (214 loc) · 6.88 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
language: cpp
# To get the Trusty image, not actually required
sudo: required
script:
- "bash -ex .travis-ci.sh"
addons:
apt:
packages: &base_build
# This is the absolute minimum for configure to pass
# Non C++ based tasks use it so they can run make builtfiles
- ccache
- libcppunit-dev
- bison
- flex
- uuid-dev
- libprotobuf-dev
- protobuf-compiler
- libprotoc-dev
packages: &core_build
# This is all the bits we need to enable all options
- *base_build
- libftdi-dev
- libftdi1
- libusb-1.0-0-dev
- liblo-dev
- libavahi-glib1
- libncurses5-dev
- libmicrohttpd-dev
packages: &core_build_gpp_latest
- *core_build
- g++-6
packages: &core_build_clang_latest
- *core_build
- clang-3.8
matrix:
fast_finish: true
include:
- os: osx
osx_image: xcode7.3
compiler: clang
env: TASK='compile'
- os: osx
osx_image: xcode7.3
compiler: gcc
env: TASK='compile'
- os: linux
dist: trusty
compiler: clang
env: TASK='compile'
python: '2.7'
addons:
apt:
packages:
- *core_build_clang_latest
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
- os: linux
dist: trusty
compiler: gcc
env: TASK='compile'
python: '2.7'
addons:
apt:
packages:
- *core_build_gpp_latest
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: trusty
compiler: gcc
env: TASK='coverage'
addons:
apt:
packages:
- *core_build_gpp_latest
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: trusty
compiler: gcc
env: TASK='coverity'
addons:
apt:
packages:
# Coverity doesn't work with g++-5 or g++-6 yet
- *core_build
- g++-4.9
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: trusty
env: TASK='doxygen'
addons:
apt:
packages:
- *core_build_gpp_latest
- doxygen
- graphviz
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: trusty
env: TASK='lint'
addons:
apt:
packages:
- *core_build
- os: linux
dist: trusty
env: TASK='check-licences'
addons:
apt:
packages:
- *core_build
- os: linux
dist: trusty
env: TASK='jshint'
addons:
apt:
packages:
- os: linux
dist: trusty
env: TASK='flake8'
addons:
apt:
packages:
- *base_build
- os: linux
dist: trusty
env: TASK='pychecker'
addons:
apt:
packages:
- *base_build
- os: linux
dist: trusty
env: TASK='pychecker-wip'
addons:
apt:
packages:
- *base_build
allow_failures:
- os: linux
dist: trusty
compiler: gcc
env: TASK='coverage'
- os: linux
dist: trusty
compiler: gcc
env: TASK='coverity'
- os: linux
dist: trusty
env: TASK='pychecker-wip'
env:
global:
# -- BEGIN Coverity Scan ENV
- COVERITY_SCAN_BUILD_COMMAND_PREPEND="autoreconf -i && ./configure --enable-ja-rule"
# The build command with all of the arguments that you would apply to a manual `cov-build`
# Usually this is the same as STANDARD_BUILD_COMMAND, exluding the automated test arguments
- COVERITY_SCAN_BUILD_COMMAND="make"
# Name of the project
- COVERITY_SCAN_PROJECT_NAME="$TRAVIS_REPO_SLUG"
# Email address for notifications related to this build
- COVERITY_SCAN_NOTIFICATION_EMAIL="ola-coverity@pjnewman.co.uk"
# Regular expression selects on which branches to run analysis
# Be aware of quotas. Do not run on every branch/commit
- COVERITY_SCAN_BRANCH_PATTERN=".*"
# COVERITY_SCAN_TOKEN via "travis encrypt" using the repo's public key
- secure: "U+NmPtScHZ1NLmkDrzpqApHmJvELV44cXgjQsxA8N8xIATckbs+DrmWSNeECENyvuOPz+nPzglSgBvJtejf97jYJIIwAExq5TJMUAIPFS6KU3mohODW2PZSoVoUyJPzFIlhzcELQgONI+ILLm29lNdQNb7GFUVtO6+jS10AFtWY="
# -- END Coverity Scan ENV
cache:
apt: true
directories:
- $HOME/.cache/pip # pip cache
- $HOME/.npm # npm cache
- $HOME/.ccache # ccache cache
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log # erase log
- ccache -s # see how many hits ccache got
install:
# Match the version of protobuf being installed via apt
- pip install --user protobuf==3.0.0
# We need to use pip rather than apt on Trusty
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then pip install --user numpy; fi
- if [ "$TASK" = "coverage" ]; then pip install --user cpp-coveralls; fi
- if [ "$TASK" = "flake8" ]; then pip install --user flake8; fi
- if [ "$TASK" = "jshint" ]; then npm install -g grunt-cli; fi
- if [ "$TASK" = "pychecker" -o "$TASK" = "pychecker-wip" ]; then pip install --user http://sourceforge.net/projects/pychecker/files/pychecker/0.8.19/pychecker-0.8.19.tar.gz/download; fi
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
#Fix a broken homebrew libtool install
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew reinstall -s libtool; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ccache cppunit bison flex protobuf protobuf-c libftdi libftdi0 libusb liblo libmicrohttpd; fi # ossp-uuid, homebrew/python/numpy already present
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir -p ${HOME}/Library/Python/2.7/lib/python/site-packages; echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> ${HOME}/Library/Python/2.7/lib/python/site-packages/homebrew.pth; fi
#Coverity doesn't work with g++ 5 or 6, so only upgrade to g++ 4.9 for that
- if [ "$TRAVIS_OS_NAME" == "linux" -a \( "$TASK" = "compile" -o "$TASK" = "coverage" -o "$TASK" = "doxygen" \) -a "$CXX" = "g++" ]; then export CXX="ccache g++-6" CC="ccache gcc-6"; fi
- if [ "$TASK" = "coverity" -a "$CXX" = "g++" ]; then export CXX="ccache g++-4.9" CC="ccache gcc-4.9"; fi
#Use the latest clang if we're compiling with clang
- if [ "$TRAVIS_OS_NAME" == "linux" -a "$CXX" = "clang++" ]; then export CXX="clang++-3.8" CC="clang-3.8"; fi
#Report the compiler version
- $CXX --version
after_failure:
- cat ${TRAVIS_BUILD_DIR}/ola-*/_build/test-suite.log
after_success:
- if [ "$TASK" = "coverage" ]; then coveralls --gcov /usr/bin/gcov-6 -b . -E '.*Test\.cpp$' -E '.*\.pb\.cc$' -E '.*\.pb\.cpp$' -E '.*\.pb\.h$' -E '.*\.yy\.cpp$' -E '.*\.tab\.cpp$' -E '.*\.tab\.h$' -E '.*/doxygen/examples.*$' --gcov-options '\-lp' > /dev/null; fi
after_script:
- if [ "$TASK" = "coverity" ]; then cat ${TRAVIS_BUILD_DIR}/cov-int/scm_log.txt; fi
notifications:
irc:
channels:
- "chat.freenode.net#openlighting"
on_success: change
on_failure: change