Skip to content

Commit 906be60

Browse files
authored
Merge pull request #45 from haskellari/ghc-9.12
Support GHC-9.12
2 parents 6ef2865 + 950261b commit 906be60

File tree

3 files changed

+38
-25
lines changed

3 files changed

+38
-25
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 31 additions & 20 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.19.20240512
11+
# version: 0.19.20241220
1212
#
13-
# REGENDATA ("0.19.20240512",["github","integer-logarithms.cabal"])
13+
# REGENDATA ("0.19.20241220",["github","integer-logarithms.cabal"])
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.4
50+
- compiler: ghc-9.6.6
4651
compilerKind: ghc
47-
compilerVersion: 9.6.4
52+
compilerVersion: 9.6.6
4853
setup-method: ghcup
4954
allow-failure: false
5055
- compiler: ghc-9.4.8
@@ -79,15 +84,30 @@ 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"
87-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
94+
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 (prerelease)
97+
run: |
98+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
99+
"$HOME/.ghcup/bin/ghcup" install cabal 3.15.0.0.2024.10.3 || (cat "$HOME"/.ghcup/logs/*.* && false)
100+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.15.0.0.2024.10.3 -vnormal+nowrap" >> "$GITHUB_ENV"
101+
- name: Install GHC (GHCup)
102+
if: matrix.setup-method == 'ghcup'
103+
run: |
89104
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
90-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
105+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
106+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
107+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
108+
echo "HC=$HC" >> "$GITHUB_ENV"
109+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
110+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
91111
env:
92112
HCKIND: ${{ matrix.compilerKind }}
93113
HCNAME: ${{ matrix.compiler }}
@@ -98,21 +118,12 @@ jobs:
98118
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
99119
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
100120
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.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
109121
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
110122
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
111123
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
112124
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
113125
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
114126
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
115-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
116127
env:
117128
HCKIND: ${{ matrix.compilerKind }}
118129
HCNAME: ${{ matrix.compiler }}
@@ -190,7 +201,7 @@ jobs:
190201
echo " ghc-options: -Werror=missing-methods" >> cabal.project
191202
cat >> cabal.project <<EOF
192203
EOF
193-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(integer-logarithms)$/; }' >> cabal.project.local
204+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(integer-logarithms)$/; }' >> cabal.project.local
194205
cat cabal.project
195206
cat cabal.project.local
196207
- name: dump install plan
@@ -237,8 +248,8 @@ jobs:
237248
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='integer-logarithms +check-bounds' --dependencies-only -j2 all
238249
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='integer-logarithms +check-bounds' all
239250
- name: save cache
240-
uses: actions/cache/save@v4
241251
if: always()
252+
uses: actions/cache/save@v4
242253
with:
243254
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
244255
path: ~/.cabal/store

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
-----
33

44
- Drop support for GHCs prior 8.6.5
5+
- GHC-9.12 support
56

67
1.0.3.1
78
-------

integer-logarithms.cabal

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ tested-with:
2929
|| ==9.0.2
3030
|| ==9.2.8
3131
|| ==9.4.8
32-
|| ==9.6.4
33-
|| ==9.8.2
32+
|| ==9.6.6
33+
|| ==9.8.4
3434
|| ==9.10.1
35+
|| ==9.12.1
3536

3637
extra-source-files:
3738
changelog.md
@@ -52,8 +53,8 @@ library
5253
hs-source-dirs: src
5354
build-depends:
5455
array >=0.5.3.0 && <0.6
55-
, base >=4.12.0.0 && <4.21
56-
, ghc-prim <0.12
56+
, base >=4.12.0.0 && <4.22
57+
, ghc-prim <0.14
5758

5859
if !impl(ghc >=7.10)
5960
build-depends: nats >=1.1.2 && <1.2
@@ -116,7 +117,7 @@ test-suite spec
116117
, smallcheck >=1.2 && <1.3
117118
, tasty >=1.4 && <1.6
118119
, tasty-hunit >=0.10 && <0.11
119-
, tasty-quickcheck >=0.10 && <0.11
120+
, tasty-quickcheck >=0.10 && <0.12
120121
, tasty-smallcheck >=0.8 && <0.9
121122

122123
other-modules:

0 commit comments

Comments
 (0)