hasql/.travis.yml

63 lines
1.5 KiB
YAML
Raw Normal View History

2019-11-07 00:15:04 +03:00
if: tag IS blank
env:
2019-11-07 00:15:04 +03:00
- ghc=8.4.2
2021-03-23 15:06:42 +03:00
- ghc=8.6.1
- ghc=8.8.1
2021-03-23 15:35:48 +03:00
- ghc=8.10.2 benchmarks=1 tests=1
- ghc=9.0.1
matrix:
allow_failures:
- ghc=9.0.1
2019-11-07 00:15:04 +03:00
services:
- postgresql
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 &&
2021-03-23 15:06:42 +03:00
- set -eo pipefail
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
2021-03-23 15:06:42 +03:00
- cabal v1-install --only-dependencies --reorder-goals --force-reinstalls
2015-03-30 08:06:08 +03:00
${constraint_options[@]}
$([ "$tests" = "1" ] && echo "--enable-tests")
$([ "$benchmarks" = "1" ] && echo "--enable-benchmarks")
2014-12-15 13:06:11 +03:00
# Build the library
2021-03-23 15:06:42 +03:00
- cabal v1-build
2014-12-15 13:06:11 +03:00
# Configure and build the remaining stuff
2021-03-23 15:06:42 +03:00
- cabal v1-configure
2015-03-30 08:06:08 +03:00
$([ "$tests" = "1" ] && echo "--enable-tests")
$([ "$benchmarks" = "1" ] && echo "--enable-benchmarks")
-f doctest
2021-03-23 15:06:42 +03:00
- cabal v1-build
2014-11-18 11:38:35 +03:00
script:
2015-03-30 08:06:08 +03:00
- |
if [ "$tests" = "1" ];
then
2021-03-23 15:06:42 +03:00
cabal v1-test --show-details=always;
2015-03-30 08:06:08 +03:00
fi;