forked from valderman/aplite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
53 lines (46 loc) · 2 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
sudo: false
language: c
# cache:
# directories:
# - .cabal-sandbox
matrix:
include:
- env: CABALVER=1.18 GHCVER=7.8.4 SYNTACTICVER="syntactic>=3"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-1.18,ghc-7.8.4,happy-1.19.5,alex-3.1.4]}}
- env: CABALVER=1.22 GHCVER=7.10.2 SYNTACTICVER="syntactic>=3"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-1.22,ghc-7.10.2,happy-1.19.5,alex-3.1.4]}}
- env: CABALVER=1.22 GHCVER=7.10.2 SYNTACTICVER="syntactic<2"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-1.22,ghc-7.10.2,happy-1.19.5,alex-3.1.4]}}
- env: CABALVER=head GHCVER=head SYNTACTICVER="syntactic>=3"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-head,ghc-head,happy-1.19.5,alex-3.1.4]}}
allow_failures:
- env: CABALVER=head GHCVER=head SYNTACTICVER="syntactic>=3"
before_install:
- env
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
- export PATH=/opt/alex/3.1.4/bin:/opt/happy/1.19.5/bin:$PATH
install:
- cabal --version
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- travis_retry cabal update
- cabal sandbox init
- cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --constraint="language-c-quote -full-haskell-antiquotes" --constraint $SYNTACTICVER
script:
- cabal configure --enable-tests --enable-benchmarks -v2
- cabal build
- cabal test
- if [ $CABALVER == 1.22 ]; then cabal check; fi # Cabal 1.18 complains about PatternSynonyms
- cabal sdist
- export SRC_TGZ=$(cabal info . | awk '{print $2;exit}');
cd dist/;
if [ -f "$SRC_TGZ".tar.gz ]; then
cabal unpack "$SRC_TGZ".tar.gz;
cd "$SRC_TGZ";
cabal sandbox init --sandbox ../../.cabal-sandbox;
cabal configure --disable-optimization --enable-test;
cabal build;
cabal install --disable-optimization --force-reinstalls;
else
echo "expected '$SRC_TGZ.tar.gz' not found";
exit 1;
fi