on master help sign in
Actually test with GHC 7.10
commit255907dbfa2ded0e68cc3beadfef3985cb2d0ca5 authorTomas Carnecky <tomas.carnecky@gmail.com> dateFri 29 May 2015, 11:32 (11 years ago) parentf51b6ef
3 files changed+34−47
.travis.yml+19−9 travis-scripts/build.sh+15−25 travis-scripts/install.sh−13
.travis.yml+19−9
@@ -1,12 +1,22 @@
1−language: haskell
2−ghc:
3− - 7.10
4− - 7.8
5− - 7.6
6− - 7.4
1+env:
2+ - CABALVER=1.18 GHCVER=7.6.3
3+ - CABALVER=1.18 GHCVER=7.8.4
4+ - CABALVER=1.22 GHCVER=7.10.1
5+ - CABALVER=head GHCVER=head
6+
7+matrix:
8+ allow_failures:
9+ - env: CABALVER=head GHCVER=head
710
8−sudo: false
911install:
10− - ./travis-scripts/install.sh
12+ - travis_retry sudo add-apt-repository -y ppa:hvr/ghc
13+ - travis_retry sudo apt-get update
14+ - travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER
15+ - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
16+ - cabal --version
17+ - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
18+ - travis_retry cabal update
19+ - cabal install --only-dependencies --enable-tests --enable-benchmarks uuid-types/uuid-types.cabal uuid/uuid.cabal
20+
1121script:
12− - ./travis-scripts/build.sh
22+ - for p in uuid-types uuid; do ./travis-scripts/build.sh $p; done
travis-scripts/build.sh+15−25
@@ -1,27 +1,17 @@
1−#!/usr/bin/env sh
2−echo "==========================================="
3−echo "= Building and installing 'uuid-types'... ="
4−echo "==========================================="
1+#!/bin/sh
52
6−# We install here because "uuid" is going to need it.
7−(cd "uuid-types" && \
8− cabal configure --enable-tests && \
9− cabal build && \
10− cabal test && \
11− cabal install) || exit 1
3+cd $1
124
13−echo "========================================="
14−echo "= Installing dependencies for 'uuid'... ="
15−echo "========================================="
16−
17−(cd "uuid" && \
18− cabal install --dependencies-only --enable-tests) || exit 1
19−
20−echo "======================"
21−echo "= Building 'uuid'... ="
22−echo "======================"
23−
24−(cd "uuid" && \
25− cabal configure --enable-tests && \
26− cabal build && \
27− cabal test) || exit 1
5+cabal configure --enable-tests --enable-benchmarks -v2
6+cabal build
7+cabal test
8+cabal check
9+cabal sdist
10+export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ;
11+cd dist/;
12+if [ -f "$SRC_TGZ" ]; then
13+ cabal install --force-reinstalls "$SRC_TGZ";
14+else
15+ echo "expected '$SRC_TGZ' not found";
16+ exit 1;
17+fi
travis-scripts/install.shdeleted−13
@@ -1,13 +0,0 @@
1−#!/usr/bin/env sh
2−
3−# We can only pre-install dependencies for the "uuid-types" project
4−# since the "uuid" project depends on "uuid-types". We could use
5−# sandboxing and "add-source", but it seems quite wasteful of
6−# CPU-cycles to compile everything twice for each version of GHC.
7−
8−echo "==============================================="
9−echo "= Installing dependencies for 'uuid-types'... ="
10−echo "==============================================="
11−
12−(cd "uuid-types" && \
13− cabal install --dependencies-only --enable-tests) || exit 1