.travis.yml 8.9 KB

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