-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
54 lines (47 loc) · 1.77 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
language: c
sudo: false
dist: bionic
git:
submodules: false # whether to recursively clone submodules
cache:
directories:
- $HOME/.cabal/packages
- $HOME/.cabal/store
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
matrix:
include:
- env: CABALVER=2.2 GHCVER=8.8.4
compiler: "ghc-8.8.4"
addons: {apt: {packages: [cabal-install-2.2,ghc-8.8.4,happy-1.19.5], sources: [hvr-ghc]}}
- env: CABALVER=2.2 GHCVER=8.6.5
compiler: "ghc-8.6.5"
addons: {apt: {packages: [cabal-install-2.2,ghc-8.6.5,happy-1.19.5], sources: [hvr-ghc]}}
before_install:
- unset CC
- export HAPPYVER=1.19.5
- export PATH=~/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:/opt/happy/$HAPPYVER/bin:$PATH
install:
- cabal --version
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- travis_retry cabal update -v
- sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
- rm -fv cabal.project.local
- rm -f cabal.project.freeze
- cabal install --only-dependencies --enable-tests -v2
# 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:
- rm -rf dist/
# build tests and benchmarks, run tests
- cabal configure --enable-tests --enable-benchmarks -v2
- cabal build
- cabal test
- cabal check
- cabal sdist