-
Notifications
You must be signed in to change notification settings - Fork 164
/
.travis.yml
77 lines (66 loc) · 2.56 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
dist: xenial
language: haskell
cabal: "3.2"
cache:
directories:
- $HOME/.cabal
- $HOME/.ghc
- $TRAVIS_BUILD_DIR/testing/.cabal-sandbox
- $HOME/.stack
# Make sure to update tested-with in source/BNFC.cabal when updating these:
ghc:
- 7.10.3
- 8.10.2
- 8.8.4
- 8.6.5
- 8.4.4
- 8.2.2
- 8.0.2
env:
- STACK=yes
- CABAL=yes PACKAGEDIR="source"
- CABAL=yes PACKAGEDIR="testing"
matrix:
allow_failure:
- env: CABAL=yes PACKAGEDIR="testing"
exclude:
# # ghc 8.10.2 not yet supported by stack
# - ghc: 8.10.2
# env: STACK=yes
# # haskell-src (dependencies of testing) not yet compatible with ghc 8.10.2
# - ghc: 8.10.2
# env: CABAL=yes PACKAGEDIR="testing"
# # haskell-src (dependencies of testing) throws off travis ghc 8.8
# # since travis uses cabal 2.0 when ghc 8.8 wants cabal 3.0
# - ghc: 8.8.4
# env: CABAL=yes PACKAGEDIR="testing"
# HTF-0.14 does not build under 8.0 because of cabal version
- ghc: 8.0.2
env: CABAL=yes PACKAGEDIR="testing"
# shelly-1.9 not available for ghc 7
- ghc: 7.10.3
env: CABAL=yes PACKAGEDIR="testing"
script:
- if [ "$CABAL" = yes -a "$PACKAGEDIR" = source ]; then cabal v1-configure --enable-tests && cabal v1-build && cabal v1-test; fi
- if [ "$CABAL" = yes -a "$PACKAGEDIR" = testing ]; then source scripts/env && ./scripts/bootstrap; fi # && ./scripts/runtests; fi
- if [ "$STACK" = yes ]; then stack --no-terminal --stack-yaml stack-$GHCVER.yaml build --fast --test --no-run-tests; fi
before_install:
- export GHCVER=${GHCVER:-$TRAVIS_HASKELL_VERSION}
- sudo apt-get update -qq
- if [ "$CABAL" = yes ]; then
export PATH=$HOME/.cabal/bin:$PATH &&
sudo apt-get install alex happy;
fi
- if [ "$STACK" = yes ]; then
mkdir -p $HOME/.local/bin &&
export PATH=$HOME/.local/bin:$PATH &&
travis_retry curl -L https://github.com/commercialhaskell/stack/releases/download/v2.3.3/stack-2.3.3-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C $HOME/.local/bin '*/stack' &&
stack config set system-ghc --global true;
fi
- if [ "$CABAL" = yes -a "$PACKAGEDIR" = testing ]; then sudo apt-get install openjdk-9-jdk-headless jflex antlr4 ocaml texlive-latex-base hlint; fi
install:
- if [ "$CABAL" = yes ]; then cd $PACKAGEDIR && cabal v1-update && cabal v1-install --enable-tests --dependencies-only; fi
- if [ "$STACK" = yes ]; then stack --no-terminal --stack-yaml stack-$GHCVER.yaml build --test --dependencies-only; fi
# Trash
# cabal user-config update &&
# --installdir=$HOME/.cabal/bin