.travis.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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. # - libsubunit-dev #for check_0.10.0
  49. coverity_scan:
  50. project:
  51. name: acplt/open62541
  52. description: Open-source OPC UA
  53. notification_email: null@plt.rwth-aachen.de
  54. build_command_prepend: mkdir build && cd build && cmake ..
  55. build_command: make
  56. branch_pattern: coverity_scan
  57. cache:
  58. pip: true
  59. apt: true
  60. directories:
  61. - $HOME/install
  62. before_install:
  63. # set paths for locally installed libs (like liburcu)
  64. - export LOCAL_PKG=$HOME/install
  65. - mkdir -p $LOCAL_PKG/lib
  66. - mkdir -p $LOCAL_PKG/include
  67. - mkdir -p $LOCAL_PKG/bin
  68. - export LIBRARY_PATH=$LOCAL_PKG/lib:$LIBRARY_PATH
  69. - export C_INCLUDE_PATH=$LOCAL_PKG/include:$C_INCLUDE_PATH
  70. - export CPLUS_INCLUDE_PATH=$LOCAL_PKG/include:$CPLUS_INCLUDE_PATH
  71. - export PKG_CONFIG_PATH=$LOCAL_PKG/lib/pkgconfig:$PKG_CONFIG_PATH
  72. - export PATH=$LOCAL_PKG:$LOCAL_PKG/bin:$PATH
  73. # set local path for python packages
  74. - export PATH=$PATH:$HOME/.local/bin # linux
  75. - export PATH=$PATH:$HOME/Library/Python #OS X
  76. - export PATH=$PATH:$HOME/Library/Python/2.7/bin #OS X
  77. # set search path for check library
  78. - export CHECK_INCLUDE_DIRS=$LOCAL_PKG/include/
  79. - export CHECK_LIBRARIES=$LOCAL_PKG/lib/
  80. - sh ./tools/travis/travis_notifications.sh
  81. - if [ ${TRAVIS_OS_NAME} == "linux" ]; then sh ./tools/travis/travis_linux_before_install.sh; fi
  82. - if [ ${TRAVIS_OS_NAME} == "osx" ]; then sh ./tools/travis/travis_osx_before_install.sh; fi
  83. script:
  84. - if [ ${TRAVIS_OS_NAME} == "linux" ]; then sh ./tools/travis/travis_linux_script.sh; fi
  85. - if [ ${TRAVIS_OS_NAME} == "osx" ]; then sh ./tools/travis/travis_osx_script.sh; fi
  86. after_success:
  87. - if [[ ( ${TRAVIS_OS_NAME} == "linux" && ${CC} == "gcc" && ${TRAVIS_BRANCH} == "0.2" && ${TRAVIS_PULL_REQUEST} == "false" ) ]]; then sh ./tools/travis/travis_push_doc.sh; fi
  88. - if [[ ( ${TRAVIS_OS_NAME} == "linux" && ${CC} == "gcc" && ${TRAVIS_BRANCH} == "master" && ${TRAVIS_PULL_REQUEST} == "false" ) ]]; then sh ./tools/travis/travis_push_coverity.sh; fi
  89. - if [[ ( ${TRAVIS_OS_NAME} == "linux" && ${CC} == "gcc" ) ]]; then sh ./tools/travis/travis_push_release.sh; fi
  90. before_deploy:
  91. - rm build -rf && mkdir -p build && cd build
  92. - echo "Cross compile release build for Raspberry Pi"
  93. - cd ~
  94. - git clone https://github.com/raspberrypi/tools
  95. - cd -
  96. - export PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/
  97. - cmake -DCMAKE_TOOLCHAIN_FILE=../tools/cmake/Toolchain-rpi64.cmake -DUA_ENABLE_AMALGAMATION=ON -DCMAKE_BUILD_TYPE=Release -DUA_BUILD_EXAMPLES=ON ..
  98. - make
  99. - tar -pczf open62541-raspberrypi.tar.gz ../doc ../../server_cert.der ../LICENSE ../AUTHORS ../README.md examples/server examples/client libopen62541.a open62541.h open62541.c
  100. - cp open62541-raspberrypi.tar.gz ..
  101. - cd ..
  102. deploy:
  103. provider: releases
  104. api_key:
  105. secure: PKCoA7MBRtHloIbNF4Qj5LQyCafjekfVeFXlMBd9KmC0ynNuef+D7nn38f/jo25/b0Ii7r+hgslkQPezbKyEqo2zcCB8Pn8TWau2hbzKM/dUCPoN90HVaQcRjUi8P2Y+QkouwyPWSujBL35/X5QiAntRotCSbZx4fkyiN8cU95o=
  106. file:
  107. - open62541-win32.zip
  108. - open62541-win64.zip
  109. - open62541-linux32.tar.gz
  110. - open62541-linux64.tar.gz
  111. - open62541-raspberrypi.tar.gz
  112. - open62541.c
  113. - open62541.h
  114. skip_cleanup: true
  115. on:
  116. repo: open62541/open62541
  117. tags: true
  118. condition: $CC = gcc && $ANALYZE = false
  119. notifications:
  120. irc:
  121. channels:
  122. - "chat.freenode.net#open62541"
  123. on_success: ${IRC_NOTIFY_SUCCESS} # default: change, variable defined in ./tools/travis/travis_notification.sh
  124. on_failure: ${IRC_NOTIFY_FAILURE} # default: always, variable defined in ./tools/travis/travis_notification.sh
  125. use_notice: true
  126. skip_join: true