git.iko.soy/typeable/file-embed
on master help sign in
Change newlines/semicolons
commit65c6d00191cb0dffc60d02a30ce70fdbd8b6fb5d authorMichael Snoyman <michael@snoyman.com> dateTue 16 Feb 2016, 09:44 (11 years ago) parent9edbcc2
1 file changed+50−21
.travis.yml+50−21
.travis.yml+50−21
@@ -1,17 +1,30 @@
1−language: c
1+# Use new container infrastructure to enable caching
22sudo: false
33
4+# Choose a lightweight base image; we provide our own build tools.
5+language: c
6+
7+# Caching so the next build will be fast too.
48cache:
59 directories:
610 - $HOME/.ghc
711 - $HOME/.cabal
812 - $HOME/.stack
913
14+# The different configurations we want to test. We have BUILD=cabal which uses
15+# cabal-install, and BUILD=stack which uses Stack. More documentation on each
16+# of those below.
17+#
18+# We set the compiler values here to tell Travis to use a different
19+# cache file per set of arguments.
20+#
21+# If you need to have different apt packages for each combination in the
22+# matrix, you can use a line such as:
23+# addons: {apt: {packages: [libfcgi-dev,libgmp-dev]}}
1024matrix:
1125 include:
12− - env: BUILD=cabal GHCVER=7.4.2 CABALVER=1.16
13− compiler: ": #GHC 7.4.2"
14− addons: {apt: {packages: [cabal-install-1.16,ghc-7.4.2], sources: [hvr-ghc]}}
26+ # We grab the appropriate GHC and cabal-install versions from hvr's PPA. See:
27+ # https://github.com/hvr/multi-ghc-travis
1528 - env: BUILD=cabal GHCVER=7.6.3 CABALVER=1.16
1629 compiler: ": #GHC 7.6.3"
1730 addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.3], sources: [hvr-ghc]}}
@@ -22,10 +35,14 @@ matrix:
2235 compiler: ": #GHC 7.10.3"
2336 addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
2437
38+ # Build with the newest GHC and cabal-install. This is an accepted failure,
39+ # see below.
2540 - env: BUILD=cabal GHCVER=head CABALVER=head
2641 compiler: ": #GHC HEAD"
2742 addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
2843
44+ # The Stack builds. We can pass in arbitrary Stack arguments via the ARGS
45+ # variable, such as using --stack-yaml to point to a different file.
2946 - env: BUILD=stack ARGS="--resolver lts-2"
3047 compiler: ": #stack 7.8.4"
3148 addons: {apt: {packages: [ghc-7.8.4], sources: [hvr-ghc]}}
@@ -38,10 +55,12 @@ matrix:
3855 compiler: ": #stack 7.10.3"
3956 addons: {apt: {packages: [ghc-7.10.3], sources: [hvr-ghc]}}
4057
58+ # Nightly builds are allowed to fail
4159 - env: BUILD=stack ARGS="--resolver nightly"
4260 compiler: ": #stack nightly"
4361 addons: {apt: {packages: [libgmp-dev]}}
4462
63+ # Build on OS X in addition to Linux
4564 - env: BUILD=stack ARGS="--resolver lts-2"
4665 compiler: ": #stack 7.8.4 osx"
4766 os: osx
@@ -63,17 +82,22 @@ matrix:
6382 - env: BUILD=stack ARGS="--resolver nightly"
6483
6584before_install:
85+# Using compiler above sets CC to an invalid value, so unset it
6686- unset CC
87+
88+# We want to always allow newer versions of packages when building on GHC HEAD
6789- CABALARGS=""
6890- if [ "x$GHCVER" = "xhead" ]; then CABALARGS=--allow-newer; fi
91+
92+# Download and unpack the stack executable
6993- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.local/bin:$PATH
7094- mkdir -p ~/.local/bin
7195- |
72− if [ `uname` = "Darwin" ];
96+ if [ `uname` = "Darwin" ]
7397 then
74− curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin;
98+ curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
7599 else
76− curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack';
100+ curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
77101 fi
78102
79103install:
@@ -82,24 +106,29 @@ install:
82106- |
83107 case "$BUILD" in
84108 stack)
85− stack --no-terminal --install-ghc $ARGS test --only-dependencies;;
109+ stack --no-terminal --install-ghc $ARGS test --only-dependencies
110+ ;;
86111 cabal)
87− cabal --version;
88− travis_retry cabal update;
89− cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS;;
112+ cabal --version
113+ travis_retry cabal update
114+ cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS
115+ ;;
90116 esac
91117
92118script:
93−- case "$BUILD" in
119+- |
120+ case "$BUILD" in
94121 stack)
95− stack --no-terminal $ARGS test --haddock --no-haddock-deps;;
122+ stack --no-terminal $ARGS test --haddock --no-haddock-deps
123+ ;;
96124 cabal)
97− cabal configure --enable-tests --enable-benchmarks -v2 --ghc-options="-O0 -Werror";
98− cabal build;
99− cabal check || [ "$CABALVER" == "1.16" ];
100− cabal test;
101− cabal sdist;
102− cabal copy;
103− SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
104− (cd dist && cabal install --force-reinstalls "$SRC_TGZ");;
125+ cabal configure --enable-tests --enable-benchmarks -v2 --ghc-options="-O0 -Werror"
126+ cabal build
127+ cabal check || [ "$CABALVER" == "1.16" ]
128+ cabal test
129+ cabal sdist
130+ cabal copy
131+ SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz && \
132+ (cd dist && cabal install --force-reinstalls "$SRC_TGZ")
133+ ;;
105134 esac