[commit: packages/directory] master: Add GHC 7.10 to Travis tests (291ab06)

git at git.haskell.org git at git.haskell.org
Fri Dec 18 09:50:12 UTC 2015


Repository : ssh://git@git.haskell.org/directory

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/291ab06596e9e69a6c54e2a3d36ef179b2566d53/directory

>---------------------------------------------------------------

commit 291ab06596e9e69a6c54e2a3d36ef179b2566d53
Author: Phil Ruffwind <rf at rufflewind.com>
Date:   Fri Apr 10 20:03:44 2015 -0400

    Add GHC 7.10 to Travis tests


>---------------------------------------------------------------

291ab06596e9e69a6c54e2a3d36ef179b2566d53
 .travis.yml | 43 +++++++++++++++++++++++++++++--------------
 1 file changed, 29 insertions(+), 14 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index bc3fe44..c3bddb0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,11 +4,12 @@ language: c
 env:
  # we have to use CABALVER=1.16 for GHC<7.6 as well, as there's
  # no package for earlier cabal versions in the PPA
- - GHCVER=7.4.1 CABALVER=1.16
- - GHCVER=7.4.2 CABALVER=1.16
- - GHCVER=7.6.3 CABALVER=1.16
- - GHCVER=7.8.3 CABALVER=1.18
- - GHCVER=head  CABALVER=head
+ - GHCVER=7.4.1  CABALVER=1.16
+ - GHCVER=7.4.2  CABALVER=1.16
+ - GHCVER=7.6.3  CABALVER=1.16
+ - GHCVER=7.8.3  CABALVER=1.18
+ - GHCVER=7.10.1 CABALVER=1.22
+ - GHCVER=head   CABALVER=head
 
 matrix:
   allow_failures:
@@ -34,6 +35,27 @@ before_script:
      else streaming=streaming
      fi
      export streaming
+ - | # check if '--run-tests' is supported (didn't exist until 1.20);
+     # tests must be run prior to install as packages may be broken by install
+     if cabal 2>&1 install --run-tests __dummy |
+        grep >/dev/null 2>&1 "cabal: unrecognized option"
+     then def_cabal_install_run_tests='cabal_install_run_tests() {
+          tgz=$1
+          shift
+          tmp=cabal-install-run-tests.tmp
+          mkdir -p "$tmp"
+          ( cd "$tmp" && tar xzf - ) <"$tgz"
+          ( cd "$tmp"/* &&
+            cabal configure --enable-tests &&
+            cabal build &&
+            cabal test )
+          cabal install "$@" "$tgz"
+     }'
+     else def_cabal_install_run_tests='cabal_install_run_tests() {
+          cabal install --run-tests "$@" "$1"
+     }'
+     fi
+     export def_cabal_install_run_tests
 
 script:
  - autoreconf -i
@@ -42,12 +64,5 @@ script:
  - cabal check
  - cabal sdist
  - cabal test --show-details=$streaming
- - | # in the future, use '--run-tests' (didn't exist until 1.20)
-     cabal install --force-reinstalls dist/*-*.tar.gz
-     mkdir install-tmp
-     cd install-tmp
-     tar xzf ../dist/*-*.tar.gz
-     cd *-*
-     cabal configure --enable-tests
-     cabal build
-     cabal test
+ - eval "$def_cabal_install_run_tests" &&
+   cabal_install_run_tests --force-reinstalls dist/*-*.tar.gz



More information about the ghc-commits mailing list