hasql/.travis.yml

54 lines
1.4 KiB
YAML
Raw Normal View History

env:
2019-02-13 13:53:48 +03:00
- ghc=8.0.2
- ghc=8.2.2
- ghc=8.4.3
- ghc=8.6.3 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
-
2019-02-13 13:53:48 +03:00
cabal=${cabal=2.4};
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=(
);
2014-11-16 14:07:51 +03:00
fi;
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;