[commit: packages/directory] master: Update `.travis.yml` for new test system (eaf7236)
git at git.haskell.org
git at git.haskell.org
Thu Mar 19 11:38:18 UTC 2015
Repository : ssh://git@git.haskell.org/directory
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/eaf72360d99cb99b864af271d49b631f08877cf9/directory
>---------------------------------------------------------------
commit eaf72360d99cb99b864af271d49b631f08877cf9
Author: Phil Ruffwind <rf at rufflewind.com>
Date: Tue Mar 3 02:23:00 2015 -0500
Update `.travis.yml` for new test system
Travis CI will now run the entire test suite using the GHC test
framework. Tweaks were made to work around missing features in older
versions of Cabal.
>---------------------------------------------------------------
eaf72360d99cb99b864af271d49b631f08877cf9
.travis.yml | 34 +++++++++++++++++++++++-----------
1 file changed, 23 insertions(+), 11 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 05ed4e4..bc3fe44 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,6 @@
+# we want to use our custom environment, but the Travis YAML validator
+# requires this field to be specified, so we'll just use 'c'
+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
@@ -20,22 +23,31 @@ before_install:
install:
- travis_retry cabal update
- - cabal install --only-dependencies
+ - cabal install --enable-tests --only-dependencies
- ghc --version
+before_script:
+ - | # check if 'streaming' is supported (didn't exist until 1.20)
+ if cabal 2>&1 test --show-details=streaming __dummy |
+ grep >/dev/null 2>&1 "cabal: --show-details flag expects"
+ then streaming=always
+ else streaming=streaming
+ fi
+ export streaming
+
script:
- autoreconf -i
- cabal configure -v2 --enable-tests
- cabal build
- cabal check
- cabal sdist
- - cabal test
-# The following scriptlet checks that the resulting source distribution can be built & installed
- - export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ;
- cd dist/;
- if [ -f "$SRC_TGZ" ]; then
- cabal install --force-reinstalls "$SRC_TGZ";
- else
- echo "expected '$SRC_TGZ' not found";
- exit 1;
- fi
+ - 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
More information about the ghc-commits
mailing list