.travis.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. language: c
  2. os:
  3. - linux
  4. - osx
  5. arch:
  6. - amd64
  7. - ppc64le
  8. - s390x
  9. - arm64
  10. sudo: required
  11. dist: trusty
  12. compiler:
  13. - clang
  14. - gcc
  15. matrix:
  16. fast_finish: true
  17. exclude:
  18. # Skip GCC builds on macOS.
  19. - os: osx
  20. compiler: gcc
  21. include:
  22. # Additional GCC builds for code coverage.
  23. - os: linux
  24. compiler: gcc
  25. env: CODE_COVERAGE=ON
  26. cache:
  27. apt: true
  28. addons:
  29. apt:
  30. packages:
  31. - clang-3.6
  32. - lcov
  33. branches:
  34. only:
  35. - master
  36. script:
  37. - sh ./autogen.sh
  38. - if [[ "$CC" == "gcc" && "$CODE_COVERAGE" == "ON" ]]; then
  39. ./configure CFLAGS="-ftest-coverage -fprofile-arcs -coverage";
  40. else
  41. ./configure;
  42. fi
  43. - make
  44. - make check
  45. after_success:
  46. - if [[ "$CC" == "gcc" && "$CODE_COVERAGE" == "ON" ]]; then
  47. pip install --user cpp-coveralls &&
  48. coveralls
  49. --build-root .
  50. --exclude lib
  51. --exclude test
  52. --gcov-options '\-lp'
  53. --verbose &&
  54. bash <(curl -s https://codecov.io/bash);
  55. fi
  56. # after_failure:
  57. # - cat ./test-suite.log