Skip to content

Commit 3d543b6

Browse files
Merge pull request #632 from NixOS/ghc-9.10
distribution-nixpkgs: adjust test suite for Cabal 3.12
2 parents b5e2ba8 + f572903 commit 3d543b6

File tree

7 files changed

+67
-27
lines changed

7 files changed

+67
-27
lines changed

.github/workflows/haskell-ci.yml

+49-21
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.20240501
11+
# version: 0.19.20241121
1212
#
13-
# REGENDATA ("0.19.20240501",["--branches","master","--github-patches",".github/workflows/ci-skip-package-map.patch","--doctest","--doctest-options=-i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen","--doctest-jobs=>= 8.8 && < 9.4","github","cabal.project"])
13+
# REGENDATA ("0.19.20241121",["--branches","master","--github-patches",".github/workflows/ci-skip-package-map.patch","--doctest","--doctest-options=-i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen","--doctest-jobs=>= 8.8 && < 9.4","github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -32,9 +32,19 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35-
- compiler: ghc-9.6.5
35+
- compiler: ghc-9.10.1
3636
compilerKind: ghc
37-
compilerVersion: 9.6.5
37+
compilerVersion: 9.10.1
38+
setup-method: ghcup
39+
allow-failure: false
40+
- compiler: ghc-9.8.3
41+
compilerKind: ghc
42+
compilerVersion: 9.8.3
43+
setup-method: ghcup-vanilla
44+
allow-failure: false
45+
- compiler: ghc-9.6.6
46+
compilerKind: ghc
47+
compilerVersion: 9.6.6
3848
setup-method: ghcup
3949
allow-failure: false
4050
- compiler: ghc-9.4.8
@@ -59,41 +69,59 @@ jobs:
5969
allow-failure: false
6070
fail-fast: false
6171
steps:
62-
- name: apt
72+
- name: apt-get install
6373
run: |
6474
apt-get update
6575
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
76+
- name: Install GHCup
77+
run: |
6678
mkdir -p "$HOME/.ghcup/bin"
67-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
79+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
6880
chmod a+x "$HOME/.ghcup/bin/ghcup"
69-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
81+
- name: Install cabal-install
82+
run: |
83+
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
84+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
85+
- name: Install GHC (GHCup)
86+
if: matrix.setup-method == 'ghcup'
87+
run: |
7088
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
71-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
89+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
90+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
91+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
92+
echo "HC=$HC" >> "$GITHUB_ENV"
93+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
94+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
7295
env:
7396
HCKIND: ${{ matrix.compilerKind }}
7497
HCNAME: ${{ matrix.compiler }}
7598
HCVER: ${{ matrix.compilerVersion }}
76-
- name: Set PATH and environment variables
99+
- name: Install GHC (GHCup vanilla)
100+
if: matrix.setup-method == 'ghcup-vanilla'
77101
run: |
78-
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=/opt/$HCKIND/$HCVER
102+
"$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)
83103
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
84104
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
85105
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
86106
echo "HC=$HC" >> "$GITHUB_ENV"
87107
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
88108
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
89-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
109+
env:
110+
HCKIND: ${{ matrix.compilerKind }}
111+
HCNAME: ${{ matrix.compiler }}
112+
HCVER: ${{ matrix.compilerVersion }}
113+
- name: Set PATH and environment variables
114+
run: |
115+
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
116+
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
117+
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
118+
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
90119
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
91120
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
92121
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
93122
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
94123
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
95124
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
96-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
97125
env:
98126
HCKIND: ${{ matrix.compilerKind }}
99127
HCNAME: ${{ matrix.compiler }}
@@ -136,7 +164,7 @@ jobs:
136164
- name: cache (tools)
137165
uses: actions/cache/restore@v4
138166
with:
139-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-dd324315
167+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-fb82843d
140168
path: ~/.haskell-ci-tools
141169
- name: install cabal-plan
142170
run: |
@@ -152,10 +180,10 @@ jobs:
152180
if [ $((HCNUMVER < 90400)) -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
153181
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then doctest --version ; fi
154182
- name: save cache (tools)
155-
uses: actions/cache/save@v4
156183
if: always()
184+
uses: actions/cache/save@v4
157185
with:
158-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-dd324315
186+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-fb82843d
159187
path: ~/.haskell-ci-tools
160188
- name: checkout
161189
uses: actions/checkout@v4
@@ -204,7 +232,7 @@ jobs:
204232
echo " ghc-options: -Werror=missing-methods" >> cabal.project
205233
cat >> cabal.project <<EOF
206234
EOF
207-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(cabal2nix|distribution-nixpkgs|hackage-db|language-nix)$/; }' >> cabal.project.local
235+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(cabal2nix|distribution-nixpkgs|hackage-db|language-nix)$/; }' >> cabal.project.local
208236
cat cabal.project
209237
cat cabal.project.local
210238
- name: dump install plan
@@ -258,8 +286,8 @@ jobs:
258286
rm -f cabal.project.local
259287
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
260288
- name: save cache
261-
uses: actions/cache/save@v4
262289
if: always()
290+
uses: actions/cache/save@v4
263291
with:
264292
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
265293
path: ~/.cabal/store

cabal2nix/cabal2nix.cabal

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ author: Peter Simons <[email protected]>
1212
-- list all contributors: git log --pretty='%an' | sort | uniq
1313
maintainer: sternenseemann <[email protected]>
1414
stability: stable
15-
tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.5
15+
tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.6 || == 9.8.3 || == 9.10.1
1616
category: Distribution, Nix
1717
homepage: https://github.com/nixos/cabal2nix#readme
1818
bug-reports: https://github.com/nixos/cabal2nix/issues
@@ -48,7 +48,7 @@ library
4848
Distribution.Nixpkgs.Haskell.Platform
4949
other-modules: Paths_cabal2nix
5050
hs-source-dirs: src
51-
build-depends: base > 4.11
51+
build-depends: base > 4.11 && <5
5252
-- When changing the Cabal version, ensure that it builds
5353
-- with all installation methods mentioned in the README!
5454
, Cabal >= 3.0

distribution-nixpkgs/distribution-nixpkgs.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ license: BSD3
66
license-file: LICENSE
77
author: Peter Simons <[email protected]>
88
maintainer: sternenseemann <[email protected]>
9-
tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.5
9+
tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.6 || == 9.8.3 || == 9.10.1
1010
category: Distribution, Nix
1111
homepage: https://github.com/NixOS/cabal2nix/tree/master/distribution-nixpkgs#readme
1212
bug-reports: https://github.com/NixOS/cabal2nix/issues
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
["aarch64-darwin","aarch64-genode","aarch64-linux","aarch64-netbsd","aarch64-none","aarch64_be-none","arm-none","armv5tel-linux","armv6l-linux","armv6l-netbsd","armv6l-none","armv7a-darwin","armv7a-linux","armv7a-netbsd","armv7l-linux","armv7l-netbsd","avr-none","i686-cygwin","i686-darwin","i686-freebsd","i686-genode","i686-linux","i686-netbsd","i686-none","i686-openbsd","i686-windows","javascript-ghcjs","loongarch64-linux","m68k-linux","m68k-netbsd","m68k-none","microblaze-linux","microblaze-none","microblazeel-linux","microblazeel-none","mips-linux","mips-none","mips64-linux","mips64-none","mips64el-linux","mipsel-linux","mipsel-netbsd","mmix-mmixware","msp430-none","or1k-none","powerpc-netbsd","powerpc-none","powerpc64-linux","powerpc64le-linux","powerpcle-none","riscv32-linux","riscv32-netbsd","riscv32-none","riscv64-linux","riscv64-netbsd","riscv64-none","rx-none","s390-linux","s390-none","s390x-linux","s390x-none","vc4-none","wasm32-wasi","wasm64-wasi","x86_64-cygwin","x86_64-darwin","x86_64-freebsd","x86_64-genode","x86_64-linux","x86_64-netbsd","x86_64-none","x86_64-openbsd","x86_64-redox","x86_64-solaris","x86_64-windows"]
1+
["aarch64-darwin","aarch64-genode","aarch64-linux","aarch64-netbsd","aarch64-none","aarch64_be-none","arm-none","armv5tel-linux","armv6l-linux","armv6l-netbsd","armv6l-none","armv7a-darwin","armv7a-linux","armv7a-netbsd","armv7l-linux","armv7l-netbsd","avr-none","i686-cygwin","i686-darwin","i686-freebsd","i686-genode","i686-linux","i686-netbsd","i686-none","i686-openbsd","i686-windows","javascript-ghcjs","loongarch64-linux","m68k-linux","m68k-netbsd","m68k-none","microblaze-linux","microblaze-none","microblazeel-linux","microblazeel-none","mips-linux","mips-none","mips64-linux","mips64-none","mips64el-linux","mipsel-linux","mipsel-netbsd","mmix-mmixware","msp430-none","or1k-none","powerpc-netbsd","powerpc-none","powerpc64-linux","powerpc64le-linux","powerpcle-none","riscv32-linux","riscv32-netbsd","riscv32-none","riscv64-linux","riscv64-netbsd","riscv64-none","rx-none","s390-linux","s390-none","s390x-linux","s390x-none","vc4-none","wasm32-none","wasm32-wasi","wasm64-wasi","x86_64-cygwin","x86_64-darwin","x86_64-freebsd","x86_64-genode","x86_64-linux","x86_64-netbsd","x86_64-none","x86_64-openbsd","x86_64-redox","x86_64-solaris","x86_64-windows"]

distribution-nixpkgs/test/hspec.hs

+12
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ nixpkgsSystemMapping =
7676
, ("i686-openbsd", Platform I386 OpenBSD)
7777
, ("i686-windows", Platform I386 Windows)
7878
, ("javascript-ghcjs", Platform JavaScript Ghcjs)
79+
#if MIN_VERSION_Cabal(3,12,0)
80+
, ("loongarch64-linux", Platform LoongArch64 Linux)
81+
#else
7982
, ("loongarch64-linux", Platform (OtherArch "loongarch64") Linux)
83+
#endif
8084
, ("m68k-linux", Platform M68k Linux)
8185
, ("m68k-netbsd", Platform M68k NetBSD)
8286
, ("m68k-none", Platform M68k (OtherOS "none"))
@@ -102,9 +106,15 @@ nixpkgsSystemMapping =
102106
, ("riscv32-linux", Platform (OtherArch "riscv32") Linux)
103107
, ("riscv32-netbsd", Platform (OtherArch "riscv32") NetBSD)
104108
, ("riscv32-none", Platform (OtherArch "riscv32") (OtherOS "none"))
109+
#if MIN_VERSION_Cabal(3,12,0)
110+
, ("riscv64-linux", Platform RISCV64 Linux)
111+
, ("riscv64-netbsd", Platform RISCV64 NetBSD)
112+
, ("riscv64-none", Platform RISCV64 (OtherOS "none"))
113+
#else
105114
, ("riscv64-linux", Platform (OtherArch "riscv64") Linux)
106115
, ("riscv64-netbsd", Platform (OtherArch "riscv64") NetBSD)
107116
, ("riscv64-none", Platform (OtherArch "riscv64") (OtherOS "none"))
117+
#endif
108118
, ("rx-none", Platform (OtherArch "rx") (OtherOS "none"))
109119
, ("s390-linux", Platform S390 Linux)
110120
, ("s390-none", Platform S390 (OtherOS "none"))
@@ -117,9 +127,11 @@ nixpkgsSystemMapping =
117127
#endif
118128
, ("vc4-none", Platform (OtherArch "vc4") (OtherOS "none"))
119129
#if MIN_VERSION_Cabal(3,8,1)
130+
, ("wasm32-none", Platform Wasm32 (OtherOS "none"))
120131
, ("wasm32-wasi", Platform Wasm32 Wasi)
121132
, ("wasm64-wasi", Platform (OtherArch "wasm64") Wasi)
122133
#else
134+
, ("wasm32-none", Platform (OtherArch "wasm32") (OtherOS "none"))
123135
, ("wasm32-wasi", Platform (OtherArch "wasm32") (OtherOS "wasi"))
124136
, ("wasm64-wasi", Platform (OtherArch "wasm64") (OtherOS "wasi"))
125137
#endif

hackage-db/hackage-db.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license: BSD3
99
license-file: LICENSE
1010
author: Peter Simons, Alexander Altman, Ben James, Kevin Quick
1111
maintainer: sternenseemann <[email protected]>
12-
tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.5
12+
tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.6 || == 9.8.3 || == 9.10.1
1313
category: Distribution
1414
homepage: https://github.com/NixOS/cabal2nix/tree/master/hackage-db#readme
1515
bug-reports: https://github.com/NixOS/cabal2nix/issues

language-nix/language-nix.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license: BSD3
77
license-file: LICENSE
88
author: Peter Simons
99
maintainer: [email protected]
10-
tested-with: GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.8, GHC == 9.4.8, GHC == 9.6.5
10+
tested-with: GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.8, GHC == 9.4.8, GHC == 9.6.6 || == 9.8.3 || == 9.10.1
1111
category: Distribution, Language, Nix
1212
homepage: https://github.com/NixOS/cabal2nix/tree/master/language-nix#readme
1313
bug-reports: https://github.com/NixOS/cabal2nix/issues

0 commit comments

Comments
 (0)