.travis.yml 4.9 KB

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