travis_linux_script.sh 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. #!/bin/bash
  2. set -e
  3. # Sonar code quality
  4. if ! [ -z ${SONAR+x} ]; then
  5. if ([ "${TRAVIS_REPO_SLUG}" != "open62541/open62541" ] ||
  6. [ "${TRAVIS_PULL_REQUEST}" != "false" ] ||
  7. [ "${TRAVIS_BRANCH}" != "master" ]); then
  8. echo "Skipping Sonarcloud on forks"
  9. # Skip on forks
  10. exit 0;
  11. fi
  12. git fetch --unshallow
  13. mkdir -p build && cd build
  14. build-wrapper-linux-x86-64 --out-dir ../bw-output cmake \
  15. -DCMAKE_BUILD_TYPE=Debug \
  16. -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/$PYTHON \
  17. -DUA_BUILD_EXAMPLES=ON \
  18. -DUA_ENABLE_DISCOVERY=ON \
  19. -DUA_ENABLE_DISCOVERY_MULTICAST=ON \
  20. -DUA_ENABLE_ENCRYPTION .. \
  21. && make -j
  22. cd ..
  23. sonar-scanner
  24. exit 0
  25. fi
  26. # Docker build test
  27. if ! [ -z ${DOCKER+x} ]; then
  28. docker build -t open62541 .
  29. docker run -d -p 127.0.0.1:80:80 --name open62541 open62541 /bin/sh
  30. docker ps | grep -q open62541
  31. # disabled since it randomly fails
  32. # docker ps | grep -q open62541
  33. exit 0
  34. fi
  35. # Cpplint checking
  36. if ! [ -z ${LINT+x} ]; then
  37. mkdir -p build
  38. cd build
  39. cmake ..
  40. make cpplint
  41. if [ $? -ne 0 ] ; then exit 1 ; fi
  42. exit 0
  43. fi
  44. # Fuzzer build test
  45. if ! [ -z ${FUZZER+x} ]; then
  46. # Test the corpus generator and use new corpus for fuzz test
  47. ./tests/fuzz/generate_corpus.sh
  48. if [ $? -ne 0 ] ; then exit 1 ; fi
  49. cd build_fuzz
  50. make && make run_fuzzer
  51. if [ $? -ne 0 ] ; then exit 1 ; fi
  52. exit 0
  53. fi
  54. # INSTALL build test
  55. if ! [ -z ${INSTALL+x} ]; then
  56. # Use make install to deploy files and then test if we can build an example based on the installed files
  57. mkdir -p build
  58. cd build
  59. cmake \
  60. -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/$PYTHON \
  61. -DBUILD_SHARED_LIBS=ON \
  62. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  63. -DUA_NAMESPACE_ZERO=FULL \
  64. -DUA_ENABLE_AMALGAMATION=OFF \
  65. -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/open62541_install ..
  66. make install
  67. if [ $? -ne 0 ] ; then exit 1 ; fi
  68. cd .. && rm build -rf
  69. # Now create a simple CMake Project which uses the installed file
  70. mkdir compile && cd compile
  71. cat > CMakeLists.txt <<- EOM
  72. cmake_minimum_required(VERSION 2.8)
  73. project(install-test)
  74. find_package(open62541 REQUIRED COMPONENTS FullNamespace)
  75. add_executable(install-test-example ../examples/tutorial_server_firststeps.c)
  76. target_link_libraries(install-test-example open62541)
  77. EOM
  78. cmake \
  79. -DCMAKE_PREFIX_PATH=$TRAVIS_BUILD_DIR/open62541_install .
  80. make -j
  81. if [ $? -ne 0 ] ; then exit 1 ; fi
  82. cd ..
  83. rm -rf compile
  84. exit 0
  85. fi
  86. if [ $ANALYZE = "true" ]; then
  87. echo "=== Running static code analysis ===" && echo -en 'travis_fold:start:script.analyze\\r'
  88. if ! case $CC in clang*) false;; esac; then
  89. mkdir -p build
  90. cd build
  91. scan-build-6.0 cmake \
  92. -DUA_BUILD_EXAMPLES=ON \
  93. -DUA_BUILD_UNIT_TESTS=ON ..
  94. scan-build-6.0 -enable-checker security.FloatLoopCounter \
  95. -enable-checker security.insecureAPI.UncheckedReturn \
  96. --status-bugs -v \
  97. make -j
  98. cd .. && rm build -rf
  99. mkdir -p build
  100. cd build
  101. scan-build-6.0 cmake \
  102. -DUA_ENABLE_PUBSUB=ON \
  103. -DUA_ENABLE_PUBSUB_DELTAFRAMES=ON \
  104. -DUA_ENABLE_PUBSUB_INFORMATIONMODEL=ON ..
  105. scan-build-6.0 -enable-checker security.FloatLoopCounter \
  106. -enable-checker security.insecureAPI.UncheckedReturn \
  107. --status-bugs -v \
  108. make -j
  109. cd .. && rm build -rf
  110. mkdir -p build
  111. cd build
  112. scan-build-6.0 cmake \
  113. -DUA_ENABLE_AMALGAMATION=OFF ..
  114. scan-build-6.0 -enable-checker security.FloatLoopCounter \
  115. -enable-checker security.insecureAPI.UncheckedReturn \
  116. --status-bugs -v \
  117. make -j
  118. cd .. && rm build -rf
  119. else
  120. cppcheck --template "{file}({line}): {severity} ({id}): {message}" \
  121. --enable=style --force --std=c++11 -j 8 \
  122. --suppress=duplicateBranch \
  123. --suppress=incorrectStringBooleanError \
  124. --suppress=invalidscanf --inline-suppr \
  125. -I include src plugins examples 2> cppcheck.txt
  126. if [ -s cppcheck.txt ]; then
  127. echo "====== CPPCHECK Static Analysis Errors ======"
  128. cat cppcheck.txt
  129. # flush output
  130. sleep 5
  131. exit 1
  132. fi
  133. fi
  134. echo -en 'travis_fold:end:script.analyze\\r'
  135. else
  136. echo -en "\r\n=== Building ===\r\n"
  137. echo -e "\r\n== Documentation and certificate build ==" && echo -en 'travis_fold:start:script.build.doc\\r'
  138. mkdir -p build
  139. cd build
  140. cmake \
  141. -DCMAKE_BUILD_TYPE=Release \
  142. -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/$PYTHON \
  143. -DUA_BUILD_EXAMPLES=ON \
  144. -DUA_BUILD_SELFSIGNED_CERTIFICATE=ON ..
  145. make doc
  146. make doc_pdf
  147. make selfsigned
  148. cp -r doc ../../
  149. cp -r doc_latex ../../
  150. cp ./examples/server_cert.der ../../
  151. cd .. && rm build -rf
  152. echo -en 'travis_fold:end:script.build.doc\\r'
  153. echo -e "\r\n== Full Namespace 0 Generation ==" && echo -en 'travis_fold:start:script.build.ns0\\r'
  154. mkdir -p build
  155. cd build
  156. cmake \
  157. -DCMAKE_BUILD_TYPE=Debug \
  158. -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/$PYTHON \
  159. -DUA_BUILD_EXAMPLES=ON \
  160. -DUA_ENABLE_SUBSCRIPTIONS_EVENTS=ON \
  161. -DUA_NAMESPACE_ZERO=FULL ..
  162. make -j
  163. if [ $? -ne 0 ] ; then exit 1 ; fi
  164. cd .. && rm build -rf
  165. echo -en 'travis_fold:end:script.build.ns0\\r'
  166. # cross compilation only with gcc
  167. if ! [ -z ${MINGW+x} ]; then
  168. echo -e "\r\n== Cross compile release build for MinGW 32 bit ==" && echo -en 'travis_fold:start:script.build.cross_mingw32\\r'
  169. mkdir -p build && cd build
  170. cmake \
  171. -DBUILD_SHARED_LIBS=ON \
  172. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  173. -DCMAKE_INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/open62541-win32 \
  174. -DCMAKE_TOOLCHAIN_FILE=../tools/cmake/Toolchain-mingw32.cmake \
  175. -DUA_BUILD_EXAMPLES=ON \
  176. -DUA_ENABLE_AMALGAMATION=OFF ..
  177. make -j
  178. if [ $? -ne 0 ] ; then exit 1 ; fi
  179. make install
  180. if [ $? -ne 0 ] ; then exit 1 ; fi
  181. cd ..
  182. zip -r open62541-win32.zip ../doc_latex/open62541.pdf LICENSE AUTHORS README.md open62541-win32/*
  183. rm build -rf
  184. echo -en 'travis_fold:end:script.build.cross_mingw32\\r'
  185. echo -e "\r\n== Cross compile release build for MinGW 64 bit ==" && echo -en 'travis_fold:start:script.build.cross_mingw64\\r'
  186. mkdir -p build && cd build
  187. cmake \
  188. -DBUILD_SHARED_LIBS=ON \
  189. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  190. -DCMAKE_INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/open62541-win64 \
  191. -DCMAKE_TOOLCHAIN_FILE=../tools/cmake/Toolchain-mingw64.cmake \
  192. -DUA_BUILD_EXAMPLES=ON \
  193. -DUA_ENABLE_AMALGAMATION=OFF ..
  194. make -j
  195. if [ $? -ne 0 ] ; then exit 1 ; fi
  196. make install
  197. if [ $? -ne 0 ] ; then exit 1 ; fi
  198. cd ..
  199. zip -r open62541-win64.zip ../doc_latex/open62541.pdf LICENSE AUTHORS README.md open62541-win64/*
  200. rm build -rf
  201. echo -en 'travis_fold:end:script.build.cross_mingw64\\r'
  202. echo -e "\r\n== Cross compile release build for 32-bit linux ==" && echo -en 'travis_fold:start:script.build.cross_linux\\r'
  203. mkdir -p build && cd build
  204. cmake \
  205. -DBUILD_SHARED_LIBS=ON \
  206. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  207. -DCMAKE_INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/open62541-linux32 \
  208. -DCMAKE_TOOLCHAIN_FILE=../tools/cmake/Toolchain-gcc-m32.cmake \
  209. -DUA_BUILD_EXAMPLES=ON \
  210. -DUA_ENABLE_AMALGAMATION=OFF ..
  211. make -j
  212. if [ $? -ne 0 ] ; then exit 1 ; fi
  213. make install
  214. if [ $? -ne 0 ] ; then exit 1 ; fi
  215. cd ..
  216. tar -pczf open62541-linux32.tar.gz ../doc_latex/open62541.pdf LICENSE AUTHORS README.md open62541-linux32/*
  217. rm build -rf
  218. echo -en 'travis_fold:end:script.build.cross_linux\\r'
  219. echo -e "\r\n== Cross compile release build for RaspberryPi ==" && echo -en 'travis_fold:start:script.build.cross_raspi\\r'
  220. mkdir -p build && cd build
  221. git clone https://github.com/raspberrypi/tools
  222. export PATH=$PATH:./tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/
  223. cmake \
  224. -DBUILD_SHARED_LIBS=ON \
  225. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  226. -DCMAKE_INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/open62541-raspberrypi \
  227. -DCMAKE_TOOLCHAIN_FILE=../tools/cmake/Toolchain-rpi64.cmake \
  228. -DUA_BUILD_EXAMPLES=ON \
  229. -DUA_ENABLE_AMALGAMATION=OFF ..
  230. make -j
  231. if [ $? -ne 0 ] ; then exit 1 ; fi
  232. make install
  233. if [ $? -ne 0 ] ; then exit 1 ; fi
  234. cd ..
  235. tar -pczf open62541-raspberrypi.tar.gz ../doc_latex/open62541.pdf LICENSE AUTHORS README.md open62541-raspberrypi/*
  236. rm build -rf
  237. echo -en 'travis_fold:end:script.build.cross_raspi\\r'
  238. fi
  239. echo -e "\r\n== Compile release build for 64-bit linux ==" && echo -en 'travis_fold:start:script.build.linux_64\\r'
  240. mkdir -p build && cd build
  241. cmake \
  242. -DBUILD_SHARED_LIBS=ON \
  243. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  244. -DCMAKE_INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/open62541-linux64 \
  245. -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/$PYTHON \
  246. -DUA_BUILD_EXAMPLES=ON \
  247. -DUA_ENABLE_AMALGAMATION=OFF ..
  248. make -j
  249. if [ $? -ne 0 ] ; then exit 1 ; fi
  250. make install
  251. if [ $? -ne 0 ] ; then exit 1 ; fi
  252. cd ..
  253. tar -pczf open62541-linux64.tar.gz ../doc_latex/open62541.pdf LICENSE AUTHORS README.md open62541-linux64/*
  254. rm build -rf
  255. echo -en 'travis_fold:end:script.build.linux_64\\r'
  256. echo -e "\r\n== Building the C++ example ==" && echo -en 'travis_fold:start:script.build.example\\r'
  257. mkdir -p build && cd build
  258. cmake \
  259. -DBUILD_SHARED_LIBS=ON \
  260. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  261. -DCMAKE_INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/open62541-linux64 \
  262. -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/$PYTHON \
  263. -DUA_BUILD_EXAMPLES=OFF \
  264. -DUA_ENABLE_AMALGAMATION=ON ..
  265. make -j
  266. cp open62541.h ../.. # copy single file-release
  267. cp open62541.c ../.. # copy single file-release
  268. gcc -std=c99 -c open62541.c
  269. g++ ../examples/server.cpp -I./ open62541.o -lrt -o cpp-server
  270. if [ $? -ne 0 ] ; then exit 1 ; fi
  271. cd .. && rm build -rf
  272. echo -en 'travis_fold:end:script.build.example\\r'
  273. echo "Compile as shared lib version" && echo -en 'travis_fold:start:script.build.shared_libs\\r'
  274. mkdir -p build && cd build
  275. cmake \
  276. -DBUILD_SHARED_LIBS=ON \
  277. -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/$PYTHON \
  278. -DUA_BUILD_EXAMPLES=ON \
  279. -DUA_ENABLE_AMALGAMATION=OFF ..
  280. make -j
  281. if [ $? -ne 0 ] ; then exit 1 ; fi
  282. cd .. && rm build -rf
  283. echo -en 'travis_fold:end:script.build.shared_libs\\r'
  284. echo "Compile as shared lib version with amalgamation" && echo -en 'travis_fold:start:script.build.shared_libs_amalgamate\\r'
  285. mkdir -p build && cd build
  286. cmake \
  287. -DBUILD_SHARED_LIBS=ON \
  288. -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/$PYTHON \
  289. -DUA_BUILD_EXAMPLES=OFF \
  290. -DUA_ENABLE_AMALGAMATION=ON ..
  291. make -j
  292. if [ $? -ne 0 ] ; then exit 1 ; fi
  293. cd .. && rm build -rf
  294. echo -en 'travis_fold:end:script.build.shared_libs_amalgamate\\r'
  295. if [ "$CC" != "tcc" ]; then
  296. echo -e "\r\n==Compile multithreaded version==" && echo -en 'travis_fold:start:script.build.multithread\\r'
  297. mkdir -p build && cd build
  298. cmake \
  299. -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/$PYTHON \
  300. -DUA_BUILD_EXAMPLES=ON \
  301. -DUA_ENABLE_MULTITHREADING=ON ..
  302. make -j
  303. if [ $? -ne 0 ] ; then exit 1 ; fi
  304. cd .. && rm build -rf
  305. echo -en 'travis_fold:end:script.build.multithread\\r'
  306. fi
  307. echo -e "\r\n== Compile with encryption ==" && echo -en 'travis_fold:start:script.build.encryption\\r'
  308. mkdir -p build && cd build
  309. cmake \
  310. -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/$PYTHON \
  311. -DUA_BUILD_EXAMPLES=ON \
  312. -DUA_ENABLE_ENCRYPTION=ON ..
  313. make -j
  314. if [ $? -ne 0 ] ; then exit 1 ; fi
  315. cd .. && rm build -rf
  316. echo -en 'travis_fold:end:script.build.encryption\\r'
  317. echo -e "\r\n== Compile without discovery version ==" && echo -en 'travis_fold:start:script.build.discovery\\r'
  318. mkdir -p build && cd build
  319. cmake \
  320. -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/$PYTHON \
  321. -DUA_BUILD_EXAMPLES=ON \
  322. -DUA_ENABLE_DISCOVERY=OFF \
  323. -DUA_ENABLE_DISCOVERY_MULTICAST=OFF ..
  324. make -j
  325. if [ $? -ne 0 ] ; then exit 1 ; fi
  326. cd .. && rm build -rf
  327. echo -en 'travis_fold:end:script.build.discovery\\r'
  328. if [ "$CC" != "tcc" ]; then
  329. echo -e "\r\n== Compile multithreaded version with discovery ==" && echo -en 'travis_fold:start:script.build.multithread_discovery\\r'
  330. mkdir -p build && cd build
  331. cmake \
  332. -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/$PYTHON \
  333. -DUA_BUILD_EXAMPLES=ON \
  334. -DUA_ENABLE_DISCOVERY=ON \
  335. -DUA_ENABLE_DISCOVERY_MULTICAST=ON \
  336. -DUA_ENABLE_MULTITHREADING=ON ..
  337. make -j
  338. if [ $? -ne 0 ] ; then exit 1 ; fi
  339. cd .. && rm build -rf
  340. echo -en 'travis_fold:end:script.build.multithread_discovery\\r'
  341. fi
  342. echo -e "\r\n== Compile JSON encoding ==" && echo -en 'travis_fold:start:script.build.json\\r'
  343. mkdir -p build && cd build
  344. cmake \
  345. -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/$PYTHON \
  346. -DUA_ENABLE_JSON_ENCODING=ON ..
  347. make -j
  348. if [ $? -ne 0 ] ; then exit 1 ; fi
  349. cd .. && rm build -rf
  350. echo -en 'travis_fold:end:script.build.json\\r'
  351. echo -e "\r\n== Unit tests (full NS0) ==" && echo -en 'travis_fold:start:script.build.unit_test_ns0_full\\r'
  352. mkdir -p build && cd build
  353. # Valgrind cannot handle the full NS0 because the generated file is too big. Thus run NS0 full without valgrind
  354. cmake \
  355. -DCMAKE_BUILD_TYPE=Debug \
  356. -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/$PYTHON \
  357. -DUA_BUILD_EXAMPLES=ON \
  358. -DUA_BUILD_UNIT_TESTS=ON \
  359. -DUA_ENABLE_COVERAGE=OFF \
  360. -DUA_ENABLE_DISCOVERY=ON \
  361. -DUA_ENABLE_DISCOVERY_MULTICAST=ON \
  362. -DUA_ENABLE_ENCRYPTION=ON \
  363. -DUA_ENABLE_JSON_ENCODING=ON \
  364. -DUA_ENABLE_PUBSUB=ON \
  365. -DUA_ENABLE_PUBSUB_DELTAFRAMES=ON \
  366. -DUA_ENABLE_PUBSUB_INFORMATIONMODEL=ON \
  367. -DUA_ENABLE_SUBSCRIPTIONS=ON \
  368. -DUA_ENABLE_SUBSCRIPTIONS_EVENTS=ON \
  369. -DUA_ENABLE_UNIT_TESTS_MEMCHECK=OFF \
  370. -DUA_NAMESPACE_ZERO=FULL ..
  371. make -j && make test ARGS="-V"
  372. if [ $? -ne 0 ] ; then exit 1 ; fi
  373. cd .. && rm build -rf
  374. echo -en 'travis_fold:end:script.build.unit_test_ns0_full\\r'
  375. if ! [ -z ${DEBIAN+x} ]; then
  376. echo -e "\r\n== Building the Debian package ==" && echo -en 'travis_fold:start:script.build.debian\\r'
  377. dpkg-buildpackage -b
  378. if [ $? -ne 0 ] ; then exit 1 ; fi
  379. cp ../open62541*.deb .
  380. # Copy for github release script
  381. cp ../open62541*.deb ../..
  382. echo -en 'travis_fold:end:script.build.debian\\r'
  383. fi
  384. if [ "$CC" != "tcc" ]; then
  385. echo -e "\r\n== Unit tests (minimal NS0) ==" && echo -en 'travis_fold:start:script.build.unit_test_ns0_minimal\\r'
  386. mkdir -p build && cd build
  387. cmake \
  388. -DCMAKE_BUILD_TYPE=Debug \
  389. -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/$PYTHON \
  390. -DUA_BUILD_EXAMPLES=ON \
  391. -DUA_BUILD_UNIT_TESTS=ON \
  392. -DUA_ENABLE_COVERAGE=ON \
  393. -DUA_ENABLE_DISCOVERY=ON \
  394. -DUA_ENABLE_DISCOVERY_MULTICAST=ON \
  395. -DUA_ENABLE_ENCRYPTION=ON \
  396. -DUA_ENABLE_PUBSUB=ON \
  397. -DUA_ENABLE_PUBSUB_DELTAFRAMES=ON \
  398. -DUA_ENABLE_PUBSUB_INFORMATIONMODEL=ON \
  399. -DUA_ENABLE_UNIT_TESTS_MEMCHECK=ON ..
  400. make -j && make test ARGS="-V"
  401. if [ $? -ne 0 ] ; then exit 1 ; fi
  402. echo -en 'travis_fold:end:script.build.unit_test_ns0_minimal\\r'
  403. # only run coveralls on main repo and when MINGW=true
  404. # We only want to build coveralls once, so we just take the travis run where MINGW=true which is only enabled once
  405. echo -e "\r\n== -> Current repo: ${TRAVIS_REPO_SLUG} =="
  406. if [ $MINGW = "true" ] && [ "${TRAVIS_REPO_SLUG}" = "open62541/open62541" ]; then
  407. echo -en "\r\n== Building codecov.io for ${TRAVIS_REPO_SLUG} ==" && echo -en 'travis_fold:start:script.build.codecov\\r'
  408. cd ..
  409. /bin/bash -c "bash <(curl -s https://codecov.io/bash)"
  410. if [ $? -ne 0 ] ; then exit 1 ; fi
  411. cd build
  412. echo -en 'travis_fold:end:script.build.codecov\\r'
  413. echo -en "\r\n== Building coveralls for ${TRAVIS_REPO_SLUG} ==" && echo -en 'travis_fold:start:script.build.coveralls\\r'
  414. coveralls -E '.*/build/CMakeFiles/.*' -E '.*/examples/.*' -E '.*/tests/.*' -E '.*\.h' -E '.*CMakeCXXCompilerId\.cpp' -E '.*CMakeCCompilerId\.c' -r ../ || true # ignore result since coveralls is unreachable from time to time
  415. echo -en 'travis_fold:end:script.build.coveralls\\r'
  416. fi
  417. cd .. && rm build -rf
  418. fi
  419. fi