Skip to content

Commit 3c42022

Browse files
committed
Test with GHC-9.14-alpha1
1 parent 0c03ab4 commit 3c42022

File tree

6 files changed

+77
-44
lines changed

6 files changed

+77
-44
lines changed

.github/workflows/haskell-ci-bench.yml

Lines changed: 24 additions & 18 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.20241109
11+
# version: 0.19.20250821
1212
#
13-
# REGENDATA ("0.19.20241109",["github","--project","cabal.bench.project","-o",".github/workflows/haskell-ci-bench.yml","--github-action-name","Benchmarks"])
13+
# REGENDATA ("0.19.20250821",["github","--project","cabal.bench.project","-o",".github/workflows/haskell-ci-bench.yml","--github-action-name","Benchmarks"])
1414
#
1515
name: Benchmarks
1616
on:
@@ -23,7 +23,7 @@ on:
2323
jobs:
2424
linux:
2525
name: Benchmarks - Linux - ${{ matrix.compiler }}
26-
runs-on: ubuntu-20.04
26+
runs-on: ubuntu-24.04
2727
timeout-minutes:
2828
60
2929
container:
@@ -49,16 +49,29 @@ jobs:
4949
allow-failure: false
5050
fail-fast: false
5151
steps:
52-
- name: apt
52+
- name: apt-get install
5353
run: |
5454
apt-get update
5555
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
56+
- name: Install GHCup
57+
run: |
5658
mkdir -p "$HOME/.ghcup/bin"
57-
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
59+
curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
5860
chmod a+x "$HOME/.ghcup/bin/ghcup"
59-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
61+
- name: Install cabal-install
62+
run: |
63+
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
64+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
65+
- name: Install GHC (GHCup)
66+
if: matrix.setup-method == 'ghcup'
67+
run: |
6068
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
61-
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
69+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
70+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
71+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
72+
echo "HC=$HC" >> "$GITHUB_ENV"
73+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
74+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
6275
env:
6376
HCKIND: ${{ matrix.compilerKind }}
6477
HCNAME: ${{ matrix.compiler }}
@@ -69,21 +82,12 @@ jobs:
6982
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
7083
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
7184
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
72-
HCDIR=/opt/$HCKIND/$HCVER
73-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
74-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
75-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
76-
echo "HC=$HC" >> "$GITHUB_ENV"
77-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
78-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
79-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
8085
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
8186
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
8287
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
8388
echo "ARG_BENCH=--disable-benchmarks" >> "$GITHUB_ENV"
8489
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
8590
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
86-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
8791
env:
8892
HCKIND: ${{ matrix.compilerKind }}
8993
HCNAME: ${{ matrix.compiler }}
@@ -158,7 +162,9 @@ jobs:
158162
touch cabal.project.local
159163
echo "packages: ${PKGDIR_hashable_bench}" >> cabal.project
160164
echo "package hashable-bench" >> cabal.project
161-
echo " ghc-options: -Werror=missing-methods" >> cabal.project
165+
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
166+
echo "package hashable-bench" >> cabal.project
167+
echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project
162168
cat >> cabal.project <<EOF
163169
EOF
164170
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(hashable-bench)$/; }' >> cabal.project.local
@@ -217,8 +223,8 @@ jobs:
217223
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='hashable +random-initial-seed' --dependencies-only -j2 all
218224
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='hashable +random-initial-seed' all
219225
- name: save cache
220-
uses: actions/cache/save@v4
221226
if: always()
227+
uses: actions/cache/save@v4
222228
with:
223229
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
224230
path: ~/.cabal/store

.github/workflows/haskell-ci.yml

Lines changed: 38 additions & 15 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.20241219
11+
# version: 0.19.20250821
1212
#
13-
# REGENDATA ("0.19.20241219",["github","cabal.project"])
13+
# REGENDATA ("0.19.20250821",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -23,7 +23,7 @@ on:
2323
jobs:
2424
linux:
2525
name: Haskell-CI - Linux - ${{ matrix.compiler }}
26-
runs-on: ubuntu-20.04
26+
runs-on: ubuntu-24.04
2727
timeout-minutes:
2828
60
2929
container:
@@ -32,14 +32,19 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35-
- compiler: ghc-9.12.1
35+
- compiler: ghc-9.14.0.20250819
3636
compilerKind: ghc
37-
compilerVersion: 9.12.1
37+
compilerVersion: 9.14.0.20250819
38+
setup-method: ghcup-prerelease
39+
allow-failure: false
40+
- compiler: ghc-9.12.2
41+
compilerKind: ghc
42+
compilerVersion: 9.12.2
3843
setup-method: ghcup
3944
allow-failure: false
40-
- compiler: ghc-9.10.1
45+
- compiler: ghc-9.10.2
4146
compilerKind: ghc
42-
compilerVersion: 9.10.1
47+
compilerVersion: 9.10.2
4348
setup-method: ghcup
4449
allow-failure: false
4550
- compiler: ghc-9.8.3
@@ -66,13 +71,12 @@ jobs:
6671
- name: Install GHCup
6772
run: |
6873
mkdir -p "$HOME/.ghcup/bin"
69-
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
74+
curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
7075
chmod a+x "$HOME/.ghcup/bin/ghcup"
71-
- name: Install cabal-install (prerelease)
76+
- name: Install cabal-install
7277
run: |
73-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
74-
"$HOME/.ghcup/bin/ghcup" install cabal 3.15.0.0.2024.10.3 || (cat "$HOME"/.ghcup/logs/*.* && false)
75-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.15.0.0.2024.10.3 -vnormal+nowrap" >> "$GITHUB_ENV"
78+
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
79+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
7680
- name: Install GHC (GHCup)
7781
if: matrix.setup-method == 'ghcup'
7882
run: |
@@ -90,7 +94,22 @@ jobs:
9094
- name: Install GHC (GHCup vanilla)
9195
if: matrix.setup-method == 'ghcup-vanilla'
9296
run: |
93-
"$HOME/.ghcup/bin/ghcup" -s https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-vanilla-0.0.8.yaml install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
97+
"$HOME/.ghcup/bin/ghcup" -s https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-vanilla-0.0.9.yaml install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
98+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
99+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
100+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
101+
echo "HC=$HC" >> "$GITHUB_ENV"
102+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
103+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
104+
env:
105+
HCKIND: ${{ matrix.compilerKind }}
106+
HCNAME: ${{ matrix.compiler }}
107+
HCVER: ${{ matrix.compilerVersion }}
108+
- name: Install GHC (GHCup prerelease)
109+
if: matrix.setup-method == 'ghcup-prerelease'
110+
run: |
111+
"$HOME/.ghcup/bin/ghcup" config add-release-channel prereleases
112+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
94113
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
95114
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
96115
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
@@ -187,9 +206,13 @@ jobs:
187206
touch cabal.project.local
188207
echo "packages: ${PKGDIR_hashable}" >> cabal.project
189208
echo "package hashable" >> cabal.project
190-
echo " ghc-options: -Werror=missing-methods" >> cabal.project
209+
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
210+
echo "package hashable" >> cabal.project
211+
echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project
191212
cat >> cabal.project <<EOF
192-
allow-newer: splitmix-0.1.0.5:base
213+
allow-newer: splitmix-0.1.3.1:base
214+
allow-newer: primitive-0.9.1.0:base
215+
allow-newer: tagged-0.8.9:template-haskell
193216
EOF
194217
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(hashable)$/; }' >> cabal.project.local
195218
cat cabal.project

cabal.haskell-ci

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ constraint-set filepath-1.5
1717
constraints: filepath ^>=1.5.2.0
1818
tests: True
1919
run-tests: True
20+
21+
-- TODO
22+
error-unused-packages: False

cabal.project

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
packages: .
22
tests: True
33

4-
allow-newer: splitmix-0.1.0.5:base
4+
allow-newer: splitmix-0.1.3.1:base
5+
allow-newer: primitive-0.9.1.0:base
6+
allow-newer: tagged-0.8.9:template-haskell
57

68
--
79
-- allow-newer: base

hashable.cabal

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ stability: Provisional
3232
category: Data
3333
build-type: Simple
3434
tested-with:
35-
GHC ==9.6.5 || ==9.8.2 || ==9.8.3 || ==9.10.1 || ==9.12.1
35+
GHC ==9.6.5 || ==9.8.2 || ==9.8.3 || ==9.10.2 || ==9.12.2 || ==9.14.1
3636

3737
extra-source-files:
3838
CHANGES.md
@@ -83,13 +83,15 @@ library
8383

8484
hs-source-dirs: src
8585
build-depends:
86-
, base >=4.18.0.0 && <4.22
86+
, base >=4.18.0.0 && <4.23
8787
, bytestring >=0.11.5.3 && <0.13
88-
, containers >=0.6.7 && <0.8
88+
, containers >=0.6.7 && <0.9
8989
, deepseq >=1.4.8.1 && <1.6
90-
, ghc-prim
9190
, text >=2.0.2 && <2.2
9291

92+
if impl(ghc <9.8)
93+
build-depends: ghc-prim
94+
9395
-- depend on os-string on newer GHCs only.
9496
-- os-string has tight lower bound on bytestring, which prevents
9597
-- using bundled version on older GHCs.
@@ -99,9 +101,6 @@ library
99101
-- therefore there is else-branch with stricter upper bound.
100102
build-depends: filepath >=1.4.200.1 && <1.6
101103

102-
-- Integer internals
103-
build-depends: ghc-bignum >=1.3 && <1.4
104-
105104
if (flag(random-initial-seed) && impl(ghc))
106105
cpp-options: -DHASHABLE_RANDOM_SEED=1
107106

@@ -154,9 +153,7 @@ test-suite hashable-tests
154153
, filepath
155154
, ghc-prim
156155
, hashable
157-
, HUnit
158156
, QuickCheck >=2.15
159-
, random >=1.0 && <1.3
160157
, tasty ^>=1.5
161158
, tasty-hunit ^>=0.10.1
162159
, tasty-quickcheck ^>=0.10.3 || ^>=0.11
@@ -166,7 +163,6 @@ test-suite hashable-tests
166163
build-depends: os-string
167164

168165
if !os(windows)
169-
build-depends: unix
170166
cpp-options: -DHAVE_MMAP
171167
other-modules: Regress.Mmap
172168
other-extensions: CApiFFI

src/Data/Hashable/Class.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ import Data.Hashable.XXH3
170170

171171
#include "MachDeps.h"
172172

173+
-- sometimes we need dependency of filepath, sometimes we dont
174+
import System.FilePath ()
175+
173176
infixl 0 `hashWithSalt`
174177

175178
------------------------------------------------------------------------

0 commit comments

Comments
 (0)