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.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # This Travis job script has been generated by a script via
  2. #
  3. # runghc make_travis_yml_2.hs 'vimeta.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. - rm -rfv $HOME/.cabal/packages/head.hackage
  24. matrix:
  25. include:
  26. - compiler: "ghc-7.10.3"
  27. # env: TEST=--disable-tests BENCH=--disable-benchmarks
  28. addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.10.3], sources: [hvr-ghc]}}
  29. - compiler: "ghc-8.0.2"
  30. # env: TEST=--disable-tests BENCH=--disable-benchmarks
  31. addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.2], sources: [hvr-ghc]}}
  32. - compiler: "ghc-8.2.2"
  33. # env: TEST=--disable-tests BENCH=--disable-benchmarks
  34. addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.2.2], sources: [hvr-ghc]}}
  35. before_install:
  36. - HC=${CC}
  37. - HCPKG=${HC/ghc/ghc-pkg}
  38. - unset CC
  39. - ROOTDIR=$(pwd)
  40. - mkdir -p $HOME/.local/bin
  41. - "PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$HOME/local/bin:$PATH"
  42. - HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
  43. - echo $HCNUMVER
  44. install:
  45. - cabal --version
  46. - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
  47. - BENCH=${BENCH---enable-benchmarks}
  48. - TEST=${TEST---enable-tests}
  49. - HADDOCK=${HADDOCK-true}
  50. - INSTALLED=${INSTALLED-true}
  51. - GHCHEAD=${GHCHEAD-false}
  52. - travis_retry cabal update -v
  53. - "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
  54. - rm -fv cabal.project cabal.project.local
  55. - grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
  56. - "printf 'packages: \".\"\\n' > cabal.project"
  57. - cat cabal.project
  58. - if [ -f "./configure.ac" ]; then
  59. (cd "." && autoreconf -i);
  60. fi
  61. - rm -f cabal.project.freeze
  62. - cabal new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 all
  63. - cabal new-build -w ${HC} --disable-tests --disable-benchmarks --project-file="cabal.project" --dep -j2 all
  64. - rm -rf .ghc.environment.* "."/dist
  65. - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
  66. # Here starts the actual work to be performed for the package under test;
  67. # any command which exits with a non-zero exit code causes the build to fail.
  68. script:
  69. # test that source-distributions can be generated
  70. - (cd "." && cabal sdist)
  71. - mv "."/dist/vimeta-*.tar.gz ${DISTDIR}/
  72. - cd ${DISTDIR} || false
  73. - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
  74. - "printf 'packages: vimeta-*/*.cabal\\n' > cabal.project"
  75. - cat cabal.project
  76. # this builds all libraries and executables (without tests/benchmarks)
  77. - cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
  78. # Build with installed constraints for packages in global-db
  79. - if $INSTALLED; then echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks $(${HCPKG} list --global --simple-output --names-only | sed 's/\([a-zA-Z0-9-]\{1,\}\) */--constraint="\1 installed" /g') all | sh; else echo "Not building with installed constraints"; fi
  80. # build & run tests, build benchmarks
  81. - cabal new-build -w ${HC} ${TEST} ${BENCH} all
  82. # cabal check
  83. - (cd vimeta-* && cabal check)
  84. # haddock
  85. - rm -rf ./dist-newstyle
  86. - if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
  87. # REGENDATA ["vimeta.cabal"]
  88. # EOF