mirror of
https://github.com/polysemy-research/polysemy.git
synced 2024-09-11 10:36:40 +03:00
* Use cabal-doctest - Haskell build tools run in slightly different environments (meaning different package databases are available). - The nixpkgs build for polysemy-plugin is failing due to a missing package database, which causes the doctest to fail (more information here: https://github.com/NixOS/nixpkgs/issues/71164). - By using cabal-doctest we can expose the Haskell packages required to the doctests no matter the build tool we're using. * Use cabal-doctest in polysemy, build on GHC 8.8.1 - Use @googleson78 's changes to build polysemy on GHC 8.8.1, with slight modifications. The source distribution is now found in "dist-newstyle/sdist", so we've updated the command to point at that folder. Additionally, cabal v2-install doesn't support installing .tar.gz files in the same way v1-install did, so updated the command to use "cabal v1-install". - Modified polysemy to use "cabal-doctest" and so overcome issues with the doctest tests (see issue #258, PR #265).
39 lines
950 B
YAML
39 lines
950 B
YAML
language: haskell
|
|
dist: trusty
|
|
|
|
cache:
|
|
directories:
|
|
- $HOME/.cabal/store
|
|
|
|
cabal: "3.0"
|
|
|
|
matrix:
|
|
include:
|
|
- ghc: "8.8.1"
|
|
- ghc: "8.6.5"
|
|
- ghc: "8.4.4"
|
|
|
|
install:
|
|
- cabal --version
|
|
- ghc --version
|
|
|
|
script:
|
|
- cabal v2-update
|
|
- cabal v2-build
|
|
- cabal v2-test --enable-test
|
|
# This weird bash stuff is a workaround for haskell/cabal#5977
|
|
- "! cabal new-haddock 2>&1 >/dev/null | grep 'Failed to build documentation'"
|
|
- cabal check
|
|
- cabal sdist # tests that a source-distribution can be generated
|
|
|
|
# Check that the resulting source distribution can be built & installed.
|
|
# If there are no other `.tar.gz` files in `dist`, this can be even simpler:
|
|
# `cabal install --force-reinstalls dist/*-*.tar.gz`
|
|
- SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
|
|
(cd dist-newstyle/sdist && cabal v1-install --force-reinstalls "$SRC_TGZ")
|
|
|
|
|
|
- cabal v2-build polysemy-plugin
|
|
- cabal v2-test --enable-test polysemy-plugin
|
|
|