-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
53 lines (53 loc) · 2.04 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
# 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
- export PATH=~/.local/bin:$PATH
- if [ ! -e ~/.local/bin/stack ]; then mkdir -p ~/.local/bin; travis_retry curl -L
https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1
-C ~/.local/bin '*/stack'; fi
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo
'?')]"
- stack +RTS -N2 -RTS --version
- ghc --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:
- if [ "$PEDANTIC" = "YES" ]; then export STACKOPTS=--pedantic; fi
- stack --no-terminal --skip-ghc-check build --test $STACKOPTS
- stack --no-terminal --skip-ghc-check sdist
matrix:
fast_finish: true
include:
- env: GHCVER=7.10.3 STACK_YAML=stack-lts-5.yaml PEDANTIC=YES
addons:
apt:
sources:
- hvr-ghc
packages:
- libblas-dev
- libgsl0-dev
- liblapack-dev
- ghc-7.10.3
- libgmp-dev
compiler: ! ': # ghc-7.10.3 stack-lts-5.yaml'
branches:
only:
- master
cache:
directories:
- ~/.stack
- ~/.local
- ~/.stack-work-cache
apt: true