hasql/.travis.yml

59 lines
1.7 KiB
YAML
Raw Normal View History

env:
2015-12-06 08:16:13 +03:00
- ghc=7.6.1 cabal=1.18 lower_bound_dependencies=1
- ghc=7.8.1 cabal=1.18
2016-07-22 10:49:20 +03:00
- ghc=7.10.1 cabal=1.22
- ghc=8.0.1 cabal=1.24 benchmarks=1 tests=1
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
2015-03-30 08:06:08 +03:00
-
ghc=${ghc=7.10.1};
cabal=${cabal=1.22};
2014-11-29 22:28:25 +03:00
travis_retry sudo add-apt-repository -y ppa:hvr/ghc;
travis_retry sudo apt-get update;
2015-03-30 08:06:08 +03:00
travis_retry sudo apt-get install cabal-install-$cabal ghc-$ghc;
export PATH=/opt/ghc/$ghc/bin:/opt/cabal/$cabal/bin:$PATH;
2014-11-29 22:28:25 +03:00
# 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
-
2015-03-30 08:06:08 +03:00
if [ "$lower_bound_dependencies" = "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=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
2015-03-30 08:06:08 +03:00
- cabal install happy --reorder-goals --force-reinstalls ${constraint_options[@]}
2014-12-15 13:06:11 +03:00
# Install the library dependencies
2015-03-30 08:06:08 +03:00
- cabal install --only-dependencies --reorder-goals --force-reinstalls
${constraint_options[@]}
$([ "$tests" = "1" ] && echo "--enable-tests")
$([ "$benchmarks" = "1" ] && echo "--enable-benchmarks")
2014-12-15 13:06:11 +03:00
# Build the library
- cabal build
# Configure and build the remaining stuff
2015-03-30 08:06:08 +03:00
- cabal configure
$([ "$tests" = "1" ] && echo "--enable-tests")
$([ "$benchmarks" = "1" ] && echo "--enable-benchmarks")
-f doctest
- cabal build
2014-11-18 11:38:35 +03:00
script:
2015-03-30 08:06:08 +03:00
- |
if [ "$tests" = "1" ];
then
2015-08-10 08:16:43 +03:00
cabal clean;
2015-03-30 08:06:08 +03:00
cabal test --show-details=always;
fi;