on master help sign in
add haddock and hlint steps but only on Linux
c5dea7aAgentM
.travis.yml+9−2
@@ -32,24 +32,31 @@ matrix:
32 os: osx
32 os: osx
33 compiler: ": #stack 8.0.2"
33 compiler: ": #stack 8.0.2"
34
34
35+#workaround for broken ruby in travis on mac https://github.com/travis-ci/travis-ci/issues/6307
36+before_install:
37+ - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rvm get stable; fi
38+
35install:
39install:
36 - unset CC
40 - unset CC
37 - export PATH=$HOME/.local/bin:/opt/ghc/$GHC_VERSION/bin:$PATH
41 - export PATH=$HOME/.local/bin:/opt/ghc/$GHC_VERSION/bin:$PATH
42+ - export IS_DARWIN=$([ $(uname) = "Darwin" ]; echo $?)
38 - ./.travis/install-ghr.sh
43 - ./.travis/install-ghr.sh
39 - ./.travis/install-stack.sh
44 - ./.travis/install-stack.sh
40 - GHC_VERSION=$GHC_VERSION ./.travis/install-ghc.sh
45 - GHC_VERSION=$GHC_VERSION ./.travis/install-ghc.sh
41
46
47+
42# Here starts the actual work to be performed for the package under test;
48# Here starts the actual work to be performed for the package under test;
43# any command which exits with a non-zero exit code causes the build to fail.
49# any command which exits with a non-zero exit code causes the build to fail.
44script:
50script:
45 - |
51 - |
46 # Run tests
52 # Run tests
47− if [ "$(uname)" = "Darwin" ]; then
53+ if $IS_DARWIN then
48 stack --no-install-ghc --no-terminal test
54 stack --no-install-ghc --no-terminal test
49 else
55 else
50 stack --no-install-ghc --system-ghc --no-terminal test
56 stack --no-install-ghc --system-ghc --no-terminal test
51 fi
57 fi
52−
58+ - $IS_DARWIN || curl -sL https://raw.github.com/ndmitchell/hlint/master/misc/travis.sh | sh -s lint src test examples --cpp-define VERSION_project_m36=HLINT
59+ - $IS_DARWIN || stack --no-install-ghc haddock
53
60
54after_success:
61after_success:
55 - |
62 - |