.travis.yml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. # using c for language overwrites our compilers
  2. language: generic
  3. sudo: required
  4. env:
  5. global:
  6. # GITAUTH:
  7. - secure: nSunY54Wp5HkQCHHbKwlwpbaKyqRVIu/0EnhaoJSwhM1wqerQV/E5d/2JelO9/tZgbungAO7wk/fjutRMVc7d378RTIPwS8vHpvZfEoGhCFsLoTOlqESzsZFBup2H5t1lpQ23jRHDOxlLdJy2lz5U+zd1YnYgDXqdDFjegsIYdo=
  8. dist: trusty
  9. matrix:
  10. fast_finish: true
  11. include:
  12. #
  13. - os: linux
  14. addons:
  15. apt:
  16. sources:
  17. # see https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
  18. - ubuntu-toolchain-r-test
  19. packages:
  20. - binutils-mingw-w64-i686
  21. - build-essential
  22. - check
  23. - cmake
  24. - debhelper
  25. - fakeroot
  26. - gcc-multilib
  27. - g++-mingw-w64-i686
  28. - g++-mingw-w64-x86-64
  29. - g++-multilib
  30. - graphviz
  31. - libsubunit-dev
  32. - libx11-dev
  33. - mingw-w64
  34. - python-six
  35. - python3-six
  36. - texlive-fonts-recommended
  37. - texlive-latex-extra
  38. - texlive-latex-recommended
  39. - valgrind
  40. - wget
  41. - xutils-dev
  42. - zip
  43. env:
  44. - ANALYZE=false
  45. - CC=gcc-4.8
  46. - CXX=g++-4.8
  47. - PYTHON=python2
  48. - MINGW=true
  49. - DEBIAN=true
  50. - os: linux
  51. addons:
  52. apt:
  53. sources:
  54. - ubuntu-toolchain-r-test
  55. packages:
  56. - check
  57. - debhelper
  58. - fakeroot
  59. - gcc-8
  60. - gcc-8-multilib
  61. - g++-8
  62. - g++-8-multilib
  63. - graphviz
  64. - linux-libc-dev:i386
  65. - python-six
  66. - python3-six
  67. - texlive-fonts-recommended
  68. - texlive-latex-extra
  69. - texlive-latex-recommended
  70. - valgrind
  71. env:
  72. - ANALYZE=false
  73. - CC=gcc-8
  74. - CXX=g++-8
  75. - PYTHON=python2
  76. - os: linux
  77. addons:
  78. apt:
  79. sources:
  80. - llvm-toolchain-trusty-6.0
  81. - ubuntu-toolchain-r-test
  82. packages:
  83. - check
  84. - clang-6.0
  85. - clang-tidy-6.0
  86. - debhelper
  87. - fakeroot
  88. - graphviz
  89. - python-six
  90. - texlive-fonts-recommended
  91. - texlive-latex-extra
  92. - texlive-latex-recommended
  93. - valgrind
  94. env:
  95. - ANALYZE=false
  96. - CC=clang-6.0
  97. - CXX=clang++-6.0
  98. - PYTHON=python2
  99. - os: linux
  100. addons:
  101. apt:
  102. sources:
  103. - llvm-toolchain-trusty-6.0
  104. - ubuntu-toolchain-r-test
  105. packages:
  106. - check
  107. - clang-6.0
  108. - clang-tidy-6.0
  109. - debhelper
  110. - fakeroot
  111. - graphviz
  112. - python3-six
  113. - texlive-fonts-recommended
  114. - texlive-latex-extra
  115. - texlive-latex-recommended
  116. - valgrind
  117. env:
  118. - ANALYZE=false
  119. - CC=clang-6.0
  120. - CXX=clang++-6.0
  121. - PYTHON=python3
  122. - os: linux
  123. addons:
  124. apt:
  125. packages:
  126. - check
  127. - graphviz
  128. - debhelper
  129. - fakeroot
  130. - python-six
  131. - python3-six
  132. - texlive-fonts-recommended
  133. - texlive-latex-extra
  134. - texlive-latex-recommended
  135. env:
  136. - ANALYZE=false
  137. - CC=tcc
  138. - PYTHON=python2
  139. - os: linux
  140. addons:
  141. apt:
  142. sources:
  143. - llvm-toolchain-trusty-6.0
  144. - ubuntu-toolchain-r-test
  145. packages:
  146. - clang-6.0
  147. - clang-tidy-6.0
  148. - python3-six
  149. - valgrind
  150. env:
  151. - INSTALL=true
  152. - CC=clang-6.0
  153. - CXX=clang++-6.0
  154. - PYTHON=python3
  155. - os: linux
  156. addons:
  157. apt:
  158. packages:
  159. - cppcheck
  160. env:
  161. - ANALYZE=true
  162. - CC=gcc-4.8
  163. - CXX=g++-4.8
  164. - os: linux
  165. addons:
  166. apt:
  167. sources:
  168. - llvm-toolchain-trusty-6.0
  169. - ubuntu-toolchain-r-test
  170. packages:
  171. - check
  172. - clang-6.0
  173. - clang-tidy-6.0
  174. - graphviz
  175. - python-six
  176. - python3-six
  177. - texlive-fonts-recommended
  178. - texlive-latex-extra
  179. - texlive-latex-recommended
  180. env:
  181. - ANALYZE=true
  182. - PYTHON=python3
  183. - CC=clang-6.0
  184. - CXX=clang++-6.0
  185. #- os: linux
  186. # compiler: gcc
  187. # env: LINT=true
  188. - os: linux
  189. env:
  190. - DOCKER=true
  191. - os: linux
  192. addons:
  193. apt:
  194. sources:
  195. - llvm-toolchain-trusty-6.0
  196. - ubuntu-toolchain-r-test
  197. packages:
  198. - check
  199. - clang-6.0
  200. - clang-tidy-6.0
  201. - libfuzzer-6.0-dev
  202. - python-six
  203. - python3-six
  204. env:
  205. - FUZZER=true
  206. - os: osx
  207. compiler: clang
  208. # disable homebrew auto update which takes a lot of time
  209. env: HOMEBREW_NO_AUTO_UPDATE=1
  210. cache:
  211. directories:
  212. - $HOME/Library/Caches/Homebrew
  213. - os: linux
  214. addons:
  215. sonarcloud:
  216. organization: open62541
  217. branches:
  218. - master
  219. - sonarcloud
  220. env:
  221. - CC=gcc-4.9
  222. - CXX=g++-4.9
  223. - SONAR=true
  224. - PYTHON=python2
  225. cache:
  226. directories:
  227. - '$HOME/.sonar/cache'
  228. cache:
  229. pip: true
  230. apt: true
  231. directories:
  232. - $HOME/install
  233. - $HOME/.cache/pip
  234. # combine all the commands into one single command. See https://github.com/travis-ci/travis-ci/issues/1066
  235. before_install: |
  236. set -eE
  237. errorTrap() {
  238. last_rv=$?
  239. if [ $last_rv -ne 0 ] ; then
  240. echo ""
  241. echo ""
  242. echo "----------------- Error -----------------"
  243. echo ""
  244. echo "---- Check additional output above!! ----"
  245. # Wait a bit until the stdout is flushed
  246. for i in 1 2 3 4 5 6 7 8 9 10; do echo "."; sleep 1; done
  247. fi
  248. exit $last_rv
  249. }
  250. trap errorTrap 0
  251. # set paths for locally installed libs (like liburcu)
  252. export LOCAL_PKG=$HOME/install
  253. mkdir -p $LOCAL_PKG/lib
  254. mkdir -p $LOCAL_PKG/include
  255. mkdir -p $LOCAL_PKG/bin
  256. export LIBRARY_PATH=$LOCAL_PKG/lib:$LIBRARY_PATH
  257. export C_INCLUDE_PATH=$LOCAL_PKG/include:$C_INCLUDE_PATH
  258. export CPLUS_INCLUDE_PATH=$LOCAL_PKG/include:$CPLUS_INCLUDE_PATH
  259. export PKG_CONFIG_PATH=$LOCAL_PKG/lib/pkgconfig:$PKG_CONFIG_PATH
  260. export PATH=$LOCAL_PKG:$LOCAL_PKG/bin:$PATH
  261. export CMAKE_PREFIX_PATH=$LOCAL_PKG:CMAKE_PREFIX_PATH
  262. # set local path for python packages
  263. export PATH=$PATH:$HOME/.local/bin # linux
  264. export PATH=$PATH:$HOME/Library/Python #OS X
  265. export PATH=$PATH:$HOME/Library/Python/2.7/bin #OS X
  266. if [ ${TRAVIS_OS_NAME} == "linux" ]; then sh ./tools/travis/travis_linux_before_install.sh; fi
  267. if [ ${TRAVIS_OS_NAME} == "osx" ]; then sh ./tools/travis/travis_osx_before_install.sh; fi
  268. script: |
  269. set -eE
  270. errorTrap() {
  271. last_rv=$?
  272. if [ $last_rv -ne 0 ] ; then
  273. echo ""
  274. echo ""
  275. echo "----------------- Error -----------------"
  276. echo ""
  277. echo "---- Check additional output above!! ----"
  278. # Wait a bit until the stdout is flushed
  279. for i in 1 2 3 4 5 6 7 8 9 10; do echo "."; sleep 1; done
  280. fi
  281. exit $last_rv
  282. }
  283. trap errorTrap 0
  284. if [ ${TRAVIS_OS_NAME} == "linux" ]; then sh ./tools/travis/travis_linux_script.sh; fi
  285. if [ ${TRAVIS_OS_NAME} == "osx" ]; then sh ./tools/travis/travis_osx_script.sh; fi
  286. after_success: |
  287. set -eE
  288. errorTrap() {
  289. last_rv=$?
  290. if [ $last_rv -ne 0 ] ; then
  291. echo ""
  292. echo ""
  293. echo "----------------- Error -----------------"
  294. echo ""
  295. echo "---- Check additional output above!! ----"
  296. # Wait a bit until the stdout is flushed
  297. for i in 1 2 3 4 5 6 7 8 9 10; do echo "."; sleep 1; done
  298. fi
  299. exit $last_rv
  300. }
  301. trap errorTrap 0
  302. if [ ${TRAVIS_OS_NAME} == "linux" ]; then sh ./tools/travis/travis_linux_after_success.sh; fi
  303. # Sleep to flush travis output
  304. echo == Build success ==
  305. sleep 5
  306. after_failure: |
  307. # Sleep to flush travis output
  308. echo == Build failed ==
  309. sleep 5
  310. deploy:
  311. provider: releases
  312. api_key:
  313. secure: PKCoA7MBRtHloIbNF4Qj5LQyCafjekfVeFXlMBd9KmC0ynNuef+D7nn38f/jo25/b0Ii7r+hgslkQPezbKyEqo2zcCB8Pn8TWau2hbzKM/dUCPoN90HVaQcRjUi8P2Y+QkouwyPWSujBL35/X5QiAntRotCSbZx4fkyiN8cU95o=
  314. file:
  315. - open62541-win32.zip
  316. - open62541-win64.zip
  317. - open62541-linux32.tar.gz
  318. - open62541-linux64.tar.gz
  319. - open62541-raspberrypi.tar.gz
  320. - open62541.c
  321. - open62541.h
  322. - open62541*.deb
  323. file_glob: true
  324. skip_cleanup: true
  325. on:
  326. repo: open62541/open62541
  327. tags: true
  328. condition: $CC = gcc-4.8 && $ANALYZE = false