.travis.yml 6.28 KB
Newer Older
Marc Coiffier's avatar
Marc Coiffier committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# This is the complex Travis configuration, which is intended for use
# on open source libraries which need compatibility across multiple GHC
# versions, must work with cabal-install, and should be
# cross-platform. For more information and other options, see:
#
# https://docs.haskellstack.org/en/stable/travis_ci/
#
# Copy these contents into the root directory of your Github project in a file
# named .travis.yml

# Use new container infrastructure to enable caching
sudo: false

# Do not choose a language; we provide our own build tools.
language: generic

# Caching so the next build will be fast too.
cache:
  directories:
  - $HOME/.ghc
  - $HOME/.cabal
  - $HOME/.stack
  - $TRAVIS_BUILD_DIR/.stack-work

# The different configurations we want to test. We have BUILD=cabal which uses
# cabal-install, and BUILD=stack which uses Stack. More documentation on each
# of those below.
#
# We set the compiler values here to tell Travis to use a different
# cache file per set of arguments.
#
# If you need to have different apt packages for each combination in the
# matrix, you can use a line such as:
#     addons: {apt: {packages: [libfcgi-dev,libgmp-dev]}}
matrix:
  include:
Marc Coiffier's avatar
Marc Coiffier committed
37
38
  # The Stack builds. We can pass in arbitrary Stack arguments via the ARGS
  # variable, such as using --stack-yaml to point to a different file.
39
  - env: BUILD=stack ARGS="" HOST_ARCH=`uname -m`
40
    compiler: "The Haskell Stack"
Marc Coiffier's avatar
Marc Coiffier committed
41
42
43
    addons: {apt: {packages: [libgmp-dev]}}

  # Build on macOS in addition to Linux
44
  - env: BUILD=stack ARGS="" HOST_ARCH=`uname -m`
45
    compiler: "The Haskell Stack"
Marc Coiffier's avatar
Marc Coiffier committed
46
47
48
    os: osx

before_install:
49
- . scripts/ci/inline/before_install
Marc Coiffier's avatar
Marc Coiffier committed
50
51

install:
52
- . scripts/ci/inline/install
Marc Coiffier's avatar
Marc Coiffier committed
53
54

script:
55
- . scripts/ci/inline/script
Marc Coiffier's avatar
Marc Coiffier committed
56

57
58
59
branches:
  only:
  - master
60
  - /^v\d+(\.\d+)*(-\S*)?$/
61

62
63
64
deploy:
  provider: releases
  api_key: $GITHUB_API_KEY
65
  file:
66
67
  - curly~$TRAVIS_OS_NAME~$HOST_ARCH.tar.xz
  - curly-gateway~$TRAVIS_OS_NAME~$HOST_ARCH.tar.xz
68
  skip_cleanup: true
69
  on:
70
    tags: true
71
72

# Travis includes an macOS which is incompatible with GHC 7.8.4
Marc Coiffier's avatar
Marc Coiffier committed
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
  #- env: BUILD=stack ARGS="--resolver lts-2"
  #  compiler: ": #stack 7.8.4 osx"
  #  os: osx

  #- env: BUILD=stack ARGS="--resolver lts-3"
  #  compiler: ": #stack 7.10.2 osx"
  #  os: osx

  #- env: BUILD=stack ARGS="--resolver lts-6"
  #  compiler: ": #stack 7.10.3 osx"
  #  os: osx

  #- env: BUILD=stack ARGS="--resolver lts-7"
  #  compiler: ": #stack 8.0.1 osx"
  #  os: osx

  # - env: BUILD=stack ARGS="--resolver lts-9"
  #   compiler: ": #stack 8.0.2 osx"
  #   os: osx

  # - env: BUILD=stack ARGS="--resolver lts-11"
  #   compiler: ": #stack 8.2.2 osx"
  #   os: osx

  # - env: BUILD=stack ARGS="--resolver lts-12"
  #   compiler: ": #stack 8.4.3 osx"
  #   os: osx

  # - env: BUILD=stack ARGS="--resolver nightly"
  #   compiler: ": #stack nightly osx"
  #   os: osx

  # allow_failures:
  # - env: BUILD=cabal GHCVER=head  CABALVER=head HAPPYVER=1.19.5 ALEXVER=3.1.7
  # - env: BUILD=stack ARGS="--resolver nightly"

Marc Coiffier's avatar
Marc Coiffier committed
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
  # We grab the appropriate GHC and cabal-install versions from hvr's PPA. See:
  # https://github.com/hvr/multi-ghc-travis
  #- env: BUILD=cabal GHCVER=7.0.4 CABALVER=1.16 HAPPYVER=1.19.5 ALEXVER=3.1.7
  #  compiler: ": #GHC 7.0.4"
  #  addons: {apt: {packages: [cabal-install-1.16,ghc-7.0.4,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
  #- env: BUILD=cabal GHCVER=7.2.2 CABALVER=1.16 HAPPYVER=1.19.5 ALEXVER=3.1.7
  #  compiler: ": #GHC 7.2.2"
  #  addons: {apt: {packages: [cabal-install-1.16,ghc-7.2.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
  #- env: BUILD=cabal GHCVER=7.4.2 CABALVER=1.16 HAPPYVER=1.19.5 ALEXVER=3.1.7
  #  compiler: ": #GHC 7.4.2"
  #  addons: {apt: {packages: [cabal-install-1.16,ghc-7.4.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
  #- env: BUILD=cabal GHCVER=7.6.3 CABALVER=1.16 HAPPYVER=1.19.5 ALEXVER=3.1.7
  #  compiler: ": #GHC 7.6.3"
  #  addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
  #- env: BUILD=cabal GHCVER=7.8.4 CABALVER=1.18 HAPPYVER=1.19.5 ALEXVER=3.1.7
  #  compiler: ": #GHC 7.8.4"
  #  addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
  #- env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22 HAPPYVER=1.19.5 ALEXVER=3.1.7
  #  compiler: ": #GHC 7.10.3"
  #  addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
Marc Coiffier's avatar
Marc Coiffier committed
129
130
131
132
133
134
135
136
137
  # - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 HAPPYVER=1.19.5 ALEXVER=3.1.7
  #   compiler: ": #GHC 8.0.2"
  #   addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
  # - env: BUILD=cabal GHCVER=8.2.2 CABALVER=2.0 HAPPYVER=1.19.5 ALEXVER=3.1.7
  #   compiler: ": #GHC 8.2.2"
  #   addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
  # - env: BUILD=cabal GHCVER=8.4.3 CABALVER=2.2 HAPPYVER=1.19.5 ALEXVER=3.1.7
  #   compiler: ": #GHC 8.4.3"
  #   addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
Marc Coiffier's avatar
Marc Coiffier committed
138
139
140

  # Build with the newest GHC and cabal-install. This is an accepted failure,
  # see below.
Marc Coiffier's avatar
Marc Coiffier committed
141
142
143
  # - env: BUILD=cabal GHCVER=head  CABALVER=head HAPPYVER=1.19.5 ALEXVER=3.1.7
  #   compiler: ": #GHC HEAD"
  #   addons: {apt: {packages: [cabal-install-head,ghc-head,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
Marc Coiffier's avatar
Marc Coiffier committed
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160

  #- env: BUILD=stack ARGS="--resolver lts-2"
  #  compiler: ": #stack 7.8.4"
  #  addons: {apt: {packages: [libgmp-dev]}}

  #- env: BUILD=stack ARGS="--resolver lts-3"
  #  compiler: ": #stack 7.10.2"
  #  addons: {apt: {packages: [libgmp-dev]}}

  #- env: BUILD=stack ARGS="--resolver lts-6"
  #  compiler: ": #stack 7.10.3"
  #  addons: {apt: {packages: [libgmp-dev]}}

  #- env: BUILD=stack ARGS="--resolver lts-7"
  #  compiler: ": #stack 8.0.1"
  #  addons: {apt: {packages: [libgmp-dev]}}

Marc Coiffier's avatar
Marc Coiffier committed
161
162
163
  # - env: BUILD=stack ARGS="--resolver lts-9"
  #   compiler: ": #stack 8.0.2"
  #   addons: {apt: {packages: [libgmp-dev]}}
Marc Coiffier's avatar
Marc Coiffier committed
164

Marc Coiffier's avatar
Marc Coiffier committed
165
166
167
  # - env: BUILD=stack ARGS="--resolver lts-11"
  #   compiler: ": #stack 8.2.2"
  #   addons: {apt: {packages: [libgmp-dev]}}
Marc Coiffier's avatar
Marc Coiffier committed
168

Marc Coiffier's avatar
Marc Coiffier committed
169
170
171
  # - env: BUILD=stack ARGS="--resolver lts-12"
  #   compiler: ": #stack 8.4.3"
  #   addons: {apt: {packages: [libgmp-dev]}}
Marc Coiffier's avatar
Marc Coiffier committed
172
173

  # Nightly builds are allowed to fail
Marc Coiffier's avatar
Marc Coiffier committed
174
175
176
  # - env: BUILD=stack ARGS="--resolver nightly"
  #   compiler: ": #stack nightly"
  #   addons: {apt: {packages: [libgmp-dev]}}