Skip to content

Commit

Permalink
Merge pull request #103 from haskellari/ghc-9.12
Browse files Browse the repository at this point in the history
Support GHC-9.12
  • Loading branch information
phadej authored Jan 4, 2025
2 parents 92dfa8a + 309d9ba commit b853ddf
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 22 deletions.
49 changes: 30 additions & 19 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.19.20240514
# version: 0.19.20241223
#
# REGENDATA ("0.19.20240514",["github","cabal.project"])
# REGENDATA ("0.19.20241223",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -32,19 +32,24 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.12.1
compilerKind: ghc
compilerVersion: 9.12.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.10.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.8.2
- compiler: ghc-9.8.4
compilerKind: ghc
compilerVersion: 9.8.2
compilerVersion: 9.8.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.5
- compiler: ghc-9.6.6
compilerKind: ghc
compilerVersion: 9.6.5
compilerVersion: 9.6.6
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
Expand Down Expand Up @@ -79,15 +84,29 @@ jobs:
allow-failure: false
fail-fast: false
steps:
- name: apt
- name: apt-get install
run: |
apt-get update
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
- name: Install GHCup
run: |
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
- name: Install cabal-install
run: |
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
- name: Install GHC (GHCup)
if: matrix.setup-method == 'ghcup'
run: |
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
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=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -98,21 +117,12 @@ jobs:
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$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=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand Down Expand Up @@ -189,6 +199,7 @@ jobs:
echo "package quickcheck-instances" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
allow-newer: these:base
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(quickcheck-instances)$/; }' >> cabal.project.local
cat cabal.project
Expand Down Expand Up @@ -251,8 +262,8 @@ jobs:
if [ $((HCNUMVER < 80800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='QuickCheck ==2.14.2' --constraint='array ==0.5.3.0' --constraint='base ==4.12.0.0' --constraint='bytestring ==0.10.8.2' --constraint='case-insensitive ==1.2.0.11' --constraint='containers ==0.6.0.1' --constraint='hashable ==1.4.4.0' --constraint='old-time ==1.1.0.0' --constraint='OneTuple ==0.4.2' --constraint='scientific ==0.3.8.0' --constraint='primitive ==0.9.0.0' --constraint='strict ==0.5' --constraint='tagged ==0.8.8' --constraint='text ==1.2.3.0' --constraint='these ==1.2.1' --constraint='transformers ==0.5.6.2' --constraint='unordered-containers ==0.2.20' --constraint='uuid-types ==1.0.6' --constraint='vector ==0.13.1.0' --dependencies-only -j2 all ; fi
if [ $((HCNUMVER < 80800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='QuickCheck ==2.14.2' --constraint='array ==0.5.3.0' --constraint='base ==4.12.0.0' --constraint='bytestring ==0.10.8.2' --constraint='case-insensitive ==1.2.0.11' --constraint='containers ==0.6.0.1' --constraint='hashable ==1.4.4.0' --constraint='old-time ==1.1.0.0' --constraint='OneTuple ==0.4.2' --constraint='scientific ==0.3.8.0' --constraint='primitive ==0.9.0.0' --constraint='strict ==0.5' --constraint='tagged ==0.8.8' --constraint='text ==1.2.3.0' --constraint='these ==1.2.1' --constraint='transformers ==0.5.6.2' --constraint='unordered-containers ==0.2.20' --constraint='uuid-types ==1.0.6' --constraint='vector ==0.13.1.0' all ; fi
- name: save cache
uses: actions/cache/save@v4
if: always()
uses: actions/cache/save@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
2 changes: 2 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
packages: .

allow-newer: these:base
8 changes: 5 additions & 3 deletions quickcheck-instances.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
cabal-version: 2.2
name: quickcheck-instances
version: 0.3.32
x-revision: 1
synopsis: Common quickcheck instances
description:
QuickCheck instances.
Expand Down Expand Up @@ -33,9 +34,10 @@ tested-with:
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.5
|| ==9.8.2
|| ==9.6.6
|| ==9.8.4
|| ==9.10.1
|| ==9.12.1

source-repository head
type: git
Expand Down Expand Up @@ -79,7 +81,7 @@ library
other-modules: Test.QuickCheck.Instances.CustomPrelude
hs-source-dirs: src
build-depends:
, base >=4.12.0.0 && <4.21
, base >=4.12.0.0 && <4.22
, QuickCheck >=2.14.2 && <2.15.1
, splitmix >=0.1.0.5 && <0.2

Expand Down

0 comments on commit b853ddf

Please sign in to comment.