Allow streamly-core 0.3 #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# packcheck-0.6.0 | |
# You can use any of the options supported by packcheck as environment | |
# variables here. See https://github.com/composewell/packcheck for all | |
# options and their explanation. | |
name: packcheck | |
#----------------------------------------------------------------------------- | |
# Events on which the build should be triggered | |
#----------------------------------------------------------------------------- | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
#----------------------------------------------------------------------------- | |
# Build matrix | |
#----------------------------------------------------------------------------- | |
jobs: | |
build: | |
name: ${{ matrix.name }} | |
env: | |
# ------------------------------------------------------------------------ | |
# Common options | |
# ------------------------------------------------------------------------ | |
# GHC_OPTIONS: "-Werror" | |
CABAL_REINIT_CONFIG: y | |
LC_ALL: C.UTF-8 | |
STACK_UPGRADE: "y" | |
CABAL_CHECK_RELAX: y | |
CABAL_HACKAGE_MIRROR: hackage.haskell.org:http://hackage.fpcomplete.com | |
PACKCHECK_LOCAL_PATH: "./packcheck.sh" | |
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck" | |
PACKCHECK_GITHUB_COMMIT: "v0.6.0" | |
BUILD: ${{ matrix.build }} | |
GHCVER: ${{ matrix.ghc_version }} | |
#RESOLVER: ${{ matrix.resolver }} | |
#CABAL_BUILD_OPTIONS: ${{ matrix.cabal_build_options }} | |
CABAL_PROJECT: ${{ matrix.cabal_project }} | |
#DISABLE_DOCS: ${{ matrix.disable_docs }} | |
#DISABLE_SDIST_BUILD: ${{ matrix.disable_sdist_build }} | |
#DISABLE_SDIST_BUILD: "y" | |
HLINT_OPTIONS: ${{ matrix.hlint_options }} | |
HLINT_TARGETS: ${{ matrix.hlint_targets }} | |
DOCTEST: ${{ matrix.doctest }} | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: doctest | |
ghc_version: 9.2.2 | |
build: cabal-v2 | |
runner: ubuntu-latest | |
cabal-version: 3.6 | |
doctest: "y" | |
cabal_project: cabal.project.user | |
- name: 9.4.2 | |
ghc_version: 9.4.2 | |
build: cabal-v2 | |
runner: ubuntu-latest | |
cabal-version: 3.8.1.0 | |
cabal_project: cabal.project.user | |
pack_options: >- | |
DISABLE_BENCH=y | |
- name: 9.2.2 | |
ghc_version: 9.2.2 | |
build: cabal-v2 | |
runner: ubuntu-latest | |
cabal-version: 3.6 | |
cabal_project: cabal.project.user | |
- name: 9.0.1 | |
ghc_version: 9.0.1 | |
build: cabal-v2 | |
runner: ubuntu-latest | |
cabal-version: 3.2 | |
cabal_project: cabal.project.user | |
- name: 8.10.7+sdist # sdist with cabal.project | |
ghc_version: 8.10.7 | |
build: cabal-v2 | |
runner: ubuntu-latest | |
cabal-version: 3.2 | |
cabal_project: cabal.project.user | |
- name: 8.10.7+Werror | |
ghc_version: 8.10.7 | |
build: cabal-v2 | |
cabal_project: cabal.project.Werror | |
runner: ubuntu-latest | |
cabal-version: 3.2 | |
- name: 8.10.7+macOS | |
ghc_version: 8.10.7 | |
build: cabal-v2 | |
runner: macos-latest | |
cabal-version: 3.2 | |
cabal_project: cabal.project.user | |
- name: 8.8.4 | |
ghc_version: 8.8.4 | |
build: cabal-v2 | |
runner: ubuntu-latest | |
cabal-version: 3.2 | |
cabal_project: cabal.project.user | |
- name: 8.6.5 | |
ghc_version: 8.6.5 | |
build: cabal-v2 | |
runner: ubuntu-latest | |
cabal-version: 3.2 | |
cabal_project: cabal.project.user | |
- name: hlint | |
ghc_version: 8.10.7 | |
build: cabal-v2 | |
hlint_options: "lint" | |
hlint_targets: "src test Benchmark" | |
runner: ubuntu-latest | |
cabal-version: 3.2 | |
cabal_project: cabal.project.user | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: haskell/actions/setup@v1 | |
with: | |
ghc-version: ${{ matrix.ghc_version }} | |
- uses: actions/cache@v1 | |
name: Restore cache ~/.cabal, ~/.stack, .stack-work, ~/.ghc, ~/.local | |
with: | |
path: | | |
~/.cabal | |
~/.stack | |
.stack-work | |
~/.ghc | |
~/.local | |
key: ${{ runner.os }}-${{ matrix.name }} | |
- name: Download packcheck | |
run: | | |
# If a custom stack-yaml is specified, replace the default with that | |
if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi | |
unset STACK_YAML | |
# Get packcheck if needed | |
CURL=$(which curl) | |
PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh | |
if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi; | |
chmod +x $PACKCHECK_LOCAL_PATH | |
- name: Run packcheck | |
run: | | |
if test -n "$DOCTEST" | |
then | |
mkdir -p $HOME/.cabal/bin | |
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20210111/cabal-docspec-0.0.0.20210111.xz > cabal-docspec.xz | |
echo '0829bd034fba901cbcfe491d98ed8b28fd54f9cb5c91fa8e1ac62dc4413c9562 cabal-docspec.xz' | sha256sum -c - | |
xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec | |
rm -f cabal-docspec.xz | |
chmod a+x $HOME/.cabal/bin/cabal-docspec | |
cabal update | |
cabal build all --project-file cabal.project.user | |
$HOME/.cabal/bin/cabal-docspec --version | |
$HOME/.cabal/bin/cabal-docspec --timeout 60 | |
else | |
bash -c "$PACKCHECK_LOCAL_PATH $BUILD" | |
fi |