Command line frontend for video metadata tagging tools
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.

.travis.yml 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # This Travis job script has been generated by a script via
  2. #
  3. # make_travis_yml_2.hs 'themoviedb.cabal'
  4. #
  5. # For more information, see https://github.com/hvr/multi-ghc-travis
  6. #
  7. language: c
  8. sudo: false
  9. git:
  10. submodules: false # whether to recursively clone submodules
  11. cache:
  12. directories:
  13. - $HOME/.cabal/packages
  14. - $HOME/.cabal/store
  15. before_cache:
  16. - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
  17. # remove files that are regenerated by 'cabal update'
  18. - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.*
  19. - rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json
  20. - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache
  21. - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
  22. - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
  23. matrix:
  24. include:
  25. - compiler: "ghc-7.8.4"
  26. # env: TEST=--disable-tests BENCH=--disable-benchmarks
  27. addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.8.4], sources: [hvr-ghc]}}
  28. - compiler: "ghc-7.10.3"
  29. # env: TEST=--disable-tests BENCH=--disable-benchmarks
  30. addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.10.3], sources: [hvr-ghc]}}
  31. - compiler: "ghc-8.0.1"
  32. # env: TEST=--disable-tests BENCH=--disable-benchmarks
  33. addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.1], sources: [hvr-ghc]}}
  34. before_install:
  35. - HC=${CC}
  36. - unset CC
  37. - PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$PATH
  38. - PKGNAME='themoviedb'
  39. install:
  40. - cabal --version
  41. - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
  42. - BENCH=${BENCH---enable-benchmarks}
  43. - TEST=${TEST---enable-tests}
  44. - travis_retry cabal update -v
  45. - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
  46. - rm -fv cabal.project.local
  47. - "echo 'packages: .' > cabal.project"
  48. - rm -f cabal.project.freeze
  49. - cabal new-build -w ${HC} ${TEST} ${BENCH} --dep -j2 all
  50. - cabal new-build -w ${HC} --disable-tests --disable-benchmarks --dep -j2 all
  51. # Here starts the actual work to be performed for the package under test;
  52. # any command which exits with a non-zero exit code causes the build to fail.
  53. script:
  54. - if [ -f configure.ac ]; then autoreconf -i; fi
  55. - rm -rf dist/
  56. - cabal sdist # test that a source-distribution can be generated
  57. - cd dist/
  58. - SRCTAR=(${PKGNAME}-*.tar.gz)
  59. - SRC_BASENAME="${SRCTAR/%.tar.gz}"
  60. - tar -xvf "./$SRC_BASENAME.tar.gz"
  61. - cd "$SRC_BASENAME/"
  62. ## from here on, CWD is inside the extracted source-tarball
  63. - rm -fv cabal.project.local
  64. - "echo 'packages: .' > cabal.project"
  65. # this builds all libraries and executables (without tests/benchmarks)
  66. - rm -f cabal.project.freeze
  67. - cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
  68. # this builds all libraries and executables (including tests/benchmarks)
  69. # - rm -rf ./dist-newstyle
  70. - cabal new-build -w ${HC} ${TEST} ${BENCH} all
  71. # there's no 'cabal new-test' yet, so let's emulate for now
  72. - TESTS=( $(awk 'tolower($0) ~ /^test-suite / { print $2 }' *.cabal) )
  73. - if [ "$TEST" != "--enable-tests" ]; then TESTS=(); fi
  74. - shopt -s globstar;
  75. RC=true; for T in ${TESTS[@]}; do echo "== $T ==";
  76. if dist-newstyle/build/**/$SRC_BASENAME/**/build/$T/$T; then echo "= $T OK =";
  77. else echo "= $T FAILED ="; RC=false; fi; done; $RC
  78. # EOF