Skip to content

Commit

Permalink
allow base-4.19, text-2.1, tasty-1.5 and test on GHC 9.8
Browse files Browse the repository at this point in the history
  • Loading branch information
byorgey committed Feb 6, 2024
1 parent d7c62c9 commit 3c15e30
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 22 deletions.
41 changes: 24 additions & 17 deletions .github/workflows/haskell-ci.yml
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.16.3
# version: 0.17.20240109
#
# REGENDATA ("0.16.3",["github","diagrams-haddock.cabal"])
# REGENDATA ("0.17.20240109",["github","diagrams-haddock.cabal"])
#
name: Haskell-CI
on:
Expand All @@ -28,19 +28,24 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.6.1
- compiler: ghc-9.8.1
compilerKind: ghc
compilerVersion: 9.6.1
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.2.7
- compiler: ghc-9.4.8
compilerKind: ghc
compilerVersion: 9.2.7
compilerVersion: 9.4.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.8
compilerKind: ghc
compilerVersion: 9.2.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.0.2
Expand Down Expand Up @@ -76,18 +81,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 @@ -101,17 +106,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
10 changes: 5 additions & 5 deletions diagrams-haddock.cabal
Expand Up @@ -26,7 +26,7 @@ build-type: Simple
cabal-version: 1.18
extra-source-files: README.md, diagrams/*.svg
extra-doc-files: diagrams/*.svg, CHANGES.md
tested-with: GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.7 || ==9.4.5 || ==9.6.1
tested-with: GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1

Source-repository head
type: git
Expand All @@ -35,7 +35,7 @@ Source-repository head
library
exposed-modules: Diagrams.Haddock
other-modules: Paths_diagrams_haddock
build-depends: base >= 4.4 && < 4.19,
build-depends: base >= 4.4 && < 4.20,
filepath >= 1.4 && < 1.5,
directory >= 1.3 && < 1.4,
mtl >= 2.0 && < 2.4,
Expand All @@ -54,7 +54,7 @@ library
cpphs >= 1.15 && < 1.21,
unliftio >= 0.2.12 && < 0.3,
uniplate >= 1.6 && < 1.7,
text >= 0.11 && < 2.1,
text >= 0.11 && < 2.2,
base64-bytestring >= 1 && < 1.3,
ansi-terminal >= 0.5 && < 1.1
hs-source-dirs: src
Expand All @@ -64,7 +64,7 @@ library
Executable diagrams-haddock
main-is: diagrams-haddock.hs
other-modules: Paths_diagrams_haddock
build-depends: base >= 4.4 && < 4.19,
build-depends: base >= 4.4 && < 4.20,
directory >= 1.3 && < 1.4,
filepath >= 1.4 && < 1.5,
diagrams-haddock,
Expand All @@ -80,7 +80,7 @@ Test-suite diagrams-haddock-tests
build-depends: base,
containers >= 0.4 && < 0.7,
QuickCheck >= 2.4 && < 2.15,
tasty >= 0.8 && < 1.5,
tasty >= 0.8 && < 1.6,
tasty-quickcheck >= 0.8 && < 0.11,
parsec >= 3 && < 3.2,
lens >= 3.8 && < 5.3,
Expand Down

0 comments on commit 3c15e30

Please sign in to comment.