-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis.yml
76 lines (69 loc) · 3.46 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
# Inspired by
# https://github.com/hvr/multi-ghc-travis/blob/master/make_travis_yml_2.hs
sudo: false
language: c
cache:
directories:
- $HOME/.cabal
matrix:
include:
- env: CABALVER=3.4 GHCVER=7.6.3 TH="-f-th" TEST="no"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-3.4,ghc-7.6.3]}}
- env: CABALVER=3.4 GHCVER=7.8.4 TH="-f-th" TEST="no"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-3.4,ghc-7.8.4]}}
- env: CABALVER=3.4 GHCVER=7.10.3 TH="-f-th" TEST="no"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-3.4,ghc-7.10.3]}}
- env: CABALVER=3.4 GHCVER=8.0.2 TH="-f-th" TEST="no"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-3.4,ghc-8.0.2]}}
- env: CABALVER=3.4 GHCVER=8.4.3 TH="-f-th" TEST="no"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-3.4,ghc-8.4.3]}}
- env: CABALVER=3.4 GHCVER=8.6.5 TH="-f-th" TEST="no"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-3.4,ghc-8.6.5]}}
- env: CABALVER=3.4 GHCVER=8.8.3 TH="-f-th" TEST="no"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-3.4,ghc-8.8.3]}}
- env: CABALVER=3.4 GHCVER=8.10.3 TH="-f-th" TEST="no"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-3.4,ghc-8.10.3]}}
- env: CABALVER=3.4 GHCVER=9.0.1 TH="-f-th" TEST="no"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-3.4,ghc-9.0.1]}}
- env: CABALVER=3.4 GHCVER=7.6.3 TH="" TEST="no"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-3.4,ghc-7.6.3]}}
- env: CABALVER=3.4 GHCVER=7.8.4 TH="" TEST="no"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-3.4,ghc-7.8.4]}}
- env: CABALVER=3.4 GHCVER=7.10.3 TH="" TEST="no"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-3.4,ghc-7.10.3]}}
- env: CABALVER=3.4 GHCVER=8.0.2 TH="" TEST="yes"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-3.4,ghc-8.0.2]}}
- env: CABALVER=3.4 GHCVER=8.4.3 TH="" TEST="yes"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-3.4,ghc-8.4.3]}}
- env: CABALVER=3.4 GHCVER=8.6.5 TH="" TEST="yes"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-3.4,ghc-8.6.5]}}
- env: CABALVER=3.4 GHCVER=8.8.3 TH="" TEST="yes"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-3.4,ghc-8.8.3]}}
- env: CABALVER=3.4 GHCVER=8.10.3 TH="" TEST="yes"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-3.4,ghc-8.10.3]}}
- env: CABALVER=3.4 GHCVER=9.0.1 TH="" TEST="yes"
addons: {apt: {sources: [hvr-ghc], packages: [cabal-install-3.4,ghc-9.0.1]}}
before_install:
- env
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
- if [ "$TEST" = "yes" ]; then
export TEST_FLAGS="--enable-test --enable-bench";
else
export TEST_FLAGS="--disable-test --disable-bench";
fi
install:
- cabal --version
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- travis_retry cabal new-update -v
- cabal new-build $TH $TEST_FLAGS --dependencies;
script:
- cabal new-build $TH $TEST_FLAGS -v2
- if [ "$TEST" = "yes" ]; then
cabal new-test $TH;
fi
- cabal check;
- cabal sdist;
- SRC_BASENAME=$(cabal info . | awk '{print $2;exit}');
- tar -C dist-newstyle/sdist/ -xf dist-newstyle/sdist/$SRC_BASENAME.tar.gz;
- cd dist-newstyle/sdist/$SRC_BASENAME/;
- cabal new-build $TH $TEST_FLAGS --disable-optimization;