.travis.yml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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 mingw-w64
  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 "Documentation and certificate build"
  33. - mkdir -p build
  34. - cd build
  35. - cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_DOCUMENTATION=ON -DGENERATE_SELFSIGNED=ON ..
  36. - make doc
  37. - make selfsigned
  38. - cp -r doc ..
  39. - cp server_cert.der ..
  40. - echo "Testing builds"
  41. - cd .. && rm build -rf && mkdir -p build && cd build
  42. - echo "Cross compile release build for MinGW 32 bit"
  43. - cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw32.cmake -DENABLE_AMALGAMATION=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLESERVER=ON -DBUILD_EXAMPLECLIENT=ON ..
  44. - make
  45. - cp ../README.md .
  46. - cp ../LICENSE .
  47. - cp ../AUTHORS .
  48. - cp -r ../doc .
  49. - cp ../server_cert.der .
  50. - zip -r open62541-win32.zip doc server_cert.der LICENSE AUTHORS README.md server_static.exe server.exe client.exe client_static.exe libopen62541.dll libopen62541.dll.a open62541.h open62541.c
  51. - cp open62541-win32.zip ..
  52. - cd .. && rm build -rf && mkdir -p build && cd build
  53. - echo "Cross compile release build for MinGW 64 bit"
  54. - cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw64.cmake -DENABLE_AMALGAMATION=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLESERVER=ON -DBUILD_EXAMPLECLIENT=ON ..
  55. - make
  56. - cp ../README.md .
  57. - cp ../LICENSE .
  58. - cp ../AUTHORS .
  59. - cp -r ../doc .
  60. - cp ../server_cert.der .
  61. - zip -r open62541-win64.zip doc server_cert.der LICENSE AUTHORS README.md server_static.exe server.exe client.exe client_static.exe libopen62541.dll libopen62541.dll.a open62541.h open62541.c
  62. - cp open62541-win64.zip ..
  63. - cd .. && rm build -rf && mkdir -p build && cd build
  64. - echo "Cross compile release build for 32-bit linux"
  65. - cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-gcc-m32.cmake -DENABLE_AMALGAMATION=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLESERVER=ON -DBUILD_EXAMPLECLIENT=ON ..
  66. - make
  67. - tar -pczf open62541-linux32.tar.gz ../doc ../server_cert.der ../LICENSE ../AUTHORS ../README.md server_static server client_static client libopen62541.so open62541.h open62541.c
  68. - cp open62541-linux32.tar.gz ..
  69. - cd .. && rm build -rf && mkdir -p build && cd build
  70. - echo "Compile release build for 64-bit linux"
  71. - cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_AMALGAMATION=ON -DBUILD_EXAMPLESERVER=ON -DBUILD_EXAMPLECLIENT=ON ..
  72. - make
  73. - tar -pczf open62541-linux64.tar.gz ../doc ../server_cert.der ../LICENSE ../AUTHORS ../README.md server_static server client_static client libopen62541.so open62541.h open62541.c
  74. - cp open62541-linux64.tar.gz ..
  75. - cp open62541.h .. #copy single file-release
  76. - cp open62541.c .. #copy single file-release
  77. - cd .. && rm build -rf && mkdir -p build && cd build
  78. - echo "Upgrade to gcc 4.8"
  79. - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
  80. - sudo apt-get update -qq
  81. - sudo apt-get install -qq gcc-4.8
  82. - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
  83. - sudo update-alternatives --config gcc
  84. - echo "Compile multithreaded version"
  85. - cmake -DENABLE_MULTITHREADING=ON -DBUILD_EXAMPLESERVER=ON ..
  86. - make
  87. - cd .. && rm build -rf && mkdir -p build && cd build
  88. - echo "Debug build and unit tests (64 bit)"
  89. - cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_DEMO_NODESET=ON -DBUILD_UNIT_TESTS=ON -DENABLE_COVERAGE=ON ..
  90. - make && make test
  91. - coveralls --gcov /usr/bin/gcov-4.8 -E '.*\.h' -E '.*CMakeCXXCompilerId\.cpp' -E '.*CMakeCCompilerId\.c' -r ../
  92. - cd ..
  93. after_success:
  94. - ./tools/.deployGH.sh
  95. - ./tools/.coverity.sh
  96. before_deploy:
  97. - rm build -rf && mkdir -p build && cd build
  98. - echo "Cross compile release build for Raspberry Pi"
  99. - cd ~
  100. - git clone https://github.com/raspberrypi/tools
  101. - cd -
  102. - export PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/
  103. - cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-rpi64.cmake -DENABLE_AMALGAMATION=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLESERVER=ON -DBUILD_EXAMPLECLIENT=ON ..
  104. - make
  105. - 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
  106. - cp open62541-raspberrypi.tar.gz ..
  107. - cd ..
  108. deploy:
  109. provider: releases
  110. api_key:
  111. secure: PKCoA7MBRtHloIbNF4Qj5LQyCafjekfVeFXlMBd9KmC0ynNuef+D7nn38f/jo25/b0Ii7r+hgslkQPezbKyEqo2zcCB8Pn8TWau2hbzKM/dUCPoN90HVaQcRjUi8P2Y+QkouwyPWSujBL35/X5QiAntRotCSbZx4fkyiN8cU95o=
  112. file:
  113. - open62541-win32.zip
  114. - open62541-win64.zip
  115. - open62541-linux32.tar.gz
  116. - open62541-linux64.tar.gz
  117. - open62541-raspberrypi.tar.gz
  118. - open62541.c
  119. - open62541.h
  120. skip_cleanup: true
  121. on:
  122. tags: true