-
Notifications
You must be signed in to change notification settings - Fork 85
/
.travis.yml
71 lines (62 loc) · 2.94 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
# See also https://github.com/hvr/multi-ghc-travis
language: c
sudo: false
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:
- compiler: "ghc-7.10.3"
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.10.3,libgtk2.0-dev,libgtk-3-dev,libcairo-dev], sources: [hvr-ghc]}}
- compiler: "ghc-8.0.2"
env: GHCVER=8.0.2
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2,libgtk2.0-dev,libgtk-3-dev,libcairo-dev], sources: [hvr-ghc]}}
- compiler: "ghc-8.2.2"
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2,libgtk2.0-dev,libgtk-3-dev,libcairo-dev], sources: [hvr-ghc]}}
- compiler: "ghc-8.4.2"
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.2,libgtk2.0-dev,libgtk-3-dev,libcairo-dev], sources: [hvr-ghc]}}
- compiler: "ghc-8.6.4"
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.4,libgtk2.0-dev,libgtk-3-dev,libcairo-dev], sources: [hvr-ghc]}}
- compiler: "ghc-8.8.2"
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-3.2,ghc-8.8.2,libgtk2.0-dev,libgtk-3-dev,libcairo-dev], sources: [hvr-ghc]}}
allow_failures:
- env: GHCVER=8.0.2
before_install:
- HC=${CC}
- unset CC
- PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$PATH
install:
- cabal --version
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
- travis_retry cabal update -v
- cabal new-build -w ${HC} --dep all
# 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:
# prepare `cabal sdist` source-tree environment to make sure source-tarballs are complete
- read -a PKGS <<< "chart chart-cairo chart-diagrams chart-tests chart-gtk chart-gtk3"
- rm -rf sdists; mkdir sdists
- for PKG in "${PKGS[@]}"; do
cd "$PKG"; cabal v1-sdist --output-directory="../sdists/$PKG" || break; cd ..;
done
- cd sdists/
# build all packages
- cp -v ../cabal.project ./
- cabal new-build -j1 all
# run test harness
- time $(find dist-newstyle -type f -executable -name chart-harness | head -n 1) charts-cairo --svg
# cabal new-build and data files don't play yet well together
# https://github.com/haskell/cabal/issues/4120
# - time $(find dist-newstyle -type f -executable -name chart-harness | head -n 1) charts-diagrams --svg
# and run testsuite
# - $(find dist-newstyle -type f -executable -name doctests | head -n 1)
# EOF