.travis.yml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  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. - 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. - os: linux
  50. addons:
  51. apt:
  52. sources:
  53. - ubuntu-toolchain-r-test
  54. packages:
  55. - check
  56. - gcc-8
  57. - gcc-8-multilib
  58. - g++-8
  59. - g++-8-multilib
  60. - graphviz
  61. - linux-libc-dev:i386
  62. - python-six
  63. - python3-six
  64. - texlive-fonts-recommended
  65. - texlive-latex-extra
  66. - texlive-latex-recommended
  67. - valgrind
  68. env:
  69. - ANALYZE=false
  70. - CC=gcc-8
  71. - CXX=g++-8
  72. - PYTHON=python2
  73. - os: linux
  74. addons:
  75. apt:
  76. sources:
  77. - llvm-toolchain-trusty-6.0
  78. - ubuntu-toolchain-r-test
  79. packages:
  80. - check
  81. - clang-6.0
  82. - clang-tidy-6.0
  83. - graphviz
  84. - python-six
  85. - texlive-fonts-recommended
  86. - texlive-latex-extra
  87. - texlive-latex-recommended
  88. - valgrind
  89. env:
  90. - ANALYZE=false
  91. - CC=clang-6.0
  92. - CXX=clang++-6.0
  93. - PYTHON=python2
  94. - os: linux
  95. addons:
  96. apt:
  97. sources:
  98. - llvm-toolchain-trusty-6.0
  99. - ubuntu-toolchain-r-test
  100. packages:
  101. - check
  102. - clang-6.0
  103. - clang-tidy-6.0
  104. - graphviz
  105. - python3-six
  106. - texlive-fonts-recommended
  107. - texlive-latex-extra
  108. - texlive-latex-recommended
  109. - valgrind
  110. env:
  111. - ANALYZE=false
  112. - CC=clang-6.0
  113. - CXX=clang++-6.0
  114. - PYTHON=python3
  115. - os: linux
  116. addons:
  117. apt:
  118. packages:
  119. - check
  120. - graphviz
  121. - python-six
  122. - python3-six
  123. - texlive-fonts-recommended
  124. - texlive-latex-extra
  125. - texlive-latex-recommended
  126. env:
  127. - ANALYZE=false
  128. - CC=tcc
  129. - PYTHON=python2
  130. - os: linux
  131. addons:
  132. apt:
  133. packages:
  134. - cppcheck
  135. env:
  136. - ANALYZE=true
  137. - CC=gcc-4.8
  138. - CXX=g++-4.8
  139. - os: linux
  140. addons:
  141. apt:
  142. sources:
  143. - llvm-toolchain-trusty-6.0
  144. - ubuntu-toolchain-r-test
  145. packages:
  146. - check
  147. - clang-6.0
  148. - clang-tidy-6.0
  149. - graphviz
  150. - python-six
  151. - python3-six
  152. - texlive-fonts-recommended
  153. - texlive-latex-extra
  154. - texlive-latex-recommended
  155. env:
  156. - ANALYZE=true
  157. - PYTHON=python3
  158. - CC=clang-6.0
  159. - CXX=clang++-6.0
  160. #- os: linux
  161. # compiler: gcc
  162. # env: LINT=true
  163. - os: linux
  164. env:
  165. - DOCKER=true
  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. - libfuzzer-6.0-dev
  177. - python-six
  178. - python3-six
  179. env:
  180. - FUZZER=true
  181. - os: osx
  182. compiler: clang
  183. # disable homebrew auto update which takes a lot of time
  184. env: HOMEBREW_NO_AUTO_UPDATE=1
  185. cache:
  186. directories:
  187. - $HOME/Library/Caches/Homebrew
  188. - os: linux
  189. addons:
  190. sonarcloud:
  191. organization: open62541
  192. branches:
  193. - master
  194. - sonarcloud
  195. env:
  196. - CC=gcc-4.9
  197. - CXX=g++-4.9
  198. - SONAR=true
  199. - PYTHON=python2
  200. cache:
  201. directories:
  202. - '$HOME/.sonar/cache'
  203. addons:
  204. coverity_scan:
  205. project:
  206. name: "open62541/open62541"
  207. description: "Build submitted by Travis"
  208. notification_email: noreply@open62541.org
  209. build_command_prepend: "mkdir build && cd build && cmake .."
  210. build_command: "make"
  211. branch_pattern: coverity_scan
  212. cache:
  213. pip: true
  214. apt: true
  215. directories:
  216. - $HOME/install
  217. - $HOME/.cache/pip
  218. # combine all the commands into one single command. See https://github.com/travis-ci/travis-ci/issues/1066
  219. before_install: |
  220. set -e
  221. # set paths for locally installed libs (like liburcu)
  222. export LOCAL_PKG=$HOME/install
  223. mkdir -p $LOCAL_PKG/lib
  224. mkdir -p $LOCAL_PKG/include
  225. mkdir -p $LOCAL_PKG/bin
  226. export LIBRARY_PATH=$LOCAL_PKG/lib:$LIBRARY_PATH
  227. export C_INCLUDE_PATH=$LOCAL_PKG/include:$C_INCLUDE_PATH
  228. export CPLUS_INCLUDE_PATH=$LOCAL_PKG/include:$CPLUS_INCLUDE_PATH
  229. export PKG_CONFIG_PATH=$LOCAL_PKG/lib/pkgconfig:$PKG_CONFIG_PATH
  230. export PATH=$LOCAL_PKG:$LOCAL_PKG/bin:$PATH
  231. export CMAKE_PREFIX_PATH=$LOCAL_PKG:CMAKE_PREFIX_PATH
  232. # set local path for python packages
  233. export PATH=$PATH:$HOME/.local/bin # linux
  234. export PATH=$PATH:$HOME/Library/Python #OS X
  235. export PATH=$PATH:$HOME/Library/Python/2.7/bin #OS X
  236. # Exit travis if on coverity_scan branch and not first build
  237. test $TRAVIS_BRANCH != coverity_scan -o ${TRAVIS_JOB_NUMBER##*.} = 1 || exit 0
  238. if [ ${TRAVIS_OS_NAME} == "linux" ]; then sh ./tools/travis/travis_linux_before_install.sh; fi
  239. if [ ${TRAVIS_OS_NAME} == "osx" ]; then sh ./tools/travis/travis_osx_before_install.sh; fi
  240. script: |
  241. set -e
  242. if [ ${TRAVIS_OS_NAME} == "linux" ]; then sh ./tools/travis/travis_linux_script.sh; fi
  243. if [ ${TRAVIS_OS_NAME} == "osx" ]; then sh ./tools/travis/travis_osx_script.sh; fi
  244. after_success: |
  245. if [ ${TRAVIS_OS_NAME} == "linux" ]; then sh ./tools/travis/travis_linux_after_success.sh; fi
  246. # Sleep to flush travis output
  247. echo == Build success ==
  248. sleep 5
  249. after_failure: |
  250. # Sleep to flush travis output
  251. echo == Build failed ==
  252. sleep 5
  253. deploy:
  254. provider: releases
  255. api_key:
  256. secure: PKCoA7MBRtHloIbNF4Qj5LQyCafjekfVeFXlMBd9KmC0ynNuef+D7nn38f/jo25/b0Ii7r+hgslkQPezbKyEqo2zcCB8Pn8TWau2hbzKM/dUCPoN90HVaQcRjUi8P2Y+QkouwyPWSujBL35/X5QiAntRotCSbZx4fkyiN8cU95o=
  257. file:
  258. - open62541-win32.zip
  259. - open62541-win64.zip
  260. - open62541-linux32.tar.gz
  261. - open62541-linux64.tar.gz
  262. - open62541-raspberrypi.tar.gz
  263. - open62541.c
  264. - open62541.h
  265. skip_cleanup: true
  266. on:
  267. repo: open62541/open62541
  268. tags: true
  269. condition: $CC = gcc && $ANALYZE = false