Skip to content

Commit 55c3fb2

Browse files
authored
Merge pull request #69 from haskellari/ghc-9.12
Support GHC-9.12
2 parents a9122f8 + 1b10f15 commit 55c3fb2

File tree

4 files changed

+40
-27
lines changed

4 files changed

+40
-27
lines changed

.github/workflows/haskell-ci.yml

+29-20
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.19.20240708
11+
# version: 0.19.20241223
1212
#
13-
# REGENDATA ("0.19.20240708",["github","cabal.project"])
13+
# REGENDATA ("0.19.20241223",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -38,19 +38,24 @@ jobs:
3838
strategy:
3939
matrix:
4040
include:
41+
- compiler: ghc-9.12.1
42+
compilerKind: ghc
43+
compilerVersion: 9.12.1
44+
setup-method: ghcup
45+
allow-failure: false
4146
- compiler: ghc-9.10.1
4247
compilerKind: ghc
4348
compilerVersion: 9.10.1
4449
setup-method: ghcup
4550
allow-failure: false
46-
- compiler: ghc-9.8.2
51+
- compiler: ghc-9.8.4
4752
compilerKind: ghc
48-
compilerVersion: 9.8.2
53+
compilerVersion: 9.8.4
4954
setup-method: ghcup
5055
allow-failure: false
51-
- compiler: ghc-9.6.5
56+
- compiler: ghc-9.6.6
5257
compilerKind: ghc
53-
compilerVersion: 9.6.5
58+
compilerVersion: 9.6.6
5459
setup-method: ghcup
5560
allow-failure: false
5661
- compiler: ghc-9.4.8
@@ -85,17 +90,30 @@ jobs:
8590
allow-failure: false
8691
fail-fast: false
8792
steps:
88-
- name: apt
93+
- name: apt-get install
8994
run: |
9095
apt-get update
9196
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
97+
apt-get install -y libpq-dev
98+
- name: Install GHCup
99+
run: |
92100
mkdir -p "$HOME/.ghcup/bin"
93101
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
94102
chmod a+x "$HOME/.ghcup/bin/ghcup"
103+
- name: Install cabal-install
104+
run: |
105+
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
106+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
107+
- name: Install GHC (GHCup)
108+
if: matrix.setup-method == 'ghcup'
109+
run: |
95110
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
96-
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
97-
apt-get update
98-
apt-get install -y libpq-dev
111+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
112+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
113+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
114+
echo "HC=$HC" >> "$GITHUB_ENV"
115+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
116+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
99117
env:
100118
HCKIND: ${{ matrix.compilerKind }}
101119
HCNAME: ${{ matrix.compiler }}
@@ -106,21 +124,12 @@ jobs:
106124
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
107125
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
108126
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
109-
HCDIR=/opt/$HCKIND/$HCVER
110-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
111-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
112-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
113-
echo "HC=$HC" >> "$GITHUB_ENV"
114-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
115-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
116-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
117127
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
118128
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
119129
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
120130
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
121131
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
122132
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
123-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
124133
env:
125134
HCKIND: ${{ matrix.compilerKind }}
126135
HCNAME: ${{ matrix.compiler }}
@@ -261,8 +270,8 @@ jobs:
261270
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='postgresql-libpq +use-pkg-config' --dependencies-only -j2 all
262271
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='postgresql-libpq +use-pkg-config' all
263272
- name: save cache
264-
uses: actions/cache/save@v4
265273
if: always()
274+
uses: actions/cache/save@v4
266275
with:
267276
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
268277
path: ~/.cabal/store

postgresql-libpq-configure/postgresql-libpq-configure.cabal

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ tested-with:
2626
|| ==9.0.2
2727
|| ==9.2.8
2828
|| ==9.4.8
29-
|| ==9.6.5
30-
|| ==9.8.2
29+
|| ==9.6.6
30+
|| ==9.8.4
3131
|| ==9.10.1
32+
|| ==9.12.1
3233

3334
build-type: Configure
3435
extra-source-files:

postgresql-libpq-pkgconfig/postgresql-libpq-pkgconfig.cabal

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ tested-with:
2626
|| ==9.0.2
2727
|| ==9.2.8
2828
|| ==9.4.8
29-
|| ==9.6.5
30-
|| ==9.8.2
29+
|| ==9.6.6
30+
|| ==9.8.4
3131
|| ==9.10.1
32+
|| ==9.12.1
3233

3334
extra-source-files: CHANGELOG.md
3435

postgresql-libpq.cabal

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
cabal-version: 2.4
22
name: postgresql-libpq
33
version: 0.11.0.0
4+
x-revision: 1
45
synopsis: low-level binding to libpq
56
description:
67
This is a binding to libpq: the C application
@@ -30,9 +31,10 @@ tested-with:
3031
|| ==9.0.2
3132
|| ==9.2.8
3233
|| ==9.4.8
33-
|| ==9.6.5
34-
|| ==9.8.2
34+
|| ==9.6.6
35+
|| ==9.8.4
3536
|| ==9.10.1
37+
|| ==9.12.1
3638

3739
extra-source-files: CHANGELOG.md
3840

@@ -71,7 +73,7 @@ library
7173
Database.PostgreSQL.LibPQ.Ptr
7274

7375
build-depends:
74-
, base >=4.12.0.0 && <4.21
76+
, base >=4.12.0.0 && <4.22
7577
, bytestring >=0.10.8.2 && <0.13
7678

7779
if !os(windows)

0 commit comments

Comments
 (0)