Skip to content

Commit

Permalink
Use packcheck 0.7.0, update CIs
Browse files Browse the repository at this point in the history
  • Loading branch information
harendra-kumar committed Dec 18, 2023
1 parent a243497 commit 0589e70
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 74 deletions.
129 changes: 62 additions & 67 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# packcheck-0.6.0
# packcheck-0.7.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.
Expand Down Expand Up @@ -28,6 +28,9 @@ jobs:
# Common options
# ------------------------------------------------------------------------
# GHC_OPTIONS: "-Werror"
GHCUP_VERSION: 0.1.20.0
DOCSPEC_URL: https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20210111/cabal-docspec-0.0.0.20210111.xz
DOCSPEC_OPTIONS: "--timeout 60"
CABAL_REINIT_CONFIG: y
LC_ALL: C.UTF-8

Expand All @@ -36,9 +39,9 @@ jobs:
CABAL_CHECK_RELAX: y
CABAL_HACKAGE_MIRROR: hackage.haskell.org:http://hackage.fpcomplete.com

PACKCHECK_LOCAL_PATH: "./packcheck.sh"
PACKCHECK: "./packcheck.sh"
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
PACKCHECK_GITHUB_COMMIT: "v0.6.0"
PACKCHECK_GITHUB_COMMIT: "v0.7.0"

BUILD: ${{ matrix.build }}
GHCVER: ${{ matrix.ghc_version }}
Expand All @@ -48,9 +51,9 @@ jobs:
#DISABLE_DOCS: ${{ matrix.disable_docs }}
#DISABLE_SDIST_BUILD: ${{ matrix.disable_sdist_build }}
#DISABLE_SDIST_BUILD: "y"
HLINT_VERSION: 3.6.1
HLINT_OPTIONS: ${{ matrix.hlint_options }}
HLINT_TARGETS: ${{ matrix.hlint_targets }}
DOCTEST: ${{ matrix.doctest }}

runs-on: ${{ matrix.runner }}
strategy:
Expand All @@ -60,122 +63,114 @@ jobs:

- name: 9.8.1-Werror
ghc_version: 9.8.1
build: cabal-v2
build: cabal
runner: ubuntu-latest
cabal-version: 3.10.1.0
cabal-version: 3.10.2.0
cabal_project: cabal.project.d/master-Werror

- name: 9.8.1-doctest
runner: ubuntu-latest
ghc_version: 9.8.1
build: cabal
cabal-version: 3.10.2.0
cabal_project: cabal.project.d/master
disable_test: "y"
disable_bench: "y"
disable_docs: "y"
disable_sdist_build: "y"
enable_docspec: "y"

- name: hlint
build: hlint
hlint_options: "lint"
hlint_targets: "src test Benchmark"
runner: ubuntu-latest
cabal-version: 3.2
cabal_project: cabal.project.d/master

- name: 9.6.3-macos
ghc_version: 9.6.3
build: cabal-v2
runner: macos-latest
ghc_version: 9.6.3
build: cabal
cabal-version: 3.10.1.0
cabal_project: cabal.project.d/master

- name: 9.4.4-streamly-0.9.0
ghc_version: 9.4.4
build: cabal-v2
runner: ubuntu-latest
ghc_version: 9.4.4
build: cabal
cabal-version: 3.8.1.0
cabal_project: cabal.project.d/streamly-0.9.0

- name: 9.4.4-streamly-0.10.0
ghc_version: 9.4.4
build: cabal-v2
runner: ubuntu-latest
ghc_version: 9.4.4
build: cabal
cabal-version: 3.8.1.0
cabal_project: cabal.project.d/streamly-0.10.0

- name: 9.2.7+fusion-plugin
ghc_version: 9.2.7
build: cabal-v2
runner: ubuntu-latest
cabal-build-options: --flag fusion-plugin
ghc_version: 9.2.7
build: cabal
cabal-version: 3.6
cabal_project: cabal.project.d/master

- name: 9.0.2+doctest
ghc_version: 9.0.2
build: cabal-v2
runner: ubuntu-latest
cabal-version: 3.2
doctest: "y"
cabal_project: cabal.project.d/master
cabal-build-options: --flag fusion-plugin

- name: 8.10.7+macOS
ghc_version: 8.10.7
build: cabal-v2
runner: macos-latest
ghc_version: 8.10.7
build: cabal
cabal-version: 3.2
cabal_project: cabal.project.d/master

- name: 8.8.4
ghc_version: 8.8.4
build: cabal-v2
runner: ubuntu-latest
ghc_version: 8.8.4
build: cabal
cabal-version: 3.2
cabal_project: cabal.project.d/master

- name: 8.6.5
ghc_version: 8.6.5
build: cabal-v2
runner: ubuntu-latest
cabal-version: 3.2
cabal_project: cabal.project.d/master

- name: hlint
ghc_version: 8.10.7
build: cabal-v2
hlint_options: "lint"
hlint_targets: "src test Benchmark"
runner: ubuntu-latest
ghc_version: 8.6.5
build: cabal
cabal-version: 3.2
cabal_project: cabal.project.d/master

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
name: Restore cache
with:
path: |
~/.local
~/.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
#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
if test ! -e "$PACKCHECK"
then
if test -z "$PACKCHECK_GITHUB_COMMIT"
then
die "PACKCHECK_GITHUB_COMMIT is not specified."
fi
PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
curl --fail -sL -o "$PACKCHECK" $PACKCHECK_URL || exit 1
chmod +x $PACKCHECK
elif test ! -x "$PACKCHECK"
then
chmod +x $PACKCHECK
fi
- 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.d/master
$HOME/.cabal/bin/cabal-docspec --version
$HOME/.cabal/bin/cabal-docspec --timeout 60
else
bash -c "$PACKCHECK_LOCAL_PATH $BUILD"
fi
bash -c "$PACKCHECK $BUILD"
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# packcheck-0.6.0
# packcheck-0.7.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.
Expand Down Expand Up @@ -35,7 +35,7 @@ environment:
# version.
#STACKVER: "1.6.5"
STACK_UPGRADE: "y"
RESOLVER: "lts-20.14"
RESOLVER: "lts-22.0"
STACK_ROOT: "c:\\sr"
STACK_YAML: "stack.yaml"

Expand All @@ -62,7 +62,7 @@ environment:
# If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH
# then it is automatically pulled from this URL.
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
PACKCHECK_GITHUB_COMMIT: "v0.6.0"
PACKCHECK_GITHUB_COMMIT: "v0.7.0"

# Override the temp directory to avoid sed escaping issues
# See https://github.com/haskell/cabal/issues/5386
Expand Down
8 changes: 4 additions & 4 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
resolver: lts-20.14
resolver: lts-22.0
packages:
- '.'
extra-deps:
- streamly-core-0.1.0
- streamly-0.9.0
- fusion-plugin-0.2.6
#- streamly-core-0.1.0
#- streamly-0.9.0
#- fusion-plugin-0.2.6

#- github: composewell/streamly
# commit: "9596aea3ab33d3c2fa513247fcfe8604bd7ff454"
Expand Down

0 comments on commit 0589e70

Please sign in to comment.