-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
72 lines (62 loc) · 1.52 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
sudo: true
language: haskell
git:
depth: 5
cabal: "2.4"
cache:
directories:
- "$HOME/.cabal/store"
- "$HOME/.stack"
- "$TRAVIS_BUILD_DIR/.stack-work"
matrix:
include:
- ghc: 8.6.4
- ghc: 8.6.4
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-14.12.yaml"
- ghc: 8.8.3
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-15.4.yaml"
install:
- |
cd $TRAVIS_BUILD_DIR
for i in $(git ls-files); do
if ( grep -q '\s$' "$i" ); then
echo "trailing whitespace in $i"
BAD=1
fi
done
if [ "$BAD" == "1" ]; then
echo "there were errors."
exit 1
fi
- |
if [ -z "$STACK_YAML" ]; then
echo -e "\n\n>>> WITH CABAL\n"
ghc --version
cabal --version
for package in servant-uverb{,-client,-server,-mock,-swagger}; do
cd $package
cabal new-update
cabal new-build --enable-tests --enable-benchmarks
cd ..
done
else
echo -e "\n\n>>> WITH STACK\n"
curl -sSL https://get.haskellstack.org/ | sh
stack --version
stack --stack-yaml=$STACK_YAML build --system-ghc --test --bench --no-run-tests --no-run-benchmarks --ghc-options=-Werror
fi
script:
- |
if [ -z "$STACK_YAML" ]; then
echo -e "\n\n>>> WITH CABAL\n"
for package in servant-uverb{,-client,-server,-mock,-swagger}; do
cd $package
cabal new-test --enable-tests
cd ..
done
else
echo -e "\n\n>>> WITH STACK\n"
stack test --system-ghc
fi
notifications:
email: false