Merge pull request #4168 from bgamari/master
[cabal.git] / .travis.yml
bloba3aef02982dc8ff959c9d13f9b73d4c1c7a93a44
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     - "1.24"
13     - "1.22"
14     - "1.20"
15     - "1.18"
17 # The following enables several GHC versions to be tested; often it's enough to
18 # test only against the last release in a major GHC version. Feel free to omit
19 # lines listings versions you don't need/want testing for.
20 matrix:
21   include:
22    - env: GHCVER=8.0.1 SCRIPT=meta BUILDER=none
23      os: linux
24      sudo: required
25    # These don't have -dyn/-prof whitelisted yet, so we have to
26    # do the old-style installation
27    - env: GHCVER=7.4.2 SCRIPT=script CABAL_LIB_ONLY=YES TEST_OTHER_VERSIONS=YES
28      os: linux
29      sudo: required
30    - env: GHCVER=7.6.3 SCRIPT=script
31      os: linux
32      sudo: required
33    - env: GHCVER=7.8.4 SCRIPT=script
34      os: linux
35      sudo: required
36    # Ugh, we'd like to drop 'sudo: required' and use the
37    # apt plugin for the next two
38    # but the GCE instance we get has more memory, which makes
39    # a big difference
40    - env: GHCVER=7.10.3 SCRIPT=script
41      os: linux
42      sudo: required
43    - env: GHCVER=8.0.1 SCRIPT=script DEPLOY_DOCS=YES
44      sudo: required
45      os: linux
46    - env: GHCVER=8.0.1 SCRIPT=solver-debug-flags
47      sudo: required
48      os: linux
49    - env: GHCVER=8.0.1 SCRIPT=script PARSEC=YES
50      os: linux
51      sudo: required
52    - env: GHCVER=8.0.1 SCRIPT=bootstrap
53      sudo: required
54      os: linux
56    # We axed GHC 7.6 and earlier because it's not worth the trouble to
57    # make older GHC work with clang's cpp.  See
58    # https://ghc.haskell.org/trac/ghc/ticket/8493
59    - env: GHCVER=7.8.4 SCRIPT=script CABAL_LIB_ONLY=YES
60      os: osx
61      osx_image: xcode6.4 # We need 10.10
62    - env: GHCVER=7.8.4 SCRIPT=script CABAL_INSTALL_ONLY=YES
63      os: osx
64      osx_image: xcode6.4
66    # TODO: We might want to specify OSX version
67    # https://docs.travis-ci.com/user/osx-ci-environment/#OS-X-Version
68    - env: GHCVER=7.10.3 SCRIPT=script CABAL_LIB_ONLY=YES
69      os: osx
70    - env: GHCVER=7.10.3 SCRIPT=script CABAL_INSTALL_ONLY=YES
71      os: osx
72    - env: GHCVER=8.0.1 SCRIPT=script CABAL_LIB_ONLY=YES
73      os: osx
74    - env: GHCVER=8.0.1 SCRIPT=script CABAL_INSTALL_ONLY=YES
75      os: osx
76    - env: GHCVER=8.0.1 SCRIPT=bootstrap
77      os: osx
79    - env: GHCVER=via-stack SCRIPT=stack STACKAGE_RESOLVER=lts
80      os: linux
81      addons:
82         apt:
83             packages:
84                 - libgmp-dev
86   allow_failures:
87    - env: GHCVER=via-stack SCRIPT=stack STACKAGE_RESOLVER=lts
89  # TODO add PARSEC_BUNDLED=YES when it's so
90  # It seems pointless to run head if we're going to ignore the results.
91  #- GHCVER=head
93 # Note: the distinction between `before_install` and `install` is not important.
94 before_install:
95  - export PATH=/opt/ghc/$GHCVER/bin:$PATH
96  - export PATH=$HOME/.ghc-install/$GHCVER/bin:$PATH
97  - export PATH=$HOME/bin:$PATH
98  - export PATH=$HOME/.cabal/bin:$PATH
99  - export PATH=$HOME/.local/bin:$PATH
100  - export PATH=/opt/cabal/1.24/bin:$PATH
101  - export PATH=/opt/happy/1.19.5/bin:$PATH
102  - export PATH=/opt/alex/3.1.7/bin:$PATH
103  - ./travis-install.sh
105  # Set up deployment to the haskell/cabal-website repo.
106  # NB: these commands MUST be in .travis.yml, otherwise the secret key can be
107  # leaked! See https://github.com/travis-ci/travis.rb/issues/423.
108  # umask to get the permissions to be 400.
109  - 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 377 && 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
111 install:
112  # We intentionally do not install anything before trying to build Cabal because
113  # it should build with each supported GHC version out-of-the-box.
115 # Here starts the actual work to be performed for the package under test; any
116 # command which exits with a non-zero exit code causes the build to fail. Using
117 # ./dist/setup/setup here instead of cabal-install to avoid breakage when the
118 # build config format changed.
119 script:
120  - ./travis-${SCRIPT}.sh
122 cache:
123  directories:
124  - $HOME/.cabal/packages
125  - $HOME/.cabal/store
126  - $HOME/.cabal/bin
128  - $HOME/.stack/bin
129  - $HOME/.stack/precompiled
130  - $HOME/.stack/programs
131  - $HOME/.stack/setup-exe-cache
132  - $HOME/.stack/snapshots
134 # We remove the index because it churns quite a bit and we don't want
135 # to pay the cost of repeatedly caching it even though we don't care
136 # about most changing packages.
137 before_cache:
138  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
139  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index*
140  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json
142 # Deploy Haddocks to the haskell/cabal-website repo.
143 after_success:
144  - ./travis-deploy.sh
146 notifications:
147   irc:
148     channels:
149       - "chat.freenode.net##haskell-cabal"
150   slack: haskell-cabal:sCq6GLfy9N8MJrInosg871n4