.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. - cp ../README.md .
  39. - zip open62541-win32.zip README.md exampleServer_datasource.exe libopen62541.dll libopen62541.dll.a open62541.h open62541.c
  40. - cp open62541-win32.zip ..
  41. - cd .. && rm build -rf && mkdir -p build && cd build
  42. - echo "Cross compile release build for 32-bit linux"
  43. - cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-gcc-m32.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLESERVER=ON ..
  44. - make -j
  45. - tar -pczf open62541-linux32.tar.gz ../README.md exampleServer_datasource libopen62541.so open62541.h open62541.c
  46. - cp open62541-linux32.tar.gz ..
  47. - cd .. && rm build -rf && mkdir -p build && cd build
  48. - echo "Compile release build for 64-bit linux"
  49. - cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLESERVER=ON ..
  50. - make -j
  51. - tar -pczf open62541-linux64.tar.gz ../README.md exampleServer_datasource libopen62541.so open62541.h open62541.c
  52. - cp open62541-linux64.tar.gz ..
  53. - cd .. && rm build -rf && mkdir -p build && cd build
  54. - echo "Upgrade to gcc 4.8"
  55. - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
  56. - sudo apt-get update -qq
  57. - sudo apt-get install -qq gcc-4.8
  58. - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
  59. - sudo update-alternatives --config gcc
  60. - echo "Compile multithreaded version"
  61. - cmake -DENABLE_MULTITHREADING=ON -DBUILD_EXAMPLESERVER=ON ..
  62. - make -j
  63. - cd .. && rm build -rf && mkdir -p build && cd build
  64. - echo "Documentation build"
  65. - cmake -DEXTENSION_STATELESS=ON -DBUILD_DOCUMENTATION=ON ..
  66. - make -j
  67. - echo "Generate documentation"
  68. - make -j doc
  69. - echo "Debug build and unit tests (64 bit)"
  70. - make clean
  71. - cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_UNIT_TESTS=ON -DENABLE_COVERAGE=ON ..
  72. - make -j && make test
  73. - coveralls --gcov /usr/bin/gcov-4.8 -E '.*\.h' -E '.*CMakeCXXCompilerId\.cpp' -E '.*CMakeCCompilerId\.c' -r ../
  74. - cd ..
  75. after_success:
  76. - ./tools/.deployDoxygen.sh
  77. - ./tools/.coverity.sh
  78. before_deploy:
  79. - rm build -rf && mkdir -p build && cd build
  80. - echo "Cross compile release build for Raspberry Pi"
  81. - cd ~
  82. - git clone https://github.com/raspberrypi/tools
  83. - cd -
  84. - export PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/
  85. - cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-rpi64.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLESERVER=ON ..
  86. - make -j
  87. - tar -pczf open62541-raspberrypi.tar.gz ../README.md exampleServer_datasource libopen62541.so open62541.h open62541.c
  88. - cp open62541-raspberrypi.tar.gz ..
  89. - cd ..
  90. deploy:
  91. provider: releases
  92. api_key:
  93. secure: PKCoA7MBRtHloIbNF4Qj5LQyCafjekfVeFXlMBd9KmC0ynNuef+D7nn38f/jo25/b0Ii7r+hgslkQPezbKyEqo2zcCB8Pn8TWau2hbzKM/dUCPoN90HVaQcRjUi8P2Y+QkouwyPWSujBL35/X5QiAntRotCSbZx4fkyiN8cU95o=
  94. file:
  95. - open62541-win32.zip
  96. - open62541-linux32.tar.gz
  97. - open62541-linux64.tar.gz
  98. - open62541-raspberrypi.tar.gz
  99. skip_cleanup: true
  100. on:
  101. tags: true