.travis.yml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. sudo: required
  2. dist: xenial
  3. before_install:
  4. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if ! [[ "$BUILD_TYPE" == "Python" ]]; then if ! [[ "$BUILD_TYPE" == "Docs" ]]; then scripts/install_linux_deps.sh ; fi ; fi ; fi
  5. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then scripts/install_osx_deps.sh ; fi
  6. install:
  7. - if [[ "$BUILD_TYPE" == "Coverage" ]]; then wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz ; fi
  8. - if [[ "$BUILD_TYPE" == "Coverage" ]]; then tar xf lcov_1.11.orig.tar.gz ; fi
  9. - if [[ "$BUILD_TYPE" == "Coverage" ]]; then sudo make -C lcov-1.11/ install ; fi
  10. - if [[ "$BUILD_TYPE" == "Coverage" ]]; then gem install coveralls-lcov ; fi
  11. - if [[ "$BUILD_TYPE" == "Python" ]]; then pip3 install sympy ; fi
  12. - if [[ "$BUILD_TYPE" == "Docs" ]]; then scripts/install_docs_deps.sh ; fi
  13. language: cpp
  14. cache: ccache
  15. matrix:
  16. include:
  17. - language: cpp
  18. compiler: gcc
  19. os: linux
  20. env: BUILD_TYPE=Coverage ROW_MAJOR_DEFAULT=OFF
  21. - language: cpp
  22. compiler: gcc
  23. os: linux
  24. env: BUILD_TYPE=Release ROW_MAJOR_DEFAULT=OFF
  25. - language: cpp
  26. compiler: clang
  27. os: linux
  28. env: BUILD_TYPE=Debug ROW_MAJOR_DEFAULT=OFF
  29. - language: cpp
  30. compiler: gcc
  31. os: linux
  32. env: BUILD_TYPE=Debug ROW_MAJOR_DEFAULT=ON
  33. - language: cpp
  34. compiler: clang
  35. os: linux
  36. env: BUILD_TYPE=Release ROW_MAJOR_DEFAULT=OFF
  37. - language: cpp
  38. compiler: clang
  39. os: osx
  40. env: BUILD_TYPE=Debug
  41. - language: python
  42. env: BUILD_TYPE=Python
  43. os: linux
  44. python: "3.7"
  45. - language: python
  46. env: BUILD_TYPE=Docs
  47. os: linux
  48. python: "3.7"
  49. script:
  50. - if ! [[ "$BUILD_TYPE" == "Python" ]]; then if ! [[ "$BUILD_TYPE" == "Docs" ]]; then scripts/run_cpp_tests.sh ; fi ; fi
  51. - if [[ "$BUILD_TYPE" == "Python" ]]; then cd py; ./run_tests.sh ; fi
  52. - if [[ "$BUILD_TYPE" == "Docs" ]]; then ./make_docs.sh ; fi
  53. - if [[ "$BUILD_TYPE" == "Docs" ]]; then cd html-dir ; fi
  54. - if [[ "$BUILD_TYPE" == "Docs" ]]; then touch .nojekyll ; fi
  55. - if [[ "$BUILD_TYPE" == "Docs" ]]; then cd ../.. ; fi
  56. after_success:
  57. - if [[ "$BUILD_TYPE" == "Coverage" ]]; then lcov --directory . --capture --output-file coverage.info ; fi
  58. - if [[ "$BUILD_TYPE" == "Coverage" ]]; then lcov --remove coverage.info 'test/*' '/usr/*' --output-file coverage.info ; fi
  59. - if [[ "$BUILD_TYPE" == "Coverage" ]]; then lcov --list coverage.info ; fi
  60. - if [[ "$BUILD_TYPE" == "Coverage" ]]; then coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info ; fi
  61. deploy:
  62. provider: pages
  63. skip_cleanup: true
  64. github_token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
  65. keep_history: false
  66. local_dir: html-dir/
  67. verbose: true
  68. on:
  69. branch: master
  70. condition: $BUILD_TYPE = Docs
  71. branches:
  72. only:
  73. - master