Forgot to do `toolDepends` -> `buildToolDepends` in the code itself
[cabal.git] / .travis.yml
blobe75cdb8993939d046803ffb92f2952c953c520b4
1 # NB: don't set `language: haskell` here
2 # We specify language: c, so it doesn't default to e.g. ruby
3 language: c
5 sudo: false
7 # Remember to add release branches
8 # we whitelist branches, as we don't really need to build dev-branches.
9 branches:
10   only:
11     - master
12     - "2.0"
13     - "1.24"
14     - "1.22"
15     - "1.20"
16     - "1.18"
18 # The following enables several GHC versions to be tested; often it's enough to
19 # test only against the last release in a major GHC version. Feel free to omit
20 # lines listings versions you don't need/want testing for.
22 # NB: If you test the same GHC version/OS combo multiple times with
23 # SCRIPT=script (e.g., see PARSEC=YES below), you MUST supply a
24 # TAGSUFFIX to help travis/upload.sh disambiguate the matrix entry.
25 matrix:
26   include:
27    - env: GHCVER=8.0.2 SCRIPT=meta BUILDER=none
28      os: linux
29      sudo: required
30    # These don't have -dyn/-prof whitelisted yet, so we have to
31    # do the old-style installation
32    - env: GHCVER=7.4.2 SCRIPT=script CABAL_LIB_ONLY=YES TEST_OTHER_VERSIONS=YES
33      os: linux
34      sudo: required
35    - env: GHCVER=7.6.3 SCRIPT=script
36      os: linux
37      sudo: required
38    - env: GHCVER=7.8.4 SCRIPT=script
39      os: linux
40      sudo: required
41    # Ugh, we'd like to drop 'sudo: required' and use the
42    # apt plugin for the next two
43    # but the GCE instance we get has more memory, which makes
44    # a big difference
45    - env: GHCVER=7.10.3 SCRIPT=script
46      os: linux
47      sudo: required
48    - env: GHCVER=8.0.2 SCRIPT=script DEPLOY_DOCS=YES
49      sudo: required
50      os: linux
52    - env: GHCVER=8.0.2 SCRIPT=solver-debug-flags
53      sudo: required
54      os: linux
55    - env: GHCVER=8.0.2 SCRIPT=script PARSEC=YES TAGSUFFIX="-parsec"
56      os: linux
57      sudo: required
58    - env: GHCVER=8.0.2 SCRIPT=script DEBUG_EXPENSIVE_ASSERTIONS=YES TAGSUFFIX="-fdebug-expensive-assertions"
59      os: linux
60      sudo: required
61    - env: GHCVER=8.0.2 SCRIPT=bootstrap
62      sudo: required
63      os: linux
65    # We axed GHC 7.6 and earlier because it's not worth the trouble to
66    # make older GHC work with clang's cpp.  See
67    # https://ghc.haskell.org/trac/ghc/ticket/8493
68    - env: GHCVER=7.8.4 SCRIPT=script
69      os: osx
70      # Keep this synced with travis/upload.sh
71      osx_image: xcode6.4 # We need 10.10
73    # TODO: We might want to specify OSX version
74    # https://docs.travis-ci.com/user/osx-ci-environment/#OS-X-Version
75    - env: GHCVER=7.10.3 SCRIPT=script
76      os: osx
77    - env: GHCVER=8.0.2 SCRIPT=script
78      os: osx
79    - env: GHCVER=8.0.2 SCRIPT=bootstrap
80      os: osx
82    - env: GHCVER=via-stack SCRIPT=stack STACKAGE_RESOLVER=lts
83      os: linux
84      addons:
85         apt:
86             packages:
87                 - libgmp-dev
89   allow_failures:
90    - env: GHCVER=via-stack SCRIPT=stack STACKAGE_RESOLVER=lts
92  # TODO add PARSEC_BUNDLED=YES when it's so
93  # It seems pointless to run head if we're going to ignore the results.
94  #- GHCVER=head
96 # Note: the distinction between `before_install` and `install` is not important.
97 before_install:
98  - export PATH=/opt/ghc/$GHCVER/bin:$PATH
99  - export PATH=$HOME/.ghc-install/$GHCVER/bin:$PATH
100  - export PATH=$HOME/bin:$PATH
101  - export PATH=$HOME/.cabal/bin:$PATH
102  - export PATH=$HOME/.local/bin:$PATH
103  - export PATH=/opt/cabal/1.24/bin:$PATH
104  - export PATH=/opt/happy/1.19.5/bin:$PATH
105  - export PATH=/opt/alex/3.1.7/bin:$PATH
106  - ./travis-install.sh
108 install:
109  # We intentionally do not install anything before trying to build Cabal because
110  # it should build with each supported GHC version out-of-the-box.
112 # Here starts the actual work to be performed for the package under test; any
113 # command which exits with a non-zero exit code causes the build to fail. Using
114 # ./dist/setup/setup here instead of cabal-install to avoid breakage when the
115 # build config format changed.
116 script:
117  - rm -rf dist-newstyle
118  - ./travis-${SCRIPT}.sh -j1
120 cache:
121  directories:
122  - $HOME/.cabal/packages
123  - $HOME/.cabal/store
124  - $HOME/.cabal/bin
126  - $HOME/.stack/bin
127  - $HOME/.stack/precompiled
128  - $HOME/.stack/programs
129  - $HOME/.stack/setup-exe-cache
130  - $HOME/.stack/snapshots
132 # We remove the index because it churns quite a bit and we don't want
133 # to pay the cost of repeatedly caching it even though we don't care
134 # about most changing packages.
135 before_cache:
136  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
137  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index*
138  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index*
139  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json
141 # Deploy Haddocks to the haskell/cabal-website repo.
142 after_success:
143  # Set up deployment to the haskell/cabal-website repo.
144  # NB: these commands MUST be in .travis.yml, otherwise the secret key can be
145  # leaked! See https://github.com/travis-ci/travis.rb/issues/423.
146  # umask to get the permissions to be 600.
147  - if [ "x$TRAVIS_REPO_SLUG" = "xhaskell/cabal" -a "x$TRAVIS_PULL_REQUEST" = "xfalse" -a "x$TRAVIS_BRANCH" = "xmaster" -a "x$DEPLOY_DOCS" = "xYES"  ]; then (umask 177 && openssl aes-256-cbc -K $encrypted_edaf6551664d_key -iv $encrypted_edaf6551664d_iv -in id_rsa_cabal_website.aes256.enc -out ~/.ssh/id_rsa -d); fi
148  - ./travis-deploy.sh
150 notifications:
151   irc:
152     channels:
153       - "chat.freenode.net##haskell-cabal"
154   slack: haskell-cabal:sCq6GLfy9N8MJrInosg871n4