forked from pocoproject/poco
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
350 lines (316 loc) · 16.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
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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
language: cpp
cache:
- apt
branches:
except:
- /.*pp.eyor.*/
- /.*Merge.*/
git:
submodules: false
before_install:
- git submodule update --init --recursive --remote
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y libpcre3-dev libssl-dev libexpat1-dev; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y libpq-dev unixodbc-dev libmysqlclient-dev libsqlite3-dev; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y sloccount cppcheck ninja-build; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y gcc-5 g++-5; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo bash -c "cat >> /etc/apt/sources.list" < build/script/clang.apt; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
services:
- mongodb
- redis-server
- postgresql
- mysql
dist: trusty
sudo: enabled
addons:
postgresql: "9.4"
notifications:
email:
on_success: never # default: change
on_failure: always # default: always
slack:
rooms:
secure: "b3/wLril+ga4p1iIDMbKkodPhvpG5cY/Fp73kqEonVKAtm9omHxQIprBygq0Hl7ZkRFF1Czs73mkCNHXGQLnYfX7EEr8Qk56s3y2AaUzDgWLuFbKk3XxUf1zExdF0HRm3WMoGz54sSsnDLm+MOhwTxoTdAbavJHaQHMtlAkLIQo="
on_success: never # default: change
on_failure: always # default: always
env:
global:
test=""
POCO_VERBOSE=1
before_script:
- export PATH=/usr/lib/postgresql/9.4/bin:$PATH
- echo ${test}
- chmod 755 ./travis/Linux/runtests.sh
- chmod 755 ./travis/OSX/runtests.sh
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then mysql -u root -e 'create database pocotestdb;'; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then mysql --version; fi
# - if [ "$TRAVIS_OS_NAME" == "linux" ]; then postgres --version; fi
- sqlite3 -version
matrix:
fast_finish: true
include:
- env: test="android API level 19"
language: android
jdk: openjdk8
android:
components:
- tools
- platform-tools
- tools
- build-tools-23.0.3
- extra-android-support
- extra-android-m2repository
- android-19
- android-24
- sys-img-armeabi-v7a-android-24
# Unfortunaly travis use the old android sdk tool instead of using the new sdkmanager.
# In this deprecated android sdk tool there is no ndk-bundle or cmake package!
licenses:
- '.+'
before_install:
- export TERM=dumb
- sudo apt-get update -qq
# I don't understand why redis and mongodb are not installed although services added above !
- sudo apt-get install -qq -y mongodb-server redis-server
- /usr/bin/redis-server &
- sudo /usr/bin/mongod --config /etc/mongodb.conf &
- touch ~/.android/repositories.cfg
- mkdir -p /usr/local/android-sdk/licenses
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > /usr/local/android-sdk/licenses/android-sdk-license
- echo -e "\nd56f5187479451eabf01fb78af6dfcb131a6481e" >> /usr/local/android-sdk/licenses/android-sdk-license
- echo -e "\n24333f8a63b6825ea9c5514f83c2829b004d1fee" >> /usr/local/android-sdk/licenses/android-sdk-license
# Install NDK and cmake via android sdkmanager.
- /usr/local/android-sdk/tools/bin/sdkmanager --update > /dev/null
- /usr/local/android-sdk/tools/bin/sdkmanager "emulator" "ndk-bundle" "cmake;3.6.4111459" > /dev/null
- /usr/local/android-sdk/tools/bin/sdkmanager --list
before_script:
- export TERM=dumb
- export _NO_CHECK_SIGNATURE=true
- echo no | /usr/local/android-sdk/tools/bin/avdmanager create avd -n test -k "system-images;android-24;default;armeabi-v7a"
- /usr/local/android-sdk/emulator/emulator -avd test -no-audio -no-window -dns-server 8.8.8.8 &
- android-wait-for-emulator
- /usr/local/android-sdk/platform-tools/adb shell input keyevent 82 &
script:
# Mandatory cmake parameter to set API level and platform for the android toolchain:
# /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/usr/local/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-22
# See also in /usr/local/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake
# Using the ninja build command. Is much faster then make build command.
- /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake -H. -Bcmake-build -G'Android Gradle - Ninja' -DANDROID_ABI=armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/usr/local/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-19 -DCMAKE_MAKE_PROGRAM=/usr/local/android-sdk/cmake/3.6.4111459/bin/ninja -DANDROID_STL="c++_static" -DANDROID_CPP_FEATURES="exceptions rtti" -DPOCO_ENABLE_APACHECONNECTOR=OFF -DPOCO_ENABLE_NETSSL=OFF -DPOCO_ENABLE_CRYPTO=OFF -DPOCO_ENABLE_SQL_MYSQL=OFF -DPOCO_ENABLE_SQL_POSTGRESQL=OFF -DPOCO_ENABLE_TESTS=ON -DPOCO_ENABLE_LONG_RUNNING_TESTS=OFF -DPOCO_OLD_REDIS_VERSION=ON && /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake --build cmake-build --target all && cd cmake-build &&travis_wait 30 /usr/local/android-sdk/cmake/3.6.4111459/bin/ctest -E Foundation --output-on-failure
- env: test="android API level 24"
language: android
jdk: openjdk8
android:
components:
- tools
- platform-tools
- tools
- build-tools-23.0.3
- extra-android-support
- extra-android-m2repository
- android-24
- sys-img-armeabi-v7a-android-24
# Unfortunaly travis use the old android sdk tool instead of using the new sdkmanager.
# In this deprecated android sdk tool there is no ndk-bundle or cmake package!
licenses:
- '.+'
before_install:
- export TERM=dumb
- sudo apt-get update -qq
# I don't understand why redis and mongodb are not installed although services added above !
- sudo apt-get install -qq -y mongodb-server redis-server
- /usr/bin/redis-server &
- sudo /usr/bin/mongod --config /etc/mongodb.conf &
- touch ~/.android/repositories.cfg
- mkdir -p /usr/local/android-sdk/licenses
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > /usr/local/android-sdk/licenses/android-sdk-license
- echo -e "\nd56f5187479451eabf01fb78af6dfcb131a6481e" >> /usr/local/android-sdk/licenses/android-sdk-license
- echo -e "\n24333f8a63b6825ea9c5514f83c2829b004d1fee" >> /usr/local/android-sdk/licenses/android-sdk-license
# Install NDK and cmake via android sdkmanager.
- /usr/local/android-sdk/tools/bin/sdkmanager --update > /dev/null
- /usr/local/android-sdk/tools/bin/sdkmanager "emulator" "ndk-bundle" "cmake;3.6.4111459" > /dev/null
- /usr/local/android-sdk/tools/bin/sdkmanager --list
before_script:
- export TERM=dumb
- export _NO_CHECK_SIGNATURE=true
- echo no | /usr/local/android-sdk/tools/bin/avdmanager create avd -n test -k "system-images;android-24;default;armeabi-v7a"
- /usr/local/android-sdk/emulator/emulator -avd test -no-audio -no-window -dns-server 8.8.8.8 &
- android-wait-for-emulator
- /usr/local/android-sdk/platform-tools/adb shell input keyevent 82 &
script:
# Mandatory cmake parameter to set API level and platform for the android toolchain:
# /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/usr/local/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-22
# See also in /usr/local/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake
# Using the ninja build command. Is much faster then make build command.
- /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake -H. -Bcmake-build -G'Android Gradle - Ninja' -DANDROID_ABI=armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/usr/local/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-24 -DCMAKE_MAKE_PROGRAM=/usr/local/android-sdk/cmake/3.6.4111459/bin/ninja -DANDROID_STL="c++_static" -DANDROID_CPP_FEATURES="exceptions rtti" -DPOCO_ENABLE_APACHECONNECTOR=OFF -DPOCO_ENABLE_NETSSL=OFF -DPOCO_ENABLE_CRYPTO=OFF -DPOCO_ENABLE_SQL_MYSQL=OFF -DPOCO_ENABLE_SQL_POSTGRESQL=OFF -DPOCO_ENABLE_TESTS=ON -DPOCO_ENABLE_LONG_RUNNING_TESTS=OFF -DPOCO_OLD_REDIS_VERSION=ON && /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake --build cmake-build --target all && cd cmake-build && travis_wait 30 /usr/local/android-sdk/cmake/3.6.4111459/bin/ctest -E Foundation --output-on-failure
- env: test="x86 (make) bundled"
os: osx
compiler: clang
script:
- export CC="clang"
- export CXX="clang++"
- $CXX --version
- $CXX -x c++ /dev/null -dM -E
- ./configure --config=Darwin32-clang-libc++ --everything --omit=PDF,Crypto,NetSSL_OpenSSL,SQL/ODBC,SQL/MySQL,SQL/PostgreSQL
- make all -s -j2 && sudo make install && export OSARCH=i386 && sudo -s ./travis/OSX/runtests.sh
- env: test="x64 (make) bundled"
os: osx
compiler: clang
script:
- export CC="clang"
- export CXX="clang++"
- $CXX --version
- $CXX -x c++ /dev/null -dM -E
- ./configure --config=Darwin64-clang-libc++ --everything --omit=PDF,SQL/ODBC,SQL/MySQL,SQL/PostgreSQL
- make all -s -j2 && sudo make install && sudo -s ./travis/OSX/runtests.sh
- env: test="5.4 x86 (make) bundled"
compiler: gcc
script:
- sudo apt-get install -qq -y g++-5-multilib
- export CC="gcc-5"
- export CXX="g++-5"
- $CXX --version
- ./configure --config=Linux32-gcc --everything --omit=PDF,Crypto,NetSSL_OpenSSL,SQL/ODBC,SQL/MySQL,SQL/PostgreSQL
- make all -s -j2 && sudo make install && export OSARCH=x86 && sudo -s ./travis/Linux/runtests.sh
- env: test="5.4 x64 (make) bundled"
compiler: gcc
script:
- export CC="gcc-5"
- export CXX="g++-5"
- $CXX --version
- ./configure --config=Linux64-gcc --everything --omit=PDF
- make all -s -j2 && sudo make install && sudo -s ./travis/Linux/runtests.sh
#- env: test="5.4 (make) unbundled"
# ======================================= unit tests fail ures due to unbundled pcre
# There was 1 error:
# 1: N7CppUnit10TestCallerI21RegularExpressionTestEE.testSubst2
# "St9bad_alloc: std::bad_alloc"
# in "<unknown>", line -1
#
# There were 4 failures:
# 1: N7CppUnit10TestCallerI21RegularExpressionTestEE.testMatch4
# "re.match("123 456", 0, matches) == 3"
# in "src/RegularExpressionTest.cpp", line 103
# 2: N7CppUnit10TestCallerI21RegularExpressionTestEE.testMatch6
# "expr.match("abcde", 0, 0)"
# in "src/RegularExpressionTest.cpp", line 136
# 3: N7CppUnit10TestCallerI21RegularExpressionTestEE.testSplit2
# "re.split("123 456", 0, strings) == 3"
# in "src/RegularExpressionTest.cpp", line 184
# 4: N7CppUnit10TestCallerI21RegularExpressionTestEE.testGroup
# "re.match("abcd 1234", 0, matches) == 3"
# in "src/RegularExpressionTest.cpp", line 271
#
# failed=Foundation
# =======================================
# compiler: gcc
# script:
# - sudo apt-get install -qq -y gcc-5 g++-5
# - export CC="gcc-5"
# - export CXX="g++-5"
# - $CXX --version
# - ./configure --everything --omit=PDF --unbundled && make all -s -j2 && ./travis/Linux/runtests.sh
- env: test="4.9 x64 (CMake)"
compiler: gcc
script:
- sudo apt-get install -qq -y gcc-4.9 g++-4.9
- export CC="gcc-4.9"
- export CXX="g++-4.9"
- $CXX --version
- type cmake
- type ctest
- source ./travis/ignored.sh
- export POCO_BASE=`pwd`
- cmake -H. -Bcmake-build -GNinja -DCMAKE_BUILD_TYPE=Debug -DPOCO_ENABLE_PDF=OFF -DPOCO_ENABLE_TESTS=ON -DPOCO_ENABLE_SAMPLES=ON && cmake --build cmake-build && cd cmake-build && sudo /usr/local/cmake-3.9.2/bin/ctest -VV && cd ..
- env: test="4.0 x86 (make) bundled"
compiler: clang
script:
- sudo apt-get install -qq -y clang-4.0 lldb-4.0 libc++-dev libc++abi-dev
- sudo apt-get install -qq -y g++-5-multilib
- export CLANG_VERSTION="-4.0"
- export CC="clang-4.0"
- export CXX="clang++-4.0"
- $CXX --version
- ./configure --config=Linux32-clang --everything --omit=PDF,Crypto,NetSSL_OpenSSL,SQL/ODBC,SQL/MySQL,SQL/PostgreSQL
- make all -s -j2 && sudo make install && export OSARCH=x86 && sudo -s ./travis/Linux/runtests.sh
- env: test="4.0 x64 (make) bundled"
compiler: clang
script:
- sudo apt-get install -qq -y clang-4.0 lldb-4.0 libc++-dev libc++abi-dev
- export CLANG_VERSTION="-4.0"
- export CC="clang-4.0"
- export CXX="clang++-4.0"
- $CXX --version
- ./configure --config=Linux64-clang --everything --omit=PDF
- make all -s -j2 && sudo make install && sudo -s ./travis/Linux/runtests.sh
- env: test="5.0 x64 (make) bundled"
compiler: clang
script:
- sudo apt-get install -qq -y clang-5.0 lldb-5.0 libc++-dev libc++abi-dev
- export CLANG_VERSTION="-5.0"
- export CC="clang-5.0"
- export CXX="clang++-5.0"
- $CXX --version
- ./configure --config=Linux64-clang --everything --omit=PDF
- make all -s -j2 && sudo make install && sudo -s ./travis/Linux/runtests.sh
#- env: test="arm-linux-gnueabi-g++ (make)"
# compiler: gcc
# script:
# - sudo apt-get install -qq -y g++-arm-linux-gnueabi g++-arm-linux-gnueabihf
# - arm-linux-gnueabi-g++ --version
# - arm-linux-gnueabi-g++ -x c++ /dev/null -dM -E
# - ./configure --omit=PDF,SQL/ODBC,SQL/MySQL,SQL/PostgreSQL,Crypto,NetSSL,PageCompiler && make -s -j2 CROSS_COMPILE=arm-linux-gnueabi- POCO_TARGET_OSARCH=armv7l
#- env: test="(CMake)"
# compiler: clang
# script:
# - source ./travis/ignored.sh
# - export POCO_BASE=`pwd`
# - mkdir cmake-build && cd cmake-build && cmake -DENABLE_PDF=OFF -DENABLE_TESTS=ON .. && make -s -j2 && sudo /usr/local/cmake-3.9.2/bin/ctest -VV -E SQL && cd ..
#- env: test="arm-linux-gnueabi-g++ (CMake)"
# ======================================= "arm-linux-gnueabi-g++: version 4.7.0: non compliant to c++11
# compiler: gcc
# script:
# - sudo apt-get install -qq -y g++-arm-linux-gnueabi g++-arm-linux-gnueabihf
# - export CC="arm-linux-gnueabi-gcc"
# - export CXX="arm-linux-gnueabi-g++"
# - $CXX --version
# - source ./travis/ignored.sh
# - export POCO_BASE=`pwd`
# - mkdir cmake-build
# - cd cmake-build && cmake -DPOCO_ENABLE_PDF=OFF -DPOCO_ENABLE_NETSSL=OFF -DPOCO_ENABLE_CRYPTO=OFF -DPOCO_ENABLE_TESTS=ON .. && make -s -j2 && cd ..
- env: test="arm-linux-gnueabihf-g++ (CMake)"
compiler: gcc
script:
- sudo apt-get install -qq -y g++-arm-linux-gnueabi g++-arm-linux-gnueabihf
- export CC="arm-linux-gnueabihf-gcc"
- export CXX="arm-linux-gnueabihf-g++"
- $CXX --version
- source ./travis/ignored.sh
- export POCO_BASE=`pwd`
- cmake -H. -Bcmake-build -GNinja -DPOCO_ENABLE_PDF=OFF -DPOCO_ENABLE_NETSSL=OFF -DPOCO_ENABLE_CRYPTO=OFF -DPOCO_ENABLE_TESTS=ON && cmake --build cmake-build --target all
# QA jobs for code analytics and metrics
# build documentation and release
- env: test="documentation & release"
compiler: gcc
script:
- $CXX --version
- . env.sh && mkdoc all && mkrel all
# static code analysis with cppcheck (we can add --enable=all later)
- env: test="cppcheck"
script: cppcheck --force --quiet --inline-suppr -j2 -iSQL/SQLite/src/sqlite3.c .
# search for TODO within source tree
- env: test="TODO"
script: grep -r TODO *
# search for FIXME within source tree
- env: test="FIXME"
script: grep -r FIXME *
# search for HACK within source tree
- env: test="HACK"
script: grep -r HACK *
# some statistics about the code base
- env: test="sloccount"
script: sloccount .