Skip to content

Commit

Permalink
Additionally test cabal2nix using GHC 9.4.4
Browse files Browse the repository at this point in the history
We were also waiting on support in haskell-ci here. In nixpkgs this has
been working for a long time. I don't know what the situation is with
9.6.1 at the moment, but I expect some dependencies do not work yet.

doctest is disable for >= 9.4. It breaks in a way similar to
sol/doctest#327, but I haven't been able to
find a workaround.
  • Loading branch information
sternenseemann committed Apr 11, 2023
1 parent e221f5e commit 1ba9608
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 28 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci-skip-package-map.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml
index 7fca651d..c2b799c0 100644
index 939508f1..6d33cb2f 100644
--- a/.github/workflows/haskell-ci.yml
+++ b/.github/workflows/haskell-ci.yml
@@ -253,7 +253,7 @@ jobs:
cd ${PKGDIR_language_nix} || false
doctest -i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen -XHaskell2010 src
cd ${PKGDIR_distribution_nixpkgs} || false
- doctest -i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen -XHaskell2010 src
+ find src -type f -and -not -name 'PackageMap.hs' | xargs doctest -i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen -XHaskell2010
cd ${PKGDIR_hackage_db} || false
doctest -i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen -XHaskell2010 src
- name: hlint
@@ -251,7 +251,7 @@ jobs:
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then cd ${PKGDIR_cabal2nix} || false ; fi
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then doctest -i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen -XHaskell2010 src ; fi
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then cd ${PKGDIR_distribution_nixpkgs} || false ; fi
- if [ $((HCNUMVER < 90400)) -ne 0 ] ; then doctest -i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen -XHaskell2010 src ; fi
+ if [ $((HCNUMVER < 90400)) -ne 0 ] ; then find src -name '*.hs' -and -not -name 'PackageMap.hs' | xargs doctest -i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen -XHaskell2010 ; fi
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then cd ${PKGDIR_hackage_db} || false ; fi
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then doctest -i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen -XHaskell2010 src ; fi
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then cd ${PKGDIR_language_nix} || false ; fi
33 changes: 19 additions & 14 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This GitHub workflow config has been generated by a script via
#
# haskell-ci '--branches' 'master' '--github-patches' '.github/workflows/ci-skip-package-map.patch' '--doctest' '--doctest-options=-i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen' 'github' 'cabal.project'
# haskell-ci '--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'
#
# To regenerate the script (for example after adjusting tested-with) run
#
Expand All @@ -10,7 +10,7 @@
#
# version: 0.16
#
# REGENDATA ("0.16",["--branches","master","--github-patches",".github/workflows/ci-skip-package-map.patch","--doctest","--doctest-options=-i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen","github","cabal.project"])
# REGENDATA ("0.16",["--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"])
#
name: Haskell-CI
on:
Expand All @@ -32,6 +32,11 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.4.4
compilerKind: ghc
compilerVersion: 9.4.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.7
compilerKind: ghc
compilerVersion: 9.2.7
Expand Down Expand Up @@ -147,7 +152,7 @@ jobs:
- name: cache (tools)
uses: actions/cache/restore@v3
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-4176250c
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-dc7952fc
path: ~/.haskell-ci-tools
- name: install cabal-plan
run: |
Expand All @@ -160,13 +165,13 @@ jobs:
cabal-plan --version
- name: install doctest
run: |
$CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.20'
doctest --version
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.20' ; fi
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then doctest --version ; fi
- name: save cache (tools)
uses: actions/cache/save@v3
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-4176250c
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-dc7952fc
path: ~/.haskell-ci-tools
- name: checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -243,14 +248,14 @@ jobs:
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
- name: doctest
run: |
cd ${PKGDIR_cabal2nix} || false
doctest -i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen -XHaskell2010 src
cd ${PKGDIR_distribution_nixpkgs} || false
find src -type f -and -not -name 'PackageMap.hs' | xargs doctest -i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen -XHaskell2010
cd ${PKGDIR_hackage_db} || false
doctest -i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen -XHaskell2010 src
cd ${PKGDIR_language_nix} || false
doctest -i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen -XHaskell2010 src
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then cd ${PKGDIR_cabal2nix} || false ; fi
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then doctest -i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen -XHaskell2010 src ; fi
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then cd ${PKGDIR_distribution_nixpkgs} || false ; fi
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then find src -name '*.hs' -and -not -name 'PackageMap.hs' | xargs doctest -i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen -XHaskell2010 ; fi
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then cd ${PKGDIR_hackage_db} || false ; fi
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then doctest -i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen -XHaskell2010 src ; fi
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then cd ${PKGDIR_language_nix} || false ; fi
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then doctest -i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen -XHaskell2010 src ; fi
- name: cabal check
run: |
cd ${PKGDIR_cabal2nix} || false
Expand Down
2 changes: 1 addition & 1 deletion cabal2nix/cabal2nix.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ author: Peter Simons <[email protected]>
-- list all contributors: git log --pretty='%an' | sort | uniq
maintainer: sternenseemann <[email protected]>
stability: stable
tested-with: GHC == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.7
tested-with: GHC == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.7 || == 9.4.4
category: Distribution, Nix
homepage: https://github.com/nixos/cabal2nix#readme
bug-reports: https://github.com/nixos/cabal2nix/issues
Expand Down
2 changes: 1 addition & 1 deletion distribution-nixpkgs/distribution-nixpkgs.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license: BSD3
license-file: LICENSE
author: Peter Simons <[email protected]>
maintainer: sternenseemann <[email protected]>
tested-with: GHC == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.7
tested-with: GHC == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.7 || == 9.4.4
category: Distribution, Nix
homepage: https://github.com/NixOS/cabal2nix/tree/master/distribution-nixpkgs#readme
bug-reports: https://github.com/NixOS/cabal2nix/issues
Expand Down
2 changes: 1 addition & 1 deletion hackage-db/hackage-db.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license: BSD3
license-file: LICENSE
author: Peter Simons, Alexander Altman, Ben James, Kevin Quick
maintainer: Peter Simons <[email protected]>
tested-with: GHC == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.7
tested-with: GHC == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.7 || == 9.4.4
category: Distribution
homepage: https://github.com/NixOS/cabal2nix/tree/master/hackage-db#readme
bug-reports: https://github.com/NixOS/cabal2nix/issues
Expand Down
2 changes: 1 addition & 1 deletion language-nix/language-nix.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: BSD3
license-file: LICENSE
author: Peter Simons
maintainer: [email protected]
tested-with: GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.7
tested-with: GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.7, GHC == 9.4.4
category: Distribution, Language, Nix
homepage: https://github.com/NixOS/cabal2nix/tree/master/language-nix#readme
bug-reports: https://github.com/NixOS/cabal2nix/issues
Expand Down

0 comments on commit 1ba9608

Please sign in to comment.