aboutsummaryrefslogtreecommitdiff
path: root/.travis.yml
blob: f44608199be356181ed941e4a98bd520dfc3ed1f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
language: haskell

env:
 - GHCVER=7.6.3
 - GHCVER=7.8.1
 - GHCVER=7.8.2
 - GHCVER=7.8.3
 - GHCVER=head

before_install:
 - sudo add-apt-repository -y ppa:hvr/ghc
 - sudo apt-get update
 - sudo apt-get install cabal-install-1.20 ghc-$GHCVER
 - export PATH=/opt/ghc/$GHCVER/bin:$PATH

install:
  - case "$GHCVER" in
     "head") (cd haddock-library/ && cabal install --enable-tests
              && cd .. && cabal install --only-dependencies --enable-tests) ;;
     *)
       (cd haddock-library/ && cabal install --only-dependencies --enable-tests) ;;

    esac

script:
  # Yes, in case of HEAD we do end up building haddock-library twice
  # but we want to see the test results.
  - (cd haddock-library/ && cabal configure --enable-tests --ghc-options=-Werror
     && cabal build && cabal test && cabal install && cabal install doctest
     && doctest -isrc -ivendor/attoparsec-0.10.4.0 -optP-include -optPdist/build/autogen/cabal_macros.h src/Documentation/Haddock/Parser.hs)
  - case "$GHCVER" in
     "head") (cabal configure --enable-tests --ghc-options=-Werror && cabal build && cabal test) ;;
     *) ;;
    esac