Skip to content

Commit

Permalink
Merge pull request #93 from haskell-hvr/ghc-9.6
Browse files Browse the repository at this point in the history
Allow building with GHC-9.6
  • Loading branch information
phadej authored Apr 6, 2023
2 parents b7bf174 + 9372e29 commit 65d68fc
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 29 deletions.
47 changes: 30 additions & 17 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.15.20220808
# version: 0.15.20230321
#
# REGENDATA ("0.15.20220808",["github","cabal.project"])
# REGENDATA ("0.15.20230321",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -32,14 +32,19 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.4.1
- compiler: ghc-9.6.1
compilerKind: ghc
compilerVersion: 9.4.1
compilerVersion: 9.6.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.4
- compiler: ghc-9.4.4
compilerKind: ghc
compilerVersion: 9.2.4
compilerVersion: 9.4.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.7
compilerKind: ghc
compilerVersion: 9.2.7
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.0.2
Expand Down Expand Up @@ -80,18 +85,18 @@ jobs:
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
if [ "${{ matrix.setup-method }}" = ghcup ]; then
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
else
apt-add-repository -y 'ppa:hvr/ghc'
apt-get update
apt-get install -y "$HCNAME"
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
env:
HCKIND: ${{ matrix.compilerKind }}
Expand All @@ -109,13 +114,13 @@ jobs:
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
else
HC=$HCDIR/bin/$HCKIND
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
fi
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
Expand Down Expand Up @@ -174,7 +179,7 @@ jobs:
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: source
- name: initial cabal.project for sdist
Expand All @@ -201,16 +206,18 @@ jobs:
echo "package cabal-plan" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
allow-newer: cabal-install-parsers-0.6.1:base
allow-newer: cabal-install-parsers-0.6.1:transformers
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(Cabal|cabal-plan)$/; }' >> cabal.project.local
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(Cabal|Cabal-syntax|cabal-plan)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
- name: dump install plan
run: |
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
cabal-plan
- name: cache
uses: actions/cache@v2
- name: restore cache
uses: actions/cache/restore@v3
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
Expand All @@ -231,8 +238,14 @@ jobs:
${CABAL} -vnormal check
- name: haddock
run: |
$CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
- name: unconstrained build
run: |
rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: save cache
uses: actions/cache/save@v3
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
23 changes: 12 additions & 11 deletions cabal-plan.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.2
name: cabal-plan
version: 0.7.2.3
version: 0.7.2.4

synopsis: Library and utility for processing cabal's plan.json file
description: {
Expand Down Expand Up @@ -38,8 +38,9 @@ category: Development
build-type: Simple

tested-with:
GHC==9.4.1,
GHC==9.2.4,
GHC==9.6.1,
GHC==9.4.4,
GHC==9.2.7,
GHC==9.0.2,
GHC==8.10.7,
GHC==8.8.4,
Expand Down Expand Up @@ -76,7 +77,7 @@ library
RecordWildCards
exposed-modules: Cabal.Plan

build-depends: base ^>= 4.10.0.0 || ^>=4.11.0.0 || ^>=4.12.0.0 || ^>=4.13.0.0 || ^>=4.14.0.0 || ^>=4.15.0.0 || ^>=4.16.0.0 || ^>=4.17.0.0
build-depends: base ^>= 4.10.0.0 || ^>=4.11.0.0 || ^>=4.12.0.0 || ^>=4.13.0.0 || ^>=4.14.0.0 || ^>=4.15.0.0 || ^>=4.16.0.0 || ^>=4.17.0.0 || ^>=4.18.0.0
, aeson ^>= 2.0.0.0 || ^>=2.1.0.0
, bytestring ^>= 0.10.8.0 || ^>=0.11.1.0
, containers ^>= 0.5.10 || ^>= 0.6.0.1
Expand Down Expand Up @@ -111,24 +112,24 @@ executable cabal-plan
, directory

-- dependencies which require version bounds
build-depends: mtl ^>= 2.2.2
build-depends: mtl ^>= 2.2.2 || ^>=2.3.1
, async ^>= 2.2.2
, ansi-terminal ^>= 0.11
, base-compat ^>= 0.12
, base-compat ^>= 0.13.0
, optics-core ^>= 0.4
, optparse-applicative ^>=0.17.0.0
, parsec ^>= 3.1.13
, process ^>= 1.6.1.0
, semialign ^>= 1.2
, semialign ^>= 1.3
, singleton-bool ^>= 0.1.5
, these ^>= 1.1
, these ^>= 1.2
, topograph ^>= 1.0.0.2
, transformers ^>= 0.5.2.0
, transformers ^>= 0.5.2.0 || ^>=0.6.1.0
, vector ^>= 0.12.0.1 || ^>=0.13.0.0

if flag(license-report)
build-depends: Cabal-syntax ^>=3.8.1.0
, cabal-install-parsers ^>=0.5
build-depends: Cabal-syntax ^>=3.10.1.0
, cabal-install-parsers ^>=0.6
, tar ^>= 0.5.1.0
, zlib ^>= 0.6.2
, filepath ^>= 1.4.1.1
Expand Down
2 changes: 1 addition & 1 deletion cabal.haskell-ci
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
distribution: bionic
branches: master
installed: +all -Cabal
installed: +all -Cabal -Cabal-syntax
3 changes: 3 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ packages: .

package cabal-plan
flags: +exe +license-report +_

allow-newer: cabal-install-parsers-0.6.1:base
allow-newer: cabal-install-parsers-0.6.1:transformers

0 comments on commit 65d68fc

Please sign in to comment.