.travis.yml 3.63 KB
Newer Older
tibbe's avatar
tibbe committed
1
# NB: don't set `language: haskell` here
Oleg Grenrus's avatar
Oleg Grenrus committed
2
# We specify language: c, so it doesn't default to e.g. ruby
3
4
language: c

Edward Z. Yang's avatar
Edward Z. Yang committed
5
sudo: false
tibbe's avatar
tibbe committed
6

7
8
9
# The following enables several GHC versions to be tested; often it's enough to
# test only against the last release in a major GHC version. Feel free to omit
# lines listings versions you don't need/want testing for.
10
11
matrix:
  include:
Edward Z. Yang's avatar
Edward Z. Yang committed
12
   - env: GHCVER=none SCRIPT=meta
13
     os: linux
Edward Z. Yang's avatar
Edward Z. Yang committed
14
15
16
   # These don't have -dyn/-prof whitelisted yet, so we have to
   # do the old-style installation
   - env: GHCVER=7.6.3 SCRIPT=script
17
     os: linux
Edward Z. Yang's avatar
Edward Z. Yang committed
18
19
     sudo: required
   - env: GHCVER=7.8.4 SCRIPT=script
20
     os: linux
Edward Z. Yang's avatar
Edward Z. Yang committed
21
22
23
24
25
26
27
28
29
30
31
32
33
     sudo: required
   # Ugh, we'd like to drop 'sudo: required' and use the
   # apt plugin for the next two
   # but the GCE instance we get has more memory, which makes
   # a big difference
   - env: GHCVER=7.10.3 SCRIPT=script
     os: linux
     sudo: required
   - env: GHCVER=8.0.1 SCRIPT=script DEPLOY_DOCS=YES
     sudo: required
     os: linux
   - env: GHCVER=8.0.1 SCRIPT=bootstrap
     sudo: required
34
     os: linux
Oleg Grenrus's avatar
Oleg Grenrus committed
35
   # It's not worth the trouble to make older GHC work with clang's cpp
Edward Z. Yang's avatar
Edward Z. Yang committed
36
   # TEST_OLDER is not implemented on OSX
Oleg Grenrus's avatar
Oleg Grenrus committed
37
38
39
   #
   # Also we might want to specify OSX version
   # https://docs.travis-ci.com/user/osx-ci-environment/#OS-X-Version
Edward Z. Yang's avatar
Edward Z. Yang committed
40
   - env: GHCVER=7.8.4 SCRIPT=script
41
     os: osx
Edward Z. Yang's avatar
Edward Z. Yang committed
42
   - env: GHCVER=7.10.3 SCRIPT=script
43
     os: osx
Edward Z. Yang's avatar
Edward Z. Yang committed
44
   - env: GHCVER=8.0.1 SCRIPT=script
45
     os: osx
Edward Z. Yang's avatar
Edward Z. Yang committed
46
47
   - env: GHCVER=8.0.1 SCRIPT=bootstrap
     os: osx
48
49
  allow_failures:
   - env: GHCVER=head
Edward Z. Yang's avatar
Edward Z. Yang committed
50
     sudo: required
51

52
 # TODO add PARSEC_BUNDLED=YES when it's so
53
54
 # It seems pointless to run head if we're going to ignore the results.
 #- GHCVER=head
tibbe's avatar
tibbe committed
55
56
57

# Note: the distinction between `before_install` and `install` is not important.
before_install:
58
 - export PATH=/opt/ghc/$GHCVER/bin:$PATH
Edward Z. Yang's avatar
Edward Z. Yang committed
59
60
61
62
63
64
 - export PATH=$HOME/.ghc-install/$GHCVER/bin:$PATH
 - export PATH=$HOME/bin:$PATH
 - export PATH=$HOME/.cabal/bin:$PATH
 - export PATH=/opt/cabal/1.24/bin:$PATH
 - export PATH=/opt/happy/1.19.5/bin:$PATH
 - ./travis-install.sh
tibbe's avatar
tibbe committed
65

66
 # Set up deployment to the haskell/cabal-website repo.
67
68
 # NB: these commands MUST be in .travis.yml, otherwise the secret key can be
 # leaked! See https://github.com/travis-ci/travis.rb/issues/423.
Edward Z. Yang's avatar
Edward Z. Yang committed
69
 # umask to get the permissions to be 400.
70
 - 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
71

tibbe's avatar
tibbe committed
72
install:
73
74
 # We intentionally do not install anything before trying to build Cabal because
 # it should build with each supported GHC version out-of-the-box.
tibbe's avatar
tibbe committed
75

76
77
78
# Here starts the actual work to be performed for the package under test; any
# command which exits with a non-zero exit code causes the build to fail. Using
# ./dist/setup/setup here instead of cabal-install to avoid breakage when the
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
79
# build config format changed.
tibbe's avatar
tibbe committed
80
script:
Edward Z. Yang's avatar
Edward Z. Yang committed
81
82
83
84
85
86
87
88
89
90
91
92
93
94
 - ./travis-${SCRIPT}.sh

cache:
 directories:
 - $HOME/.cabal/packages
 - $HOME/.cabal/store
 - $HOME/.cabal/bin

# We remove the index because it churns quite a bit and we don't want
# to pay the cost of repeatedly caching it even though we don't care
# about most changing packages.
before_cache:
 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index*
Oleg Grenrus's avatar
Oleg Grenrus committed
95

96
97
# Deploy Haddocks to the haskell/cabal-website repo.
after_success:
98
 - ./travis-deploy.sh
99

100
101
102
103
104
notifications:
  irc:
    channels:
      - "chat.freenode.net##haskell-cabal"
  slack: haskell-cabal:sCq6GLfy9N8MJrInosg871n4