-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
69 lines (59 loc) · 2.12 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
language: generic
# Explicitly request container-based infrastructure.
sudo: false
# Speed up git.
git:
depth: 5
cache:
directories:
- $HOME/.cabal
- $HOME/.ghc
before_cache:
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
# remove files that are regenerated by 'cabal update'
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.*
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
- rm -rfv $HOME/.cabal/packages/head.hackage
# happy is required by haskell-src, by test-karya, by pprint.
# Old-style cabal is sadly not smart enough to understand this.
matrix:
include:
- compiler: "ghc-8.4.2"
env: GHC=8.4.2 CABALVER=2.2 ALEXVER=3.1.7
addons:
apt:
packages: [ghc-8.4.2, cabal-install-2.2, happy-1.19.5]
sources: [hvr-ghc]
# async not updated for base-4.12
# - compiler: "ghc-HEAD"
# env: GHC=head CABALVER=head ALEXVER=3.1.7
# addons:
# apt:
# packages: [ghc-head, cabal-install-head, happy-1.19.5]
# sources: [hvr-ghc]
install: true
before_install:
- export PATH="/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.cabal/bin:$PATH"
- export PATH="/opt/happy/1.19.5/bin:$PATH"
install:
- echo $(ghc --version)
- ghc-pkg list
- cabal --version
- travis_retry cabal update -v
- cabal install --only-dependencies --enable-tests -j2
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
# Here starts the actual work to be performed for the package under test;
# any command which exits with a non-zero exit code causes the build to fail.
script:
# test that source-distributions can be generated
- cabal configure
- cabal sdist
- cat ./dist/fix-imports-*.tar.gz | (cd "${DISTDIR}/" && tar -xzvf -)
- cd ${DISTDIR}/fix-imports*
# this builds all libraries and executables (without tests/benchmarks)
- cabal configure --enable-tests --disable-benchmarks
- cabal build
- cabal test