-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
63 lines (58 loc) · 2.05 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
env:
# Note: We have to use Cabal 2.4 with GHC 7.0 since for some reason
# builds of "text" fail with GHC 7.0 and Cabal versions prior to 2.4
# https://github.com/haskell/bytestring/issues/213
# With Cabal 2.4 we also get improved syntax in cabal.project files,
# supporting remote sources, and other goodies, so use it across the
# board.
# For GHC >= 7.10 we use Cabal 3.2 which supports the --benchmark-options
# flag.
#
- GHCVER=7.0.4 CABALVER=2.4
- GHCVER=7.2.2 CABALVER=2.4
- GHCVER=7.4.2 CABALVER=2.4
- GHCVER=7.6.3 CABALVER=2.4
- GHCVER=7.8.4 CABALVER=2.4
- GHCVER=7.10.3 CABALVER=3.2
- GHCVER=8.0.2 CABALVER=3.2
- GHCVER=8.2.2 CABALVER=3.2
- GHCVER=8.4.4 CABALVER=3.2
- GHCVER=8.6.5 CABALVER=3.2
- GHCVER=8.8.3 CABALVER=3.2
- GHCVER=8.10.1 CABALVER=3.2
### The head in "ppa", currently 8.7, is no longer worth testing.
# - GHCVER=head CABALVER=2.4
matrix:
allow_failures:
- env: GHCVER=head CABALVER=2.4
before_install:
- travis_retry sudo add-apt-repository -y ppa:hvr/ghc
- travis_retry sudo apt-get update
- travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
- cabal --version
- "GHCNUMVER=$(ghc --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
- echo $GHCNUMVER
install:
- travis_retry cabal update
script:
- cabal v2-configure
- cabal v2-build
- cabal v2-haddock -O0
- cabal v2-sdist -o .
# Remove to enable build of sdist.
- rm -f cabal.project
- (cd tests; cabal v2-configure; cabal v2-test)
# Build the benchmarks and run a single iteration.
- if [ "$GHCNUMVER" -ge 71000 ]; then
(cd bench; cabal v2-bench -O0 --benchmark-options "--quick --min-duration=0 --include-first-iter");
fi
# "cabal check" disabled due to -O2 warning
- export SRC=$(cabal info . | awk '{print $2; exit}');
if [ -f "$SRC.tar.gz" ]; then
cabal get "./$SRC.tar.gz";
(cd "$SRC"; cabal v2-build);
else
echo "expected '$SRC.tar.gz' not found";
exit 1;
fi