.travis.yml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. allow_failures:
  26. - env: ANALYZE=true
  27. compiler: gcc
  28. addons:
  29. apt:
  30. sources:
  31. # see https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
  32. - kalakris-cmake
  33. - ubuntu-toolchain-r-test
  34. packages:
  35. - binutils-mingw-w64-i686
  36. - build-essential
  37. - clang
  38. - cmake
  39. - gcc-4.8
  40. - gcc-mingw-w64-i686
  41. - gcc-multilib
  42. - g++-4.8
  43. - libc6-dbg # for valgrind compilation
  44. - libsubunit-dev
  45. - libx11-dev
  46. - mingw-w64
  47. - wget
  48. - xutils-dev
  49. - zip
  50. # - libsubunit-dev #for check_0.10.0
  51. coverity_scan:
  52. project:
  53. name: acplt/open62541
  54. description: Open-source OPC UA
  55. notification_email: null@plt.rwth-aachen.de
  56. build_command_prepend: mkdir build && cd build && cmake ..
  57. build_command: make
  58. branch_pattern: coverity_scan
  59. cache:
  60. pip: true
  61. apt: true
  62. directories:
  63. - $HOME/install
  64. before_install:
  65. # set paths for locally installed libs (like liburcu)
  66. - export LOCAL_PKG=$HOME/install
  67. - mkdir -p $LOCAL_PKG/lib
  68. - mkdir -p $LOCAL_PKG/include
  69. - mkdir -p $LOCAL_PKG/bin
  70. - export LIBRARY_PATH=$LOCAL_PKG/lib:$LIBRARY_PATH
  71. - export C_INCLUDE_PATH=$LOCAL_PKG/include:$C_INCLUDE_PATH
  72. - export CPLUS_INCLUDE_PATH=$LOCAL_PKG/include:$CPLUS_INCLUDE_PATH
  73. - export PKG_CONFIG_PATH=$LOCAL_PKG/lib/pkgconfig:$PKG_CONFIG_PATH
  74. - export PATH=$LOCAL_PKG:$LOCAL_PKG/bin:$PATH
  75. # set local path for python packages
  76. - export PATH=$PATH:$HOME/.local/bin # linux
  77. - export PATH=$PATH:$HOME/Library/Python #OS X
  78. - export PATH=$PATH:$HOME/Library/Python/2.7/bin #OS X
  79. # set search path for check library
  80. - export CHECK_INCLUDE_DIRS=$LOCAL_PKG/include/
  81. - export CHECK_LIBRARIES=$LOCAL_PKG/lib/
  82. - if [ ${TRAVIS_OS_NAME} == "linux" ]; then sh ./tools/travis/travis_linux_before_install.sh; fi
  83. - if [ ${TRAVIS_OS_NAME} == "osx" ]; then sh ./tools/travis/travis_osx_before_install.sh; fi
  84. script:
  85. - if [ ${TRAVIS_OS_NAME} == "linux" ]; then sh ./tools/travis/travis_linux_script.sh; fi
  86. - if [ ${TRAVIS_OS_NAME} == "osx" ]; then sh ./tools/travis/travis_osx_script.sh; fi
  87. after_success:
  88. - if [[ ( ${TRAVIS_OS_NAME} == "linux" && ${CC} == "gcc" && ${TRAVIS_BRANCH} == "master" && ${TRAVIS_PULL_REQUEST} == "false" ) ]]; then sh ./tools/travis/travis_push_doc.sh; fi
  89. - if [[ ( ${TRAVIS_OS_NAME} == "linux" && ${CC} == "gcc" && ${TRAVIS_BRANCH} == "master" && ${TRAVIS_PULL_REQUEST} == "false" ) ]]; then sh ./tools/travis/travis_push_coverity.sh; fi
  90. - if [[ ( ${TRAVIS_OS_NAME} == "linux" && ${CC} == "gcc" ) ]]; then sh ./tools/travis/travis_push_release.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 -DENABLE_AMALGAMATION=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLESERVER=ON -DBUILD_EXAMPLECLIENT=ON ..
  99. - make
  100. - tar -pczf open62541-raspberrypi.tar.gz ../doc ../server_cert.der ../LICENSE ../AUTHORS ../README.md server_static server client_static client libopen62541.so 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