You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

35 lines
1.5 KiB

  1. language: cpp
  2. cache: ccache
  3. sudo: required
  4. dist: trusty
  5. env:
  6. - TEST_SUITE=user CMAKE_FLAGS=
  7. - TEST_SUITE=user CMAKE_FLAGS="-DWITH_DOC=OFF -DWITH_CURL=OFF"
  8. - TEST_SUITE=root CMAKE_FLAGS=-DWITH_DOC=OFF
  9. before_install:
  10. - sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ wily main universe' -y
  11. - sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ xenial main' -y
  12. - |
  13. sudo sh -c '/bin/echo -e "Package: *\nPin: release n=wily\nPin-Priority: 1" > /etc/apt/preferences.d/wily'
  14. sudo sh -c '/bin/echo -e "Package: *\nPin: release n=xenial\nPin-Priority: 1" > /etc/apt/preferences.d/xenial'
  15. - sudo apt-get update -qq
  16. install:
  17. - sudo apt-get -qq -y -t wily install gettext liblz4-dev python3-apt
  18. - sudo apt-get -qq -y -t xenial install cmake ninja-build libgnutls28-dev libcurl4-gnutls-dev
  19. - sudo ./prepare-release travis-ci
  20. before_script:
  21. - ( mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Coverage -G Ninja $CMAKE_FLAGS .. )
  22. - ninja -C build
  23. script:
  24. - CTEST_OUTPUT_ON_FAILURE=1 ninja -C build test
  25. - DESTDIR=$PWD/rootdir chronic ninja -C build install
  26. - test "$TEST_SUITE" != "user" || ./test/integration/run-tests -qq
  27. - sudo adduser --force-badname --system --home /nonexistent --no-create-home --quiet _apt || true
  28. - sudo chmod go+x /home/travis
  29. - sudo chmod -R go+rwX /home/travis/build
  30. - test "$TEST_SUITE" != "root" || sudo ./test/integration/run-tests -qq
  31. after_script:
  32. - cd build
  33. - gcov -r $(find -name '*.gcno')
  34. - bash <(curl -s https://codecov.io/bash)