-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
65 lines (65 loc) · 2.44 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
# This file has been generated by travis-meta-yaml 0.2.0.0
# see https://github.com/phadej/travis-meta-yaml
sudo: false
language: c
before_install:
- export PATH=/opt/ghc/$GHCVER/bin:$PATH
- if [ -n "$CABALVER" ]; then export PATH=/opt/cabal/$CABALVER/bin:$PATH; fi
- if [ -n "$HAPPYVER" ]; then export PATH=/opt/happy/$HAPPYVER/bin:$PATH; fi
- if [ -n "$ALEXVER" ]; then export PATH=/opt/alex/$ALEXVER/bin:$PATH; fi
- export PATH=~/.local/bin:$PATH
- if [ ! -e ~/.local/bin/stack ]; then mkdir -p ~/.local/bin; travis_retry curl -L
https://github.com/commercialhaskell/stack/releases/download/v0.1.5.0/stack-0.1.5.0-x86_64-linux.tar.gz
| tar xz --strip-components=1 -C ~/.local/bin; fi
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo
'?')]"
- stack +RTS -N2 -RTS --version
install:
- if [ "$STACK_SOLVER" = "YES" ]; then rm -f stack.yaml; stack update; stack init
--solver; fi; stack --no-terminal --skip-ghc-check list-dependencies|sort > installplan.txt;
cat installplan.txt; stack --no-terminal --skip-ghc-check setup; if diff -u $HOME/.stack-work-cache/installplan.txt
installplan.txt; then echo "cabal build-cache HIT"; rm -rf .stack-work; cp -a $HOME/.stack-work-cache
.stack-work; rm -f .stack-work/installplan.txt; else echo "cabal build-cache MISS";
rm -rf $HOME/.stack-work-cache; stack --no-terminal --skip-ghc-check build --test
--only-dependencies; fi; if [ ! -d $HOME/.stack-work-cache ]; then echo "snapshotting
package-db to build-cache"; cp -a .stack-work $HOME/.stack-work-cache; cp -a installplan.txt
$HOME/.stack-work-cache/installplan.txt; fi;
script:
- stack --no-terminal --skip-ghc-check build --test
- stack --no-terminal --skip-ghc-check sdist
matrix:
fast_finish: true
include:
- env: GHCVER=7.8.4 CABALVER=1.18 HAPPYVER=1.19.5 ALEXVER=3.1.4 STACK_SOLVER=YES
addons:
apt:
sources:
- hvr-ghc
packages:
- ghc-7.8.4
- cabal-install-1.18
- libgmp-dev
- happy-1.19.5
- alex-3.1.4
compiler: ! ': # ghc-7.8.4 YES'
- env: GHCVER=7.10.2 CABALVER=1.22 HAPPYVER=1.19.5 ALEXVER=3.1.4 STACK_SOLVER=YES
addons:
apt:
sources:
- hvr-ghc
packages:
- ghc-7.10.2
- cabal-install-1.22
- libgmp-dev
- happy-1.19.5
- alex-3.1.4
compiler: ! ': # ghc-7.10.2 YES'
branches:
only:
- master
cache:
directories:
- ~/.stack
- ~/.local
- ~/.stack-work-cache
apt: true