Skip to content

Commit 7441ca8

Browse files
authored
Merge pull request #18 from haskellari/ghc-9.2
Allow base-4.16
2 parents 1d1cad7 + c17564c commit 7441ca8

File tree

2 files changed

+106
-30
lines changed

2 files changed

+106
-30
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 101 additions & 26 deletions
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.12
11+
# version: 0.13.20211111
1212
#
13-
# REGENDATA ("0.12",["github","postgresql-libpq.cabal"])
13+
# REGENDATA ("0.13.20211111",["github","postgresql-libpq.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -24,6 +24,8 @@ jobs:
2424
linux:
2525
name: Haskell-CI - Linux - ${{ matrix.compiler }}
2626
runs-on: ubuntu-18.04
27+
timeout-minutes:
28+
60
2729
container:
2830
image: buildpack-deps:bionic
2931
services:
@@ -36,65 +38,133 @@ jobs:
3638
strategy:
3739
matrix:
3840
include:
41+
- compiler: ghc-9.2.1
42+
compilerKind: ghc
43+
compilerVersion: 9.2.1
44+
setup-method: ghcup
45+
allow-failure: false
3946
- compiler: ghc-9.0.1
47+
compilerKind: ghc
48+
compilerVersion: 9.0.1
49+
setup-method: hvr-ppa
4050
allow-failure: false
41-
- compiler: ghc-8.10.4
51+
- compiler: ghc-8.10.7
52+
compilerKind: ghc
53+
compilerVersion: 8.10.7
54+
setup-method: ghcup
4255
allow-failure: false
4356
- compiler: ghc-8.8.4
57+
compilerKind: ghc
58+
compilerVersion: 8.8.4
59+
setup-method: hvr-ppa
4460
allow-failure: false
4561
- compiler: ghc-8.6.5
62+
compilerKind: ghc
63+
compilerVersion: 8.6.5
64+
setup-method: hvr-ppa
4665
allow-failure: false
4766
- compiler: ghc-8.4.4
67+
compilerKind: ghc
68+
compilerVersion: 8.4.4
69+
setup-method: hvr-ppa
4870
allow-failure: false
4971
- compiler: ghc-8.2.2
72+
compilerKind: ghc
73+
compilerVersion: 8.2.2
74+
setup-method: hvr-ppa
5075
allow-failure: false
5176
- compiler: ghc-8.0.2
77+
compilerKind: ghc
78+
compilerVersion: 8.0.2
79+
setup-method: hvr-ppa
5280
allow-failure: false
5381
- compiler: ghc-7.10.3
82+
compilerKind: ghc
83+
compilerVersion: 7.10.3
84+
setup-method: hvr-ppa
5485
allow-failure: false
5586
- compiler: ghc-7.8.4
87+
compilerKind: ghc
88+
compilerVersion: 7.8.4
89+
setup-method: hvr-ppa
5690
allow-failure: false
5791
- compiler: ghc-7.6.3
92+
compilerKind: ghc
93+
compilerVersion: 7.6.3
94+
setup-method: hvr-ppa
5895
allow-failure: false
5996
- compiler: ghc-7.4.2
97+
compilerKind: ghc
98+
compilerVersion: 7.4.2
99+
setup-method: hvr-ppa
60100
allow-failure: false
61101
- compiler: ghc-7.2.2
102+
compilerKind: ghc
103+
compilerVersion: 7.2.2
104+
setup-method: hvr-ppa
62105
allow-failure: false
63106
- compiler: ghc-7.0.4
107+
compilerKind: ghc
108+
compilerVersion: 7.0.4
109+
setup-method: hvr-ppa
64110
allow-failure: false
65111
fail-fast: false
66112
steps:
67113
- name: apt
68114
run: |
69115
apt-get update
70-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common
71-
apt-add-repository -y 'ppa:hvr/ghc'
72-
apt-get update
73-
apt-get install -y $CC cabal-install-3.4
116+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
117+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
118+
mkdir -p "$HOME/.ghcup/bin"
119+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
120+
chmod a+x "$HOME/.ghcup/bin/ghcup"
121+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
122+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
123+
else
124+
apt-add-repository -y 'ppa:hvr/ghc'
125+
apt-get update
126+
apt-get install -y "$HCNAME"
127+
mkdir -p "$HOME/.ghcup/bin"
128+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
129+
chmod a+x "$HOME/.ghcup/bin/ghcup"
130+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
131+
fi
74132
env:
75-
CC: ${{ matrix.compiler }}
133+
HCKIND: ${{ matrix.compilerKind }}
134+
HCNAME: ${{ matrix.compiler }}
135+
HCVER: ${{ matrix.compilerVersion }}
76136
- name: Set PATH and environment variables
77137
run: |
78138
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
79-
echo "LANG=C.UTF-8" >> $GITHUB_ENV
80-
echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV
81-
echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV
82-
HCDIR=$(echo "/opt/$CC" | sed 's/-/\//')
83-
HCNAME=ghc
84-
HC=$HCDIR/bin/$HCNAME
85-
echo "HC=$HC" >> $GITHUB_ENV
86-
echo "HCPKG=$HCDIR/bin/$HCNAME-pkg" >> $GITHUB_ENV
87-
echo "HADDOCK=$HCDIR/bin/haddock" >> $GITHUB_ENV
88-
echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
139+
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
140+
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
141+
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
142+
HCDIR=/opt/$HCKIND/$HCVER
143+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
144+
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
145+
echo "HC=$HC" >> "$GITHUB_ENV"
146+
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
147+
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
148+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
149+
else
150+
HC=$HCDIR/bin/$HCKIND
151+
echo "HC=$HC" >> "$GITHUB_ENV"
152+
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
153+
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
154+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
155+
fi
156+
89157
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
90-
echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV
91-
echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV
92-
echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV
93-
echo "HEADHACKAGE=false" >> $GITHUB_ENV
94-
echo "ARG_COMPILER=--$HCNAME --with-compiler=$HC" >> $GITHUB_ENV
95-
echo "GHCJSARITH=0" >> $GITHUB_ENV
158+
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
159+
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
160+
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
161+
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
162+
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
163+
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
96164
env:
97-
CC: ${{ matrix.compiler }}
165+
HCKIND: ${{ matrix.compilerKind }}
166+
HCNAME: ${{ matrix.compiler }}
167+
HCVER: ${{ matrix.compilerVersion }}
98168
- name: env
99169
run: |
100170
env
@@ -117,6 +187,10 @@ jobs:
117187
repository hackage.haskell.org
118188
url: http://hackage.haskell.org/
119189
EOF
190+
cat >> $CABAL_CONFIG <<EOF
191+
program-default-options
192+
ghc-options: $GHCJOBS +RTS -M3G -RTS
193+
EOF
120194
cat $CABAL_CONFIG
121195
- name: versions
122196
run: |
@@ -155,7 +229,8 @@ jobs:
155229
- name: generate cabal.project
156230
run: |
157231
PKGDIR_postgresql_libpq="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/postgresql-libpq-[0-9.]*')"
158-
echo "PKGDIR_postgresql_libpq=${PKGDIR_postgresql_libpq}" >> $GITHUB_ENV
232+
echo "PKGDIR_postgresql_libpq=${PKGDIR_postgresql_libpq}" >> "$GITHUB_ENV"
233+
rm -f cabal.project cabal.project.local
159234
touch cabal.project
160235
touch cabal.project.local
161236
echo "packages: ${PKGDIR_postgresql_libpq}" >> cabal.project

postgresql-libpq.cabal

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: postgresql-libpq
22
version: 0.9.4.3
3-
x-revision: 1
3+
x-revision: 2
44
synopsis: low-level binding to libpq
55
description:
66
This is a binding to libpq: the C application
@@ -36,15 +36,16 @@ tested-with:
3636
|| ==8.4.4
3737
|| ==8.6.5
3838
|| ==8.8.4
39-
|| ==8.10.4
39+
|| ==8.10.7
4040
|| ==9.0.1
41+
|| ==9.2.1
4142

4243
extra-source-files: CHANGELOG.md
4344

4445
custom-setup
4546
setup-depends:
4647
base >=4.3 && <5
47-
, Cabal >=1.10 && <3.5
48+
, Cabal >=1.10 && <3.7
4849

4950
-- If true, use pkg-config, otherwise use the pg_config based build
5051
-- configuration
@@ -63,7 +64,7 @@ library
6364

6465
other-modules: Database.PostgreSQL.LibPQ.Compat
6566
build-depends:
66-
base >=4.3 && <4.16
67+
base >=4.3 && <4.17
6768
, bytestring >=0.9.1.0 && <0.12
6869

6970
if !os(windows)

0 commit comments

Comments
 (0)