.travis.yml 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  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. sources:
  145. - llvm-toolchain-trusty-6.0
  146. - ubuntu-toolchain-r-test
  147. packages:
  148. - clang-6.0
  149. - clang-tidy-6.0
  150. - python3-six
  151. - valgrind
  152. env:
  153. - INSTALL=true
  154. - CC=clang-6.0
  155. - CXX=clang++-6.0
  156. - PYTHON=python3
  157. - os: linux
  158. addons:
  159. apt:
  160. packages:
  161. - cppcheck
  162. env:
  163. - ANALYZE=true
  164. - CC=gcc-4.8
  165. - CXX=g++-4.8
  166. - os: linux
  167. addons:
  168. apt:
  169. sources:
  170. - llvm-toolchain-trusty-6.0
  171. - ubuntu-toolchain-r-test
  172. packages:
  173. - check
  174. - clang-6.0
  175. - clang-tidy-6.0
  176. - graphviz
  177. - python-six
  178. - python3-six
  179. - texlive-fonts-recommended
  180. - texlive-latex-extra
  181. - texlive-latex-recommended
  182. env:
  183. - ANALYZE=true
  184. - PYTHON=python3
  185. - CC=clang-6.0
  186. - CXX=clang++-6.0
  187. #- os: linux
  188. # compiler: gcc
  189. # env: LINT=true
  190. - os: linux
  191. env:
  192. - DOCKER=true
  193. - os: linux
  194. addons:
  195. apt:
  196. sources:
  197. - llvm-toolchain-trusty-6.0
  198. - ubuntu-toolchain-r-test
  199. packages:
  200. - check
  201. - clang-6.0
  202. - clang-tidy-6.0
  203. - libfuzzer-6.0-dev
  204. - python-six
  205. - python3-six
  206. env:
  207. - FUZZER=true
  208. - os: osx
  209. compiler: clang
  210. # disable homebrew auto update which takes a lot of time
  211. env: HOMEBREW_NO_AUTO_UPDATE=1
  212. cache:
  213. directories:
  214. - $HOME/Library/Caches/Homebrew
  215. - os: linux
  216. addons:
  217. sonarcloud:
  218. organization: open62541
  219. branches:
  220. - master
  221. - sonarcloud
  222. env:
  223. - CC=gcc-4.9
  224. - CXX=g++-4.9
  225. - SONAR=true
  226. - PYTHON=python2
  227. cache:
  228. directories:
  229. - '$HOME/.sonar/cache'
  230. addons:
  231. coverity_scan:
  232. project:
  233. name: "open62541/open62541"
  234. description: "Build submitted by Travis"
  235. notification_email: noreply@open62541.org
  236. build_command_prepend: "mkdir build && cd build && cmake .."
  237. build_command: "make"
  238. branch_pattern: coverity_scan
  239. cache:
  240. pip: true
  241. apt: true
  242. directories:
  243. - $HOME/install
  244. - $HOME/.cache/pip
  245. # combine all the commands into one single command. See https://github.com/travis-ci/travis-ci/issues/1066
  246. before_install: |
  247. set -eE
  248. errorTrap() {
  249. last_rv=$?
  250. if [ $last_rv -ne 0 ] ; then
  251. echo ""
  252. echo ""
  253. echo "----------------- Error -----------------"
  254. echo ""
  255. echo "---- Check additional output above!! ----"
  256. # Wait a bit until the stdout is flushed
  257. for i in 1 2 3 4 5 6 7 8 9 10; do echo "."; sleep 1; done
  258. fi
  259. exit $last_rv
  260. }
  261. trap errorTrap 0
  262. # set paths for locally installed libs (like liburcu)
  263. export LOCAL_PKG=$HOME/install
  264. mkdir -p $LOCAL_PKG/lib
  265. mkdir -p $LOCAL_PKG/include
  266. mkdir -p $LOCAL_PKG/bin
  267. export LIBRARY_PATH=$LOCAL_PKG/lib:$LIBRARY_PATH
  268. export C_INCLUDE_PATH=$LOCAL_PKG/include:$C_INCLUDE_PATH
  269. export CPLUS_INCLUDE_PATH=$LOCAL_PKG/include:$CPLUS_INCLUDE_PATH
  270. export PKG_CONFIG_PATH=$LOCAL_PKG/lib/pkgconfig:$PKG_CONFIG_PATH
  271. export PATH=$LOCAL_PKG:$LOCAL_PKG/bin:$PATH
  272. export CMAKE_PREFIX_PATH=$LOCAL_PKG:CMAKE_PREFIX_PATH
  273. # set local path for python packages
  274. export PATH=$PATH:$HOME/.local/bin # linux
  275. export PATH=$PATH:$HOME/Library/Python #OS X
  276. export PATH=$PATH:$HOME/Library/Python/2.7/bin #OS X
  277. # Exit travis if on coverity_scan branch and not first build
  278. test $TRAVIS_BRANCH != coverity_scan -o ${TRAVIS_JOB_NUMBER##*.} = 1 || exit 0
  279. if [ ${TRAVIS_OS_NAME} == "linux" ]; then sh ./tools/travis/travis_linux_before_install.sh; fi
  280. if [ ${TRAVIS_OS_NAME} == "osx" ]; then sh ./tools/travis/travis_osx_before_install.sh; fi
  281. script: |
  282. set -eE
  283. errorTrap() {
  284. last_rv=$?
  285. if [ $last_rv -ne 0 ] ; then
  286. echo ""
  287. echo ""
  288. echo "----------------- Error -----------------"
  289. echo ""
  290. echo "---- Check additional output above!! ----"
  291. # Wait a bit until the stdout is flushed
  292. for i in 1 2 3 4 5 6 7 8 9 10; do echo "."; sleep 1; done
  293. fi
  294. exit $last_rv
  295. }
  296. trap errorTrap 0
  297. if [ ${TRAVIS_OS_NAME} == "linux" ]; then sh ./tools/travis/travis_linux_script.sh; fi
  298. if [ ${TRAVIS_OS_NAME} == "osx" ]; then sh ./tools/travis/travis_osx_script.sh; fi
  299. after_success: |
  300. set -eE
  301. errorTrap() {
  302. last_rv=$?
  303. if [ $last_rv -ne 0 ] ; then
  304. echo ""
  305. echo ""
  306. echo "----------------- Error -----------------"
  307. echo ""
  308. echo "---- Check additional output above!! ----"
  309. # Wait a bit until the stdout is flushed
  310. for i in 1 2 3 4 5 6 7 8 9 10; do echo "."; sleep 1; done
  311. fi
  312. exit $last_rv
  313. }
  314. trap errorTrap 0
  315. if [ ${TRAVIS_OS_NAME} == "linux" ]; then sh ./tools/travis/travis_linux_after_success.sh; fi
  316. # Sleep to flush travis output
  317. echo == Build success ==
  318. sleep 5
  319. after_failure: |
  320. # Sleep to flush travis output
  321. echo == Build failed ==
  322. sleep 5
  323. deploy:
  324. provider: releases
  325. api_key:
  326. secure: PKCoA7MBRtHloIbNF4Qj5LQyCafjekfVeFXlMBd9KmC0ynNuef+D7nn38f/jo25/b0Ii7r+hgslkQPezbKyEqo2zcCB8Pn8TWau2hbzKM/dUCPoN90HVaQcRjUi8P2Y+QkouwyPWSujBL35/X5QiAntRotCSbZx4fkyiN8cU95o=
  327. file:
  328. - open62541-win32.zip
  329. - open62541-win64.zip
  330. - open62541-linux32.tar.gz
  331. - open62541-linux64.tar.gz
  332. - open62541-raspberrypi.tar.gz
  333. - open62541.c
  334. - open62541.h
  335. - open62541*.deb
  336. file_glob: true
  337. skip_cleanup: true
  338. on:
  339. repo: open62541/open62541
  340. tags: true
  341. condition: $CC = gcc-4.8 && $ANALYZE = false