.travis.yml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. - cppcheck
  40. - gcc-4.8
  41. - gcc-mingw-w64-i686
  42. - gcc-multilib
  43. - g++-4.8
  44. - libc6-dbg # for valgrind compilation
  45. - libsubunit-dev
  46. - libx11-dev
  47. - mingw-w64
  48. - python-lxml
  49. - wget
  50. - xutils-dev
  51. - zip
  52. # - libsubunit-dev #for check_0.10.0
  53. coverity_scan:
  54. project:
  55. name: acplt/open62541
  56. description: Open-source OPC UA
  57. notification_email: null@plt.rwth-aachen.de
  58. build_command_prepend: mkdir build && cd build && cmake ..
  59. build_command: make
  60. branch_pattern: coverity_scan
  61. cache:
  62. pip: true
  63. apt: true
  64. directories:
  65. - $HOME/install
  66. before_install:
  67. # set paths for locally installed libs (like liburcu)
  68. - export LOCAL_PKG=$HOME/install
  69. - mkdir -p $LOCAL_PKG/lib
  70. - mkdir -p $LOCAL_PKG/include
  71. - mkdir -p $LOCAL_PKG/bin
  72. - export LIBRARY_PATH=$LOCAL_PKG/lib:$LIBRARY_PATH
  73. - export C_INCLUDE_PATH=$LOCAL_PKG/include:$C_INCLUDE_PATH
  74. - export CPLUS_INCLUDE_PATH=$LOCAL_PKG/include:$CPLUS_INCLUDE_PATH
  75. - export PKG_CONFIG_PATH=$LOCAL_PKG/lib/pkgconfig:$PKG_CONFIG_PATH
  76. - export PATH=$LOCAL_PKG:$LOCAL_PKG/bin:$PATH
  77. # set local path for python packages
  78. - export PATH=$PATH:$HOME/.local/bin # linux
  79. - export PATH=$PATH:$HOME/Library/Python #OS X
  80. - export PATH=$PATH:$HOME/Library/Python/2.7/bin #OS X
  81. # set search path for check library
  82. - export CHECK_INCLUDE_DIRS=$LOCAL_PKG/include/
  83. - export CHECK_LIBRARIES=$LOCAL_PKG/lib/
  84. - if [ ${TRAVIS_OS_NAME} == "linux" ]; then sh ./tools/travis_linux_before_install.sh; fi
  85. - if [ ${TRAVIS_OS_NAME} == "osx" ]; then sh ./tools/travis_osx_before_install.sh; fi
  86. script:
  87. - if [ ${TRAVIS_OS_NAME} == "linux" ]; then sh ./tools/travis_linux_script.sh; fi
  88. - if [ ${TRAVIS_OS_NAME} == "osx" ]; then sh ./tools/travis_osx_script.sh; fi
  89. after_success:
  90. - if [[ ( ${TRAVIS_OS_NAME} == "linux" && ${CC} == "gcc" && ${TRAVIS_BRANCH} == "master" && ${TRAVIS_PULL_REQUEST} == "false" ) ]]; then sh ./tools/travis_push_doc.sh; fi
  91. - if [[ ( ${TRAVIS_OS_NAME} == "linux" && ${CC} == "gcc" && ${TRAVIS_BRANCH} == "master" && ${TRAVIS_PULL_REQUEST} == "false" ) ]]; then sh ./tools/travis_push_coverity.sh; fi
  92. - if [[ ( ${TRAVIS_OS_NAME} == "linux" && ${CC} == "gcc" ) ]]; then sh ./tools/travis_push_release.sh; fi
  93. before_deploy:
  94. - rm build -rf && mkdir -p build && cd build
  95. - echo "Cross compile release build for Raspberry Pi"
  96. - cd ~
  97. - git clone https://github.com/raspberrypi/tools
  98. - cd -
  99. - export PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/
  100. - cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-rpi64.cmake -DENABLE_AMALGAMATION=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLESERVER=ON -DBUILD_EXAMPLECLIENT=ON ..
  101. - make
  102. - 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
  103. - cp open62541-raspberrypi.tar.gz ..
  104. - cd ..
  105. deploy:
  106. provider: releases
  107. api_key:
  108. secure: PKCoA7MBRtHloIbNF4Qj5LQyCafjekfVeFXlMBd9KmC0ynNuef+D7nn38f/jo25/b0Ii7r+hgslkQPezbKyEqo2zcCB8Pn8TWau2hbzKM/dUCPoN90HVaQcRjUi8P2Y+QkouwyPWSujBL35/X5QiAntRotCSbZx4fkyiN8cU95o=
  109. file:
  110. - open62541-win32.zip
  111. - open62541-win64.zip
  112. - open62541-linux32.tar.gz
  113. - open62541-linux64.tar.gz
  114. - open62541-raspberrypi.tar.gz
  115. - open62541.c
  116. - open62541.h
  117. skip_cleanup: true
  118. on:
  119. repo: open62541/open62541
  120. tags: true
  121. condition: $CC = gcc