.travis.yml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. language: c
  2. compiler:
  3. - gcc
  4. - clang
  5. os:
  6. - linux
  7. # - osx
  8. # use new build environment (docker)
  9. sudo: false
  10. env:
  11. global:
  12. - secure: nSunY54Wp5HkQCHHbKwlwpbaKyqRVIu/0EnhaoJSwhM1wqerQV/E5d/2JelO9/tZgbungAO7wk/fjutRMVc7d378RTIPwS8vHpvZfEoGhCFsLoTOlqESzsZFBup2H5t1lpQ23jRHDOxlLdJy2lz5U+zd1YnYgDXqdDFjegsIYdo=
  13. - secure: ehswgymGXPM3UINhOOnfSByMnrRNTixeT2vEV+z3kXy3WHew/O1yt9GxaYGrUhJPg4+5chAQgjYmezO1x3/CUKFgeHQUmVTFWEzfy1kL1JVjO+ufYyJDnbY+x3OmyNmMYcef2J5MAuUS2C1KFvIxtLsljVK+gpe4LcylkCIF/3Y=
  14. matrix:
  15. # Do both, compile with static code analysis and without
  16. - ANALYZE=false
  17. - ANALYZE=true
  18. matrix:
  19. exclude:
  20. # This excludes OSX GCC builds.
  21. - os: osx
  22. compiler: gcc
  23. - os: osx
  24. env: ANALYZE=true
  25. addons:
  26. apt:
  27. sources:
  28. # see https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
  29. - kalakris-cmake
  30. - ubuntu-toolchain-r-test
  31. packages:
  32. - binutils-mingw-w64-i686
  33. - build-essential
  34. - clang
  35. - cmake
  36. - gcc-4.8
  37. - gcc-mingw-w64-i686
  38. - gcc-multilib
  39. - g++-4.8
  40. - libc6-dbg # for valgrind compilation
  41. - libsubunit-dev
  42. - libx11-dev
  43. - mingw-w64
  44. - wget
  45. - xutils-dev
  46. - zip
  47. - graphviz
  48. - texlive-latex-recommended
  49. - texlive-latex-extra
  50. - texlive-fonts-recommended
  51. # - libsubunit-dev #for check_0.10.0
  52. coverity_scan:
  53. project:
  54. name: acplt/open62541
  55. description: Open-source OPC UA
  56. notification_email: null@plt.rwth-aachen.de
  57. build_command_prepend: mkdir build && cd build && cmake ..
  58. build_command: make
  59. branch_pattern: coverity_scan
  60. cache:
  61. pip: true
  62. apt: true
  63. directories:
  64. - $HOME/install
  65. before_install:
  66. # set paths for locally installed libs (like liburcu)
  67. - export LOCAL_PKG=$HOME/install
  68. - mkdir -p $LOCAL_PKG/lib
  69. - mkdir -p $LOCAL_PKG/include
  70. - mkdir -p $LOCAL_PKG/bin
  71. - export LIBRARY_PATH=$LOCAL_PKG/lib:$LIBRARY_PATH
  72. - export C_INCLUDE_PATH=$LOCAL_PKG/include:$C_INCLUDE_PATH
  73. - export CPLUS_INCLUDE_PATH=$LOCAL_PKG/include:$CPLUS_INCLUDE_PATH
  74. - export PKG_CONFIG_PATH=$LOCAL_PKG/lib/pkgconfig:$PKG_CONFIG_PATH
  75. - export PATH=$LOCAL_PKG:$LOCAL_PKG/bin:$PATH
  76. # set local path for python packages
  77. - export PATH=$PATH:$HOME/.local/bin # linux
  78. - export PATH=$PATH:$HOME/Library/Python #OS X
  79. - export PATH=$PATH:$HOME/Library/Python/2.7/bin #OS X
  80. # set search path for check library
  81. - export CHECK_INCLUDE_DIRS=$LOCAL_PKG/include/
  82. - export CHECK_LIBRARIES=$LOCAL_PKG/lib/
  83. - sh ./tools/travis/travis_notifications.sh
  84. - if [ ${TRAVIS_OS_NAME} == "linux" ]; then sh ./tools/travis/travis_linux_before_install.sh; fi
  85. - if [ ${TRAVIS_OS_NAME} == "osx" ]; then sh ./tools/travis/travis_osx_before_install.sh; fi
  86. script:
  87. - if [ ${TRAVIS_OS_NAME} == "linux" ]; then sh ./tools/travis/travis_linux_script.sh; fi
  88. - if [ ${TRAVIS_OS_NAME} == "osx" ]; then sh ./tools/travis/travis_osx_script.sh; fi
  89. after_success:
  90. - if [ ${TRAVIS_OS_NAME} == "linux" ]; then sh ./tools/travis/travis_linux_after_success.sh; fi
  91. before_deploy:
  92. - rm build -rf && mkdir -p build && cd build
  93. - echo "Cross compile release build for Raspberry Pi"
  94. - cd ~
  95. - git clone https://github.com/raspberrypi/tools
  96. - cd -
  97. - export PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/
  98. - cmake -DCMAKE_TOOLCHAIN_FILE=../tools/cmake/Toolchain-rpi64.cmake -DUA_ENABLE_AMALGAMATION=ON -DCMAKE_BUILD_TYPE=Release -DUA_BUILD_EXAMPLES=ON ..
  99. - make
  100. - tar -pczf open62541-raspberrypi.tar.gz ../doc ../../server_cert.der ../LICENSE ../AUTHORS ../README.md examples/server examples/client libopen62541.a open62541.h open62541.c
  101. - cp open62541-raspberrypi.tar.gz ..
  102. - cd ..
  103. deploy:
  104. provider: releases
  105. api_key:
  106. secure: PKCoA7MBRtHloIbNF4Qj5LQyCafjekfVeFXlMBd9KmC0ynNuef+D7nn38f/jo25/b0Ii7r+hgslkQPezbKyEqo2zcCB8Pn8TWau2hbzKM/dUCPoN90HVaQcRjUi8P2Y+QkouwyPWSujBL35/X5QiAntRotCSbZx4fkyiN8cU95o=
  107. file:
  108. - open62541-win32.zip
  109. - open62541-win64.zip
  110. - open62541-linux32.tar.gz
  111. - open62541-linux64.tar.gz
  112. - open62541-raspberrypi.tar.gz
  113. - open62541.c
  114. - open62541.h
  115. skip_cleanup: true
  116. on:
  117. repo: open62541/open62541
  118. tags: true
  119. condition: $CC = gcc && $ANALYZE = false
  120. notifications:
  121. irc:
  122. channels:
  123. - "chat.freenode.net#open62541"
  124. on_success: ${IRC_NOTIFY_SUCCESS} # default: change, variable defined in ./tools/travis/travis_notification.sh
  125. on_failure: ${IRC_NOTIFY_FAILURE} # default: always, variable defined in ./tools/travis/travis_notification.sh
  126. use_notice: true
  127. skip_join: true