Skip to content

Commit

Permalink
Merge pull request #102 from haskell-hvr/ghc-9.8
Browse files Browse the repository at this point in the history
Support GHC-9.8
  • Loading branch information
phadej authored Feb 13, 2024
2 parents b42d09e + e3a9a2b commit edeadd7
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 23 deletions.
37 changes: 22 additions & 15 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.16.6
# version: 0.18
#
# REGENDATA ("0.16.6",["github","cabal.project"])
# REGENDATA ("0.18",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -32,14 +32,19 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.6.2
- compiler: ghc-9.8.1
compilerKind: ghc
compilerVersion: 9.6.2
compilerVersion: 9.8.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.5
- compiler: ghc-9.6.4
compilerKind: ghc
compilerVersion: 9.4.5
compilerVersion: 9.6.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
compilerKind: ghc
compilerVersion: 9.4.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.8
Expand Down Expand Up @@ -85,18 +90,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.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$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.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.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.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
env:
HCKIND: ${{ matrix.compilerKind }}
Expand All @@ -110,17 +115,19 @@ jobs:
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$HCKIND/$HCVER
if [ "${{ matrix.setup-method }}" = ghcup ]; then
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
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.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.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.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.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
17 changes: 9 additions & 8 deletions cabal-plan.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 2.2
name: cabal-plan
version: 0.7.3.0
x-revision: 2
x-revision: 3

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

tested-with:
GHC==9.6.2,
GHC==9.4.5,
GHC==9.8.1,
GHC==9.6.4,
GHC==9.4.8,
GHC==9.2.8,
GHC==9.0.2,
GHC==8.10.7,
Expand Down Expand Up @@ -78,11 +79,11 @@ 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 || ^>=4.18.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 || ^>=4.19.0.0
, aeson ^>= 2.0.0.0 || ^>=2.1.0.0 || ^>=2.2.0.0
, bytestring ^>= 0.10.8.0 || ^>=0.11.1.0
, bytestring ^>= 0.10.8.0 || ^>=0.11.1.0 || ^>=0.12.0.0
, containers ^>= 0.5.10 || ^>= 0.6.0.1
, text ^>= 1.2.3 || ^>=2.0.1
, text ^>= 1.2.3 || ^>=2.0.1 || ^>=2.1
, directory ^>= 1.3.0.2
, filepath ^>= 1.4.1.2
, base16-bytestring ^>= 1.0.0.0
Expand Down Expand Up @@ -115,7 +116,7 @@ executable cabal-plan
-- dependencies which require version bounds
build-depends: mtl ^>= 2.2.2 || ^>=2.3.1
, async ^>= 2.2.2
, ansi-terminal ^>= 0.11 || ^>=1.0
, ansi-terminal ^>= 0.11 || ^>=1.0 || ^>=1.1
, base-compat ^>= 0.13.0
, optics-core ^>= 0.4
, optparse-applicative ^>=0.17.0.0 || ^>=0.18.1.0
Expand All @@ -131,7 +132,7 @@ executable cabal-plan
if flag(license-report)
build-depends: Cabal-syntax ^>=3.10.1.0
, cabal-install-parsers ^>=0.6
, tar ^>= 0.5.1.0
, tar ^>= 0.5.1.0 || ^>=0.6.1.0
, zlib ^>= 0.6.2
, filepath ^>= 1.4.1.1

Expand Down

0 comments on commit edeadd7

Please sign in to comment.