2014-11-14 00:52:41 +03:00
|
|
|
env:
|
2014-11-18 11:38:35 +03:00
|
|
|
- lower_bound_dependencies=1
|
|
|
|
ghc=7.6.1
|
|
|
|
- lower_bound_dependencies=1
|
|
|
|
ghc=7.8.1
|
|
|
|
- ghc=7.6.1
|
|
|
|
- ghc=7.8.1
|
2014-11-14 00:52:41 +03:00
|
|
|
|
2014-08-03 17:48:18 +04:00
|
|
|
install:
|
2014-11-16 14:07:51 +03:00
|
|
|
# Set up the Shell to treat the semicolon as &&
|
|
|
|
- set -o pipefail && set -e
|
2014-11-18 11:38:35 +03:00
|
|
|
# Install GHC and Cabal
|
2014-11-29 22:28:25 +03:00
|
|
|
-
|
|
|
|
travis_retry sudo add-apt-repository -y ppa:hvr/ghc;
|
|
|
|
travis_retry sudo apt-get update;
|
|
|
|
travis_retry sudo apt-get install cabal-install-1.18 ghc-$ghc;
|
|
|
|
export PATH=/opt/ghc/$ghc/bin:/opt/cabal/1.18/bin:$PATH;
|
|
|
|
# Update the Cabal database
|
2014-11-18 11:38:35 +03:00
|
|
|
- cabal update
|
2014-11-29 22:28:25 +03:00
|
|
|
# Switch to the distro:
|
|
|
|
-
|
|
|
|
export pkg_name=$(cabal info . | awk '{print $2;exit}');
|
|
|
|
cabal sdist;
|
|
|
|
cd dist;
|
|
|
|
tar xzvf $pkg_name.tar.gz;
|
|
|
|
cd $pkg_name;
|
2014-11-16 14:07:51 +03:00
|
|
|
# Install the lower bound dependencies
|
2014-11-29 22:28:25 +03:00
|
|
|
-
|
|
|
|
if [ $lower_bound_dependencies -eq 1 ];
|
2014-11-16 14:07:51 +03:00
|
|
|
then
|
2014-12-15 13:06:11 +03:00
|
|
|
constraint_options=(
|
|
|
|
"--constraint=transformers==0.3.*"
|
|
|
|
"--constraint=text==1.0.*"
|
|
|
|
"--constraint=attoparsec==0.10.*"
|
|
|
|
"--constraint=time==1.4.*"
|
|
|
|
);
|
2014-11-16 14:07:51 +03:00
|
|
|
fi;
|
2014-11-29 22:28:25 +03:00
|
|
|
# Install the "haskell-src-exts" implicit dependency
|
2014-12-15 13:06:11 +03:00
|
|
|
- cabal install -j ${constraint_options[@]} happy
|
|
|
|
# Install the library dependencies
|
|
|
|
- cabal install -j ${constraint_options[@]} --only-dependencies
|
|
|
|
# Build the library
|
|
|
|
- cabal build
|
2014-11-29 22:28:25 +03:00
|
|
|
# Install the remaining dependencies
|
2014-12-15 13:06:11 +03:00
|
|
|
- cabal install -j --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls
|
|
|
|
# Configure and build the remaining stuff
|
2014-11-29 22:28:25 +03:00
|
|
|
- cabal configure --enable-tests --enable-benchmarks && cabal build
|
2014-11-18 11:38:35 +03:00
|
|
|
|
|
|
|
script:
|
2014-11-10 19:37:46 +03:00
|
|
|
- cabal test --show-details=always
|