aboutsummaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2018-10-27 20:35:20 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2018-10-27 20:35:20 +0200
commitebb35e613cf21aaf13996bc0e35791a0e90aa64b (patch)
treea6bceb0dd9fbc27847b1887d2cbce603689c730a /.travis.yml
parentdc4b5cb0e55a992e02e5a9d6567e88674c6a18d9 (diff)
downloadpandoc-ebb35e613cf21aaf13996bc0e35791a0e90aa64b.tar.gz
.travis.yml: simplify GHC and cabal package handling
This reduces duplicate information on GHC and cabal versions when defining build environments.
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml17
1 files changed, 11 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index 0aa4c2031..f9ce380fe 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,6 +18,13 @@ env:
global:
- GHC_OPTIONS="-O0 -Werror"
+addons:
+ apt:
+ packages:
+ - happy-1.19.5
+ sources:
+ - hvr-ghc
+
# 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.
@@ -44,7 +51,6 @@ matrix:
CABALARGS=""
TESTPATTERN="! /Round trip/"
compiler: ": #GHC 7.10.3"
- addons: {apt: {packages: [cabal-install-2.0,ghc-7.10.3,happy-1.19.5], sources: [hvr-ghc]}}
# don't build benchmarks for ghc 8.0.2, because build takes too long...
- env: >-
@@ -55,7 +61,6 @@ matrix:
CABALARGS=""
TESTPATTERN="! /Round trip/"
compiler: ": #GHC 8.0.2"
- addons: {apt: {packages: [cabal-install-2.0,ghc-8.0.2,happy-1.19.5], sources: [hvr-ghc]}}
- env: >-
BUILD=cabal
@@ -65,7 +70,6 @@ matrix:
CABALARGS="--enable-benchmarks"
TESTPATTERN="! /Round trip/"
compiler: ": #GHC 8.2.2"
- addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2,happy-1.19.5], sources: [hvr-ghc]}}
- env: >-
BUILD=cabal
@@ -75,7 +79,6 @@ matrix:
CABALARGS="--enable-benchmarks"
TESTPATTERN="! /Round trip/"
compiler: ": #GHC 8.4.3"
- addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.3,happy-1.19.5], sources: [hvr-ghc]}}
# - env: >-
# BUILD=cabal
@@ -101,17 +104,17 @@ matrix:
- env: >-
BUILD=stack
ARGS="--resolver lts-12"
+ GHCVER=8.4.3
TESTPATTERN="! /Round trip/"
compiler: ": #stack 8.4.3"
- addons: {apt: {packages: [ghc-8.4.3], sources: [hvr-ghc]}}
# Nightly builds are allowed to fail
- env: >-
BUILD=stack
ARGS="--resolver nightly"
+ GHCVER=8.4.3
TESTPATTERN="."
compiler: ": #stack nightly"
- addons: {apt: {packages: [ghc-8.4.3], sources: [hvr-ghc]}}
# - env: BUILD=stack ARGS="--resolver lts-8"
# compiler: ": #stack 8.0.2 osx"
@@ -126,6 +129,7 @@ matrix:
- env: >-
BUILD=stack
ARGS="--resolver nightly"
+ GHCVER=8.4.3
TESTPATTERN="."
fast_finish: true
@@ -133,6 +137,7 @@ matrix:
before_install:
# Using compiler above sets CC to an invalid value, so unset it
- unset CC
+- sudo apt-get install ${GHCVER:+ghc-$GHCVER} ${CABALVER:+cabal-install-$CABALVER}
- export PATH=/opt/happy/1.19.5/bin/:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:/opt/cabal/bin:$HOME/.local/bin:$HOME/.cabal/bin:$PATH
# Download and unpack the stack executable
- |