.travis.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. language: c
  2. os: linux
  3. dist: xenial
  4. sudo: required
  5. env:
  6. global:
  7. - OPENSSL_BRANCH=OpenSSL_1_1_1-stable
  8. - BEE2_BRANCH=master
  9. - PREFIX=/usr/local
  10. - CODECOV_TOKEN="14692d3c-1602-496f-8bb4-24797238978d"
  11. branches:
  12. only:
  13. - master
  14. matrix:
  15. include:
  16. - compiler: gcc
  17. install:
  18. - sudo apt-get install -y lcov
  19. before_script:
  20. - cd ..
  21. - git clone --depth 1 -b ${OPENSSL_BRANCH} https://github.com/openssl/openssl.git
  22. - cd openssl
  23. - mkdir build
  24. - cd build
  25. - ../config shared -d --prefix=${PREFIX} --openssldir=${PREFIX}
  26. - make -j$(nproc) all
  27. - sudo make install > build.log 2>&1 || (cat build.log && exit 1)
  28. - sudo mv ${PREFIX}/openssl.cnf.dist ${PREFIX}/openssl.cnf
  29. - sudo sed -i '/\[ new\_oids\ ]/i openssl_conf = openssl_init\n[ openssl_init ]\nengines = engine_section\n[ engine_section ]\nbee2evp = bee2evp_section\n[ bee2evp_section ]\nengine_id = bee2evp\ndynamic_path = /usr/local/lib/libbee2evp.so\ndefault_algorithms = ALL' ${PREFIX}/openssl.cnf
  30. - cd ..
  31. - cd ..
  32. - git clone --depth 1 -b ${BEE2_BRANCH} https://github.com/agievich/bee2.git
  33. - cd bee2
  34. - mkdir build
  35. - cd build
  36. - cmake ..
  37. - make > build.log 2>&1 || (cat build.log && exit 1)
  38. - sudo make install > build.log 2>&1 || (cat build.log && exit 1)
  39. - cd ..
  40. - cd ..
  41. script:
  42. - cd bee2evp
  43. - export LD_LIBRARY_PATH="${PREFIX}/lib:${LD_LIBRARY_PATH:-}"
  44. - mkdir build
  45. - cd build
  46. - cmake -DCMAKE_BUILD_TYPE=Coverage ..
  47. - make
  48. - sudo make install > build.log 2>&1 || (cat build.log && exit 1)
  49. - cp -a ../test/. .
  50. - lcov -c -i -d . -o coverage_base.info
  51. - python test.py
  52. - lcov -c -d . -o coverage_test.info
  53. - lcov -a coverage_base.info -a coverage_test.info -o coverage.info
  54. - bash <(curl -s https://codecov.io/bash) -f coverage.info