.travis.yml 4.4 KB

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