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