-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
110 lines (91 loc) · 3.6 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
69
70
71
72
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
109
110
language: c
sudo: false
matrix:
include:
- env: CABALVER=1.18 GHCVER=7.8.1
addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.1], sources: [hvr-ghc]}}
- env: CABALVER=1.18 GHCVER=7.8.2
addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.2], sources: [hvr-ghc]}}
- env: CABALVER=1.18 GHCVER=7.8.3
addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.3], sources: [hvr-ghc]}}
- env: CABALVER=1.18 GHCVER=7.8.4
addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}}
- env: CABALVER=1.22 GHCVER=7.10.1
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.1],sources: [hvr-ghc]}}
- env: CABALVER=1.22 GHCVER=7.10.2
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2],sources: [hvr-ghc]}}
- env: CABALVER=1.22 GHCVER=7.10.3
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3],sources: [hvr-ghc]}}
- env: CABALVER=1.24 GHCVER=8.0.1
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1],sources: [hvr-ghc]}}
- env: CABALVER=1.24 GHCVER=8.2.1
addons: {apt: {packages: [cabal-install-1.24,ghc-8.2.1],sources: [hvr-ghc]}}
- env: CABALVER=head GHCVER=head
addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
- env: STACK=STACK ARGS=""
addons: {apt: {packages: [libgmp-dev]}}
- env: STACK=STACK ARGS="--resolver lts-4"
addons: {apt: {packages: [libgmp-dev]}}
- env: STACK=STACK ARGS="--resolver lts-5"
addons: {apt: {packages: [libgmp-dev]}}
- env: STACK=STACK ARGS="--resolver lts-6"
addons: {apt: {packages: [libgmp-dev]}}
- env: STACK=STACK ARGS="--resolver lts-7"
addons: {apt: {packages: [libgmp-dev]}}
- env: STACK=STACK ARGS="--resolver lts-8"
addons: {apt: {packages: [libgmp-dev]}}
- env: STACK=STACK ARGS="--resolver lts"
addons: {apt: {packages: [libgmp-dev]}}
- env: STACK=STACK ARGS="--resolver nightly"
addons: {apt: {packages: [libgmp-dev]}}
allow_failures:
- env: CABALVER=head GHCVER=head
before_install:
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
install:
- |
set -e
if [ -z "$STACK" ]; then
export PATH=/home/travis/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
cabal update
else
travis_retry curl -o stack.tar.gz -L https://www.stackage.org/stack/linux-x86_64
mkdir ./stack
tar -xf stack.tar.gz -C ./stack --strip-components=1
export PATH=$PATH:./stack/
echo "Stack $(stack --version)"
stack update
fi
script:
- |
set -e
if [ -n "$STACK" ]; then
echo -e "\033[0;32mstack setup.\033[0m"
stack $ARGS --no-terminal setup
echo -e "\033[0;32mstack build.\033[0m"
stack $ARGS --no-terminal build
echo -e "\033[0;32mstack test.\033[0m"
stack $ARGS --no-terminal test
else
cabal --version
ghc --version
echo -e "\033[0;32mcabal install only deps.\033[0m"
cabal install --only-dependencies --enable-tests
echo -e "\033[0;32mcabal config with tests.\033[0m"
cabal configure --enable-tests
echo -e "\033[0;32mcabal build.\033[0m"
travis_wait 60 cabal build
echo -e "\033[0;32mcabal test.\033[0m"
cabal test
echo -e "\033[0;32mcabal check.\033[0m"
cabal check
echo -e "\033[0;32mcabal sdist.\033[0m"
cabal sdist
echo -e "\033[0;32mcabal install tarball.\033[0m"
cabal install --force-reinstalls dist/*-*.tar.gz
fi
cache:
directories:
- $HOME/.stack
- $HOME/.cabal