.travis.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Use new container infrastructure to enable caching
  2. sudo: false
  3. # Choose a lightweight base image; we provide our own build tools.
  4. language: c
  5. # GHC depends on GMP. You can add other dependencies here as well.
  6. addons:
  7. apt:
  8. packages:
  9. - libgmp-dev
  10. # The different configurations we want to test. You could also do things like
  11. # change flags or use --stack-yaml to point to a different file.
  12. matrix:
  13. include:
  14. - env: ARGS=""
  15. compiler: ": # Default"
  16. - env: ARGS="--resolver lts-2"
  17. compiler: ": # lts-2"
  18. - env: ARGS="--resolver lts-3"
  19. compiler: ": # lts-3"
  20. - env: ARGS="--resolver lts-4"
  21. compiler: ": # lts-4"
  22. - env: ARGS="--resolver lts"
  23. compiler: ": # lts"
  24. - env: ARGS="--resolver nightly"
  25. compiler: ": # nightly"
  26. - env: ARGS=""
  27. compiler: ": # Default osx"
  28. os: osx
  29. before_install:
  30. # Undo the side-effect of using compiler above
  31. - unset CC
  32. # Download and unpack the stack executable
  33. - mkdir -p ~/.local/bin
  34. - export PATH=$HOME/.local/bin:$PATH
  35. - if [ `uname` = "Darwin" ];
  36. then
  37. curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin;
  38. else
  39. curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack';
  40. fi
  41. # This line does all of the work: installs GHC if necessary, build the library,
  42. # executables, and test suites, and runs the test suites. --no-terminal works
  43. # around some quirks in Travis's terminal implementation.
  44. script: stack $ARGS --no-terminal --install-ghc test --haddock
  45. # Caching so the next build will be fast too.
  46. cache:
  47. directories:
  48. - $HOME/.stack