.travis.yml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. # Since the Travis CI environment http://docs.travis-ci.com/user/ci-environment/
  2. # provides GNU GCC 4.6, which does not support -std=c++11 GNU GCC 4.8 is installed
  3. # NOTE: Please validate this file after editing it using
  4. # Travis WebLint https://lint.travis-ci.org/
  5. # or travis-lint https://github.com/travis-ci/travis-lint
  6. language: cpp
  7. compiler:
  8. - gcc
  9. - clang
  10. os:
  11. - linux
  12. - osx
  13. sudo: false
  14. cache:
  15. apt: true
  16. env:
  17. global:
  18. # Boost version to use:
  19. # _MIN is used when building the master branch
  20. # _MAX is used when building any other branch
  21. - BOOST_VERSION_MIN="1.49.0"
  22. - BOOST_VERSION_MAX="1.60.0"
  23. # List of required boost libraries to build
  24. - BOOST_LIBS="date_time,filesystem,iostreams,python,regex,system,test"
  25. # List of required Homebrew formulae to install
  26. - BREWS="gmp,mpfr"
  27. # Encrypted COVERITY_SCAN_TOKEN
  28. - secure: "mYNxD1B8WNSvUeKzInehZ7syi2g1jH2ymeSQxoeKKD2duq3pvNWPdZdc4o9MlWQcAqcz58rhFZRIpuEWCnP0LbbJaG+MyuemMn9uAmg9Y4gFpMsBPHuTdf8pO3rDex+tkrr9puEJFgL+QV/TehxO6NDDpx7UdYvJb+4aZD/auYI="
  29. matrix:
  30. exclude:
  31. - os: linux
  32. compiler: clang
  33. # Compiling ledger on Linux with clang
  34. # either crashes clang or results in a ledger binary that crashes with SIGSEGV.
  35. - os: osx
  36. compiler: gcc
  37. # On Mac OS X building ledger with GNU GCC 4.8 fails due to
  38. # undefined symbols, maybe because boost was not being built with g++-4.8.
  39. # Undefined symbols for architecture x86_64:
  40. # "boost::re_detail::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)", referenced from:
  41. # boost::re_detail::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::perl_matcher(char const*, char const*, boost::match_results<char const*, std::allocator<boost::sub_match<char const*> > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags, char const*) in main.cc.o
  42. # boost::re_detail::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::perl_matcher(char const*, char const*, boost::match_results<char const*, std::allocator<boost::sub_match<char const*> > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags, char const*) in global.cc.o
  43. # "boost::re_detail::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::find()", referenced from:
  44. # bool boost::regex_search<char const*, char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >(char const*, char const*, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags) in main.cc.o
  45. # bool boost::regex_search<char const*, char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >(char const*, char const*, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags) in global.cc.o
  46. addons:
  47. coverity_scan:
  48. project:
  49. name: "ledger/ledger"
  50. description: "Build submitted via Travis CI"
  51. build_command_prepend: "cmake . -DUSE_PYTHON=ON -DBUILD_DEBUG=ON -DCLANG_GCOV=ON"
  52. build_command: "make"
  53. branch_pattern: coverity
  54. apt:
  55. sources:
  56. - ubuntu-toolchain-r-test
  57. #- boost-latest
  58. packages:
  59. - gcc-4.8
  60. - g++-4.8
  61. - libgmp-dev
  62. - libmpfr-dev
  63. - libedit-dev
  64. #- libboost1.55-dev
  65. #- libboost-test1.55-dev
  66. #- libboost-regex1.55-dev
  67. #- libboost-python1.55-dev
  68. #- libboost-system1.55-dev
  69. #- libboost-date-time1.55-dev
  70. #- libboost-iostreams1.55-dev
  71. #- libboost-filesystem1.55-dev
  72. #- libboost-serialization1.55-dev
  73. before_install:
  74. - if [ "${TRAVIS_BRANCH}" = "master" ]; then export BOOST_VERSION="${BOOST_VERSION_MIN}"; else export BOOST_VERSION="${BOOST_VERSION_MAX}"; fi
  75. - if [ -n "${BOOST_VERSION}" ]; then export BOOST_ROOT="${TRAVIS_BUILD_DIR}/../boost-trunk"; export CMAKE_MODULE_PATH="${BOOST_ROOT}"; fi
  76. - if [ "${CXX}" = "g++" ]; then export CXX="$(which g++-4.8)"; export CC="$(which gcc-4.8)"; fi
  77. - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then export DYLD_LIBRARY_PATH="${BOOST_ROOT}/lib"; fi
  78. # c++ is a symlink to clang++, but the compiler behaves differently when invoked as c++
  79. - if [ "${TRAVIS_OS_NAME}" = "osx" -a "${CXX}" = "clang++" ]; then export CXX="$(which c++)"; export CC="$(which cc)"; fi
  80. - tools/travis-before_install.sh
  81. install:
  82. - tools/travis-install.sh
  83. before_script:
  84. - cmake . -DUSE_PYTHON=ON -DBUILD_DEBUG=ON
  85. - make
  86. script:
  87. - ctest --output-on-failure
  88. - PYTHONPATH=. python python/demo.py
  89. after_script:
  90. # These scripts are run for informational purposes and
  91. # should be reintegrated into CTest once they reliably verify the documentation.
  92. - python test/CheckTexinfo.py -l ledger -s .
  93. - python test/CheckManpage.py -l ledger -s .
  94. notifications:
  95. email:
  96. on_success: change
  97. on_failure: change
  98. irc:
  99. channels: [ "chat.freenode.net#ledger" ]
  100. on_success: change
  101. on_failure: change