.travis.yml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. language: c
  2. compiler:
  3. - gcc
  4. env:
  5. global:
  6. - secure: nSunY54Wp5HkQCHHbKwlwpbaKyqRVIu/0EnhaoJSwhM1wqerQV/E5d/2JelO9/tZgbungAO7wk/fjutRMVc7d378RTIPwS8vHpvZfEoGhCFsLoTOlqESzsZFBup2H5t1lpQ23jRHDOxlLdJy2lz5U+zd1YnYgDXqdDFjegsIYdo=
  7. - secure: ehswgymGXPM3UINhOOnfSByMnrRNTixeT2vEV+z3kXy3WHew/O1yt9GxaYGrUhJPg4+5chAQgjYmezO1x3/CUKFgeHQUmVTFWEzfy1kL1JVjO+ufYyJDnbY+x3OmyNmMYcef2J5MAuUS2C1KFvIxtLsljVK+gpe4LcylkCIF/3Y=
  8. addons:
  9. coverity_scan:
  10. project:
  11. name: acplt/open62541
  12. description: Open-source OPC UA
  13. notification_email: null@plt.rwth-aachen.de
  14. build_command_prepend: mkdir build && cd build && cmake ..
  15. build_command: make
  16. branch_pattern: coverity_scan
  17. before_install:
  18. - sudo apt-get install binutils-mingw-w64-i686 gcc-mingw-w64-i686
  19. - sudo add-apt-repository ppa:kalakris/cmake -y
  20. - sudo apt-get update -qq
  21. - sudo apt-get install -qq --no-install-recommends build-essential cmake python-lxml gcc-multilib graphviz doxygen wget zip
  22. - wget http://security.ubuntu.com/ubuntu/pool/main/c/check/check_0.9.10-6ubuntu3_amd64.deb
  23. - sudo dpkg -i check_0.9.10-6ubuntu3_amd64.deb
  24. - wget https://launchpad.net/ubuntu/+source/liburcu/0.8.5-1ubuntu1/+build/6513813/+files/liburcu2_0.8.5-1ubuntu1_amd64.deb
  25. - wget https://launchpad.net/ubuntu/+source/liburcu/0.8.5-1ubuntu1/+build/6513813/+files/liburcu-dev_0.8.5-1ubuntu1_amd64.deb
  26. - sudo dpkg -i liburcu2_0.8.5-1ubuntu1_amd64.deb
  27. - sudo dpkg -i liburcu-dev_0.8.5-1ubuntu1_amd64.deb
  28. - sudo pip install cpp-coveralls
  29. script:
  30. - echo "Checking the applicability of patches"
  31. - # ./tools/.checkPorts.sh
  32. - echo "Testing builds"
  33. - mkdir -p build
  34. - cd build
  35. - echo "Cross compile release build for MinGW"
  36. - cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw32.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLESERVER=ON ..
  37. - make -j
  38. - zip open62541-win32.zip ../README.md exampleServer_datasource.exe libopen62541.dll open62541.h open62541.c
  39. - cp open62541-win32.zip ..
  40. - cd .. && rm build -rf && mkdir -p build && cd build
  41. - echo "Cross compile release build for 32-bit linux"
  42. - cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-gcc-m32.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLESERVER=ON ..
  43. - make -j
  44. - tar -pczf open62541-linux32.tar.gz ../README.md exampleServer_datasource libopen62541.so open62541.h open62541.c
  45. - cp open62541-linux32.tar.gz ..
  46. - cd .. && rm build -rf && mkdir -p build && cd build
  47. - echo "Compile release build for 64-bit linux"
  48. - cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLESERVER=ON ..
  49. - make -j
  50. - tar -pczf open62541-linux64.tar.gz ../README.md exampleServer_datasource libopen62541.so open62541.h open62541.c
  51. - cp open62541-linux64.tar.gz ..
  52. - cd .. && rm build -rf && mkdir -p build && cd build
  53. - echo "Upgrade to gcc 4.8"
  54. - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
  55. - sudo apt-get update -qq
  56. - sudo apt-get install -qq gcc-4.8
  57. - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
  58. - sudo update-alternatives --config gcc
  59. - echo "Compile multithreaded version"
  60. - cmake -DENABLE_MULTITHREADING=ON -DBUILD_EXAMPLESERVER=ON ..
  61. - make -j
  62. - cd .. && rm build -rf && mkdir -p build && cd build
  63. - echo "Documentation build"
  64. - cmake -DEXTENSION_STATELESS=ON -DBUILD_DOCUMENTATION=ON ..
  65. - make -j
  66. - echo "Generate documentation"
  67. - make -j doc
  68. - echo "Debug build and unit tests (64 bit)"
  69. - make clean
  70. - cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_UNIT_TESTS=ON -DENABLE_COVERAGE=ON ..
  71. - make -j && make test
  72. - coveralls --gcov /usr/bin/gcov-4.8 -E '.*\.h' -E '.*CMakeCXXCompilerId\.cpp' -E '.*CMakeCCompilerId\.c' -r ../
  73. - cd ..
  74. after_success:
  75. - ./tools/.deployDoxygen.sh
  76. - ./tools/.coverity.sh
  77. before_deploy:
  78. - rm build -rf && mkdir -p build && cd build
  79. - echo "Cross compile release build for Raspberry Pi"
  80. - cd ~
  81. - git clone https://github.com/raspberrypi/tools
  82. - cd -
  83. - export PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/
  84. - cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-rpi64.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLESERVER=ON ..
  85. - make -j
  86. - tar -pczf open62541-raspberrypi.tar.gz ../README.md exampleServer_datasource libopen62541.so open62541.h open62541.c
  87. - cp open62541-raspberrypi.tar.gz ..
  88. - cd ..
  89. deploy:
  90. provider: releases
  91. api_key:
  92. secure: PKCoA7MBRtHloIbNF4Qj5LQyCafjekfVeFXlMBd9KmC0ynNuef+D7nn38f/jo25/b0Ii7r+hgslkQPezbKyEqo2zcCB8Pn8TWau2hbzKM/dUCPoN90HVaQcRjUi8P2Y+QkouwyPWSujBL35/X5QiAntRotCSbZx4fkyiN8cU95o=
  93. file:
  94. - open62541-win32.zip
  95. - open62541-linux32.tar.gz
  96. - open62541-linux64.tar.gz
  97. - open62541-raspberrypi.tar.gz
  98. skip_cleanup: true
  99. on:
  100. tags: true