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