-
Notifications
You must be signed in to change notification settings - Fork 16
/
.travis.yml
100 lines (91 loc) · 2.95 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
dist: xenial
sudo: false
language: c
env:
global:
- PKGNAME=pie
matrix:
include:
- env: CABALVER="3.0" GHCVER="8.8.1"
compiler: ": #GHC 8.8.1"
addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.1], sources: [hvr-ghc]}}
os: linux
- env: CABALVER="2.4" GHCVER="8.6.5"
compiler: ": #GHC 8.6.5"
addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.5], sources: [hvr-ghc]}}
os: linux
- env: CABALVER="2.4" GHCVER="8.4.4"
compiler: ": #GHC 8.4.4"
addons: {apt: {packages: [cabal-install-2.4,ghc-8.4.4], sources: [hvr-ghc]}}
os: linux
- env: CABALVER="2.4" GHCVER="8.2.2"
compiler: ": #GHC 8.2.2"
addons: {apt: {packages: [cabal-install-2.4,ghc-8.2.2], sources: [hvr-ghc]}}
os: linux
- env: CABALVER="2.4" GHCVER="8.0.2"
compiler: ": #GHC 8.0.2"
addons: {apt: {packages: [cabal-install-2.4,ghc-8.0.2], sources: [hvr-ghc]}}
os: linux
- os: osx
fast-finish: true
cache:
directories:
- $HOME/.cabal/packages
before_cache:
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar
before_install:
- unset CC
- if [[ $TRAVIS_OS_NAME == 'linux' ]];
then
export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.cabal/bin:$PATH;
export SED=sed;
export ZCAT=zcat;
fi
- env
- if [[ $TRAVIS_OS_NAME == 'osx' ]];
then
brew update
brew outdated pkgconfig || brew install pkgconfig;
brew install ghc cabal-install gnu-sed;
export PATH=$HOME/.cabal/bin:$PATH;
export SED=gsed;
export ZCAT=gzcat;
fi
install:
- which cabal
- which ghc
- cabal --version
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ];
then
$ZCAT $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz >
$HOME/.cabal/packages/hackage.haskell.org/00-index.tar;
fi
- travis_retry cabal v2-update -v
# Run build with 2 parallel jobs
# The container environment reports 16 cores,
# causing cabal's default configuration (jobs: $ncpus)
# to run into the GHC #9221 bug which can result in longer build-times.
- $SED -i -r 's/(^jobs:).*/\1 2/' $HOME/.cabal/config
before_script:
- ORIGINAL_DIR=$(pwd)
- cabal v2-sdist
- cd ..
- tar -xf ${ORIGINAL_DIR}/dist-newstyle/sdist/${PKGNAME}*.tar.gz
- cd ${PKGNAME}*
script:
###
- echo 'Configure...' && echo -en 'travis_fold:start:script.configure\\r'
- cabal v2-configure --enable-tests
- echo -en 'travis_fold:end:script.configure\\r'
###
- echo 'Build...' && echo -en 'travis_fold:start:script.build\\r'
- cabal v2-build
- echo -en 'travis_fold:end:script.build\\r'
###
- echo 'Tests...' && echo -en 'travis_fold:start:script.tests\\r'
- cabal v2-test --enable-tests
- echo -en 'travis_fold:end:script.tests\\r'
###
# EOF