Skip to content

Commit 27469e6

Browse files
committed
Support GHC-9.12
1 parent 1a97751 commit 27469e6

File tree

3 files changed

+42
-30
lines changed

3 files changed

+42
-30
lines changed

.github/workflows/haskell-ci.yml

+34-22
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# This GitHub workflow config has been generated by a script via
22
#
3-
# haskell-ci 'github' '--config=cabal.haskell-ci' 'lattices.cabal'
3+
# haskell-ci 'github' 'cabal.project'
44
#
55
# To regenerate the script (for example after adjusting tested-with) run
66
#
77
# haskell-ci regenerate
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","--config=cabal.haskell-ci","lattices.cabal"])
13+
# REGENDATA ("0.19.20241223",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -32,19 +32,24 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35+
- compiler: ghc-9.12.1
36+
compilerKind: ghc
37+
compilerVersion: 9.12.1
38+
setup-method: ghcup
39+
allow-failure: false
3540
- compiler: ghc-9.10.1
3641
compilerKind: ghc
3742
compilerVersion: 9.10.1
3843
setup-method: ghcup
3944
allow-failure: false
40-
- compiler: ghc-9.8.2
45+
- compiler: ghc-9.8.4
4146
compilerKind: ghc
42-
compilerVersion: 9.8.2
47+
compilerVersion: 9.8.4
4348
setup-method: ghcup
4449
allow-failure: false
45-
- compiler: ghc-9.6.5
50+
- compiler: ghc-9.6.6
4651
compilerKind: ghc
47-
compilerVersion: 9.6.5
52+
compilerVersion: 9.6.6
4853
setup-method: ghcup
4954
allow-failure: false
5055
- compiler: ghc-9.4.8
@@ -79,15 +84,29 @@ jobs:
7984
allow-failure: false
8085
fail-fast: false
8186
steps:
82-
- name: apt
87+
- name: apt-get install
8388
run: |
8489
apt-get update
8590
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
91+
- name: Install GHCup
92+
run: |
8693
mkdir -p "$HOME/.ghcup/bin"
8794
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
8895
chmod a+x "$HOME/.ghcup/bin/ghcup"
96+
- name: Install cabal-install
97+
run: |
98+
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
99+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
100+
- name: Install GHC (GHCup)
101+
if: matrix.setup-method == 'ghcup'
102+
run: |
89103
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
90-
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
104+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
105+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
106+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
107+
echo "HC=$HC" >> "$GITHUB_ENV"
108+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
109+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
91110
env:
92111
HCKIND: ${{ matrix.compilerKind }}
93112
HCNAME: ${{ matrix.compiler }}
@@ -98,21 +117,12 @@ jobs:
98117
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
99118
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
100119
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
101-
HCDIR=/opt/$HCKIND/$HCVER
102-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
103-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
104-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
105-
echo "HC=$HC" >> "$GITHUB_ENV"
106-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
107-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
108-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
109120
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
110121
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
111122
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
112123
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
113124
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
114125
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
115-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
116126
env:
117127
HCKIND: ${{ matrix.compilerKind }}
118128
HCNAME: ${{ matrix.compiler }}
@@ -155,7 +165,7 @@ jobs:
155165
- name: cache (tools)
156166
uses: actions/cache/restore@v4
157167
with:
158-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-a326b3c0
168+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-91770216
159169
path: ~/.haskell-ci-tools
160170
- name: install cabal-plan
161171
run: |
@@ -180,10 +190,10 @@ jobs:
180190
if [ $((HCNUMVER < 90000)) -ne 0 ] ; then $CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.22.0' ; fi
181191
if [ $((HCNUMVER < 90000)) -ne 0 ] ; then doctest --version ; fi
182192
- name: save cache (tools)
183-
uses: actions/cache/save@v4
184193
if: always()
194+
uses: actions/cache/save@v4
185195
with:
186-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-a326b3c0
196+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-91770216
187197
path: ~/.haskell-ci-tools
188198
- name: checkout
189199
uses: actions/checkout@v4
@@ -213,6 +223,8 @@ jobs:
213223
echo "package lattices" >> cabal.project
214224
echo " ghc-options: -Werror=missing-methods" >> cabal.project
215225
cat >> cabal.project <<EOF
226+
allow-newer: quickcheck-instances-0.3.32:base
227+
allow-newer: these-1.2.1:base
216228
EOF
217229
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(lattices)$/; }' >> cabal.project.local
218230
cat cabal.project
@@ -269,8 +281,8 @@ jobs:
269281
if [ $((HCNUMVER >= 80800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='transformers ^>=0.6' --dependencies-only -j2 all ; fi
270282
if [ $((HCNUMVER >= 80800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='transformers ^>=0.6' all ; fi
271283
- name: save cache
272-
uses: actions/cache/save@v4
273284
if: always()
285+
uses: actions/cache/save@v4
274286
with:
275287
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
276288
path: ~/.cabal/store

cabal.project

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
packages: .
22
tests: true
33

4-
allow-newer: quickcheck-instances-0.3.30:base
5-
allow-newer: quickcheck-instances-0.3.30:containers
6-
allow-newer: these-1.2:base
4+
allow-newer: quickcheck-instances-0.3.32:base
5+
allow-newer: these-1.2.1:base

lattices.cabal

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cabal-version: 1.18
22
name: lattices
33
version: 2.2.1
4-
x-revision: 1
4+
x-revision: 2
55
category: Math
66
license: BSD3
77
license-file: LICENSE
@@ -29,9 +29,10 @@ tested-with:
2929
|| ==9.0.2
3030
|| ==9.2.8
3131
|| ==9.4.8
32-
|| ==9.6.5
33-
|| ==9.8.2
32+
|| ==9.6.6
33+
|| ==9.8.4
3434
|| ==9.10.1
35+
|| ==9.12.1
3536

3637
synopsis:
3738
Fine-grained library for constructing and manipulating lattices
@@ -46,7 +47,7 @@ description:
4647

4748
source-repository head
4849
type: git
49-
location: git://github.com/phadej/lattices.git
50+
location: https://github.com/phadej/lattices.git
5051

5152
library
5253
default-language: Haskell2010
@@ -80,7 +81,7 @@ library
8081
Algebra.PartialOrd.Instances
8182

8283
build-depends:
83-
base >=4.12 && <4.21
84+
base >=4.12 && <4.22
8485
, containers >=0.5.0.0 && <0.8
8586
, deepseq >=1.3.0.0 && <1.6
8687
, hashable >=1.2.7.0 && <1.6

0 commit comments

Comments
 (0)