Skip to content

Commit

Permalink
Merge pull request #144 from haskellari/ghc-9.10
Browse files Browse the repository at this point in the history
Support GHC-9.10
  • Loading branch information
phadej authored Aug 2, 2024
2 parents 3ac2949 + c9823de commit 9fc1895
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 60 deletions.
75 changes: 30 additions & 45 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.17.20231110
# version: 0.19.20240708
#
# REGENDATA ("0.17.20231110",["github","cabal.project"])
# REGENDATA ("0.19.20240708",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -27,7 +27,7 @@ jobs:
timeout-minutes:
60
container:
image: buildpack-deps:bionic
image: buildpack-deps:jammy
services:
postgres:
image: postgres:14
Expand All @@ -38,14 +38,19 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.8.1
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.8.1
compilerVersion: 9.10.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.3
- compiler: ghc-9.8.2
compilerKind: ghc
compilerVersion: 9.6.3
compilerVersion: 9.8.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.6
compilerKind: ghc
compilerVersion: 9.6.6
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
Expand All @@ -71,34 +76,24 @@ jobs:
- compiler: ghc-8.8.4
compilerKind: ghc
compilerVersion: 8.8.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.5
compilerKind: ghc
compilerVersion: 8.6.5
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
fail-fast: false
steps:
- name: apt
run: |
apt-get update
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.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.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.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.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
mkdir -p "$HOME/.ghcup/bin"
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"
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -110,22 +105,13 @@ jobs:
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$HCKIND/$HCVER
if [ "${{ matrix.setup-method }}" = ghcup ]; then
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"
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.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
fi
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.12.1.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"
Expand Down Expand Up @@ -182,7 +168,7 @@ jobs:
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: source
- name: initial cabal.project for sdist
Expand All @@ -209,17 +195,16 @@ jobs:
echo "package postgresql-simple" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
allow-newer: cryptohash-md5-0.11.100.1:base
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(postgresql-simple)$/; }' >> cabal.project.local
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(postgresql-simple)$/; }' >> 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: restore cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
Expand Down Expand Up @@ -249,7 +234,7 @@ jobs:
rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: save cache
uses: actions/cache/save@v3
uses: actions/cache/save@v4
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, windows-latest]
ghc: ['8.10','9.0','9.2','9.4.8','9.6.3','9.8.1']
ghc: ['9.4.8','9.6.6','9.8.2','9.10.1']
fail-fast: false
timeout-minutes:
60
Expand All @@ -26,24 +26,24 @@ jobs:
- name: Set up Haskell
id: setup-haskell
uses: haskell/actions/setup@v2
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.10.2.0'
cabal-version: '3.12.1.0'

- name: Set up PostgreSQL
uses: ikalnytskyi/action-setup-postgres@v3
uses: ikalnytskyi/action-setup-postgres@v6
id: postgres
with:
username: ci
password: sw0rdfish
database: test

- name: Checkout
uses: actions/checkout@v3.0.2
uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v2.1.3
uses: actions/cache@v4
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
Expand Down
2 changes: 0 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
packages: .
tests: true

allow-newer: cryptohash-md5-0.11.100.1:base
15 changes: 8 additions & 7 deletions postgresql-simple.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 1.12
name: postgresql-simple
version: 0.7.0.0
x-revision: 1
x-revision: 2
synopsis: Mid-Level PostgreSQL client library
description:
Mid-Level PostgreSQL client library, forked from mysql-simple.
Expand Down Expand Up @@ -30,8 +30,9 @@ tested-with:
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.3
|| ==9.8.1
|| ==9.6.6
|| ==9.8.2
|| ==9.10.1

library
default-language: Haskell2010
Expand Down Expand Up @@ -77,10 +78,10 @@ library

-- GHC bundled libs
build-depends:
base >=4.12.0.0 && <4.20
base >=4.12.0.0 && <4.21
, bytestring >=0.10.8.2 && <0.13
, containers >=0.6.0.1 && <0.7
, template-haskell >=2.14.0.0 && <2.22
, containers >=0.6.0.1 && <0.8
, template-haskell >=2.14.0.0 && <2.23
, text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
, time-compat >=1.9.5 && <1.12
, transformers >=0.5.6.2 && <0.7
Expand All @@ -90,7 +91,7 @@ library
aeson >=2.1.2.1 && <2.3
, attoparsec >=0.14.4 && <0.15
, case-insensitive >=1.2.1.0 && <1.3
, hashable >=1.4.3.0 && <1.5
, hashable >=1.4.3.0 && <1.6
, Only >=0.1 && <0.1.1
, postgresql-libpq >=0.10.0.0 && <0.11
, scientific >=0.3.7.0 && <0.4
Expand Down

0 comments on commit 9fc1895

Please sign in to comment.