Skip to content

Commit

Permalink
Merge pull request #98 from alaendle/feature/ghc-9.8
Browse files Browse the repository at this point in the history
Support ghc 9.8.
  • Loading branch information
maoe authored Nov 12, 2023
2 parents e9a9600 + 335a6dd commit 4873a3a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 25 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.5
# version: 0.17.20231110
#
# REGENDATA ("0.16.5",["github","influxdb.cabal"])
# REGENDATA ("0.17.20231110",["github","influxdb.cabal"])
#
name: Haskell-CI
on:
Expand All @@ -33,14 +33,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.3
compilerKind: ghc
compilerVersion: 9.4.5
compilerVersion: 9.6.3
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.7
compilerKind: ghc
compilerVersion: 9.4.7
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.8
Expand Down Expand Up @@ -81,18 +86,18 @@ jobs:
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git socat 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 @@ -109,17 +114,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
22 changes: 12 additions & 10 deletions influxdb.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ tested-with:
GHC == 8.10.7
GHC == 9.0.2
GHC == 9.2.8
GHC == 9.4.5
GHC == 9.6.2
GHC == 9.4.7
GHC == 9.6.3
GHC == 9.8.1

extra-source-files:
README.md
Expand Down Expand Up @@ -79,12 +80,13 @@ library
ViewPatterns
ghc-options: -Wall
build-depends:
base >= 4.11 && < 4.19
, aeson >= 0.7 && < 2.2
base >= 4.11 && < 4.20
, aeson >= 0.7 && < 2.3
, attoparsec < 0.15
, bytestring >= 0.10 && < 0.12
, attoparsec-aeson >= 2.1 && < 2.3
, bytestring >= 0.10 && < 0.13
, clock >= 0.7 && < 0.9
, containers >= 0.5 && < 0.7
, containers >= 0.5 && < 0.8
, foldl < 1.5
, http-client >= 0.5 && < 0.8
, http-types >= 0.8.6 && < 0.13
Expand All @@ -93,7 +95,7 @@ library
, optional-args >= 1.0 && < 1.1
, scientific >= 0.3.3 && < 0.4
, tagged >= 0.1 && < 0.9
, text < 2.1
, text < 2.2
, time >= 1.5 && < 1.14
, unordered-containers < 0.3
, vector >= 0.10 && < 0.14
Expand All @@ -105,9 +107,9 @@ test-suite doctests
main-is: doctests.hs
build-depends:
base
, doctest >= 0.11.3 && < 0.22
, doctest >= 0.11.3 && < 0.23
, influxdb
, template-haskell < 2.21
, template-haskell < 2.22
ghc-options: -Wall -threaded
hs-source-dirs: tests
default-language: Haskell2010
Expand All @@ -120,7 +122,7 @@ test-suite regressions
, containers
, influxdb
, lens
, tasty < 1.5
, tasty < 1.6
, tasty-hunit < 1.11
, time
, raw-strings-qq >= 1.1 && < 1.2
Expand Down

0 comments on commit 4873a3a

Please sign in to comment.