forked from Twinside/Juicy.Pixels
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
69 lines (59 loc) · 1.94 KB
/
.travis.yml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
language: haskell
env:
- CABALVER=1.18 GHCVER=7.4.2
- CABALVER=1.18 GHCVER=7.6.3
- CABALVER=1.18 GHCVER=7.8.4
- CABALVER=1.22 GHCVER=7.10.1
- CABALVER=1.22 GHCVER=head
# - >
# GHCVER=7.4.2
# MODE="-fsafe"
matrix:
allow_failures:
- env: GHCVER=head
before_install:
# If $GHCVER is the one travis has, don't bother reinstalling it.
# We can also have faster builds by installing some libraries with
# `apt`. If it isn't, install the GHC we want from hvr's PPA along
# with cabal-1.18.
- |
if [ $GHCVER = `ghc --numeric-version` ]; then
# Try installing some of the build-deps with apt-get for speed.
travis/cabal-apt-install --enable-tests $MODE
export CABAL=cabal
else
# Install the GHC we want from hvr's PPA
travis_retry sudo add-apt-repository -y ppa:hvr/ghc
travis_retry sudo apt-get update
travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER happy
export CABAL=cabal-$CABALVER
export PATH=/opt/ghc/$GHCVER/bin:$PATH
fi
# Uncomment whenever hackage is down.
# - mkdir -p ~/.cabal && cp travis/config ~/.cabal/config && $CABAL update
- $CABAL update
# Update happy when building with GHC head
- |
if [ $GHCVER = "head" ] || [ $GHCVER = "7.8.4" ] || [ $GHCVER = "7.10.1" ]; then
$CABAL install --constraint=transformers\ installed happy alex
export PATH=$HOME/.cabal/bin:$PATH
fi
install:
- $CABAL install --dependencies-only
- $CABAL configure $MODE
script:
- $CABAL build
# tests that a source-distribution can be generated
- cabal sdist
# check that the generated source-distribution can be built & installed
- export SRC_TGZ=$($CABAL info . | awk '{print $2 ".tar.gz";exit}') ;
cd dist/;
if [ -f "$SRC_TGZ" ]; then
$CABAL install --force-reinstalls "$SRC_TGZ";
else
echo "expected '$SRC_TGZ' not found";
exit 1;
fi
notifications:
email:
- twinside@gmail.com