From fc0f04de94c02c5b31bfb444ea3b2142462b5012 Mon Sep 17 00:00:00 2001 From: Bodigrim Date: Sat, 25 Mar 2023 19:50:09 +0000 Subject: [PATCH 1/3] Update CI config, adding GHC 9.6 jobs --- .github/workflows/ci.yaml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ad40accc..dbb66026 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,8 +24,9 @@ jobs: - { os: ubuntu-latest, ghc: "8.8.4" } - { os: ubuntu-latest, ghc: "8.10.7" } - { os: ubuntu-latest, ghc: "9.0.2" } - - { os: ubuntu-latest, ghc: "9.2.4" } - - { os: ubuntu-latest, ghc: "9.4.1" } + - { os: ubuntu-latest, ghc: "9.2.7" } + - { os: ubuntu-latest, ghc: "9.4.4" } + - { os: ubuntu-latest, ghc: "9.6.1" } # MacOS - { os: macOS-latest, ghc: "8.0.2" } - { os: macOS-latest, ghc: "8.2.2" } @@ -34,8 +35,9 @@ jobs: - { os: macOS-latest, ghc: "8.8.4" } - { os: macOS-latest, ghc: "8.10.7" } - { os: macOS-latest, ghc: "9.0.2" } - - { os: macOS-latest, ghc: "9.2.4" } - - { os: macOS-latest, ghc: "9.4.1" } + - { os: macOS-latest, ghc: "9.2.7" } + - { os: macOS-latest, ghc: "9.4.4" } + - { os: macOS-latest, ghc: "9.6.1" } # Windows - { os: windows-latest, ghc: "8.0.2" } - { os: windows-latest, ghc: "8.2.2" } @@ -44,8 +46,9 @@ jobs: - { os: windows-latest, ghc: "8.8.4" } - { os: windows-latest, ghc: "8.10.7" } - { os: windows-latest, ghc: "9.0.2" } - - { os: windows-latest, ghc: "9.2.4" } - - { os: windows-latest, ghc: "9.4.1" } + - { os: windows-latest, ghc: "9.2.7" } + - { os: windows-latest, ghc: "9.4.4" } + - { os: windows-latest, ghc: "9.6.1" } steps: - uses: actions/checkout@v3 @@ -58,7 +61,7 @@ jobs: - name: Update cabal package database run: cabal update - - uses: actions/cache@v2 + - uses: actions/cache@v3 name: Cache cabal stuff with: path: | @@ -81,7 +84,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - resolver: [nightly, lts-19, lts-18, lts-16, lts-14, lts-12, lts-11] + resolver: [nightly, lts-20, lts-19, lts-18, lts-16, lts-14, lts-12, lts-11] include: - resolver: lts-11 ghc: 8.2.2 @@ -100,6 +103,9 @@ jobs: - resolver: lts-19 ghc: 9.0.2 stack-yaml: stack.yaml + - resolver: lts-20 + ghc: 9.2.7 + stack-yaml: stack.yaml - resolver: nightly stack-yaml: stack.yaml # Latest stable for MacOS: ghc-8.8.4 @@ -113,7 +119,7 @@ jobs: env: STACK_YAML: stack.yaml STACK_ARGS: '--resolver ${{ matrix.resolver }} --system-ghc' - cache-version: v4 # bump up this version to invalidate currently stored cache + cache-version: v5 # bump up this version to invalidate currently stored cache steps: - uses: actions/checkout@v3 @@ -124,11 +130,11 @@ jobs: ghc-version: ${{ matrix.ghc }} enable-stack: true stack-version: 'latest' - cabal-version: '3.6' + cabal-version: '3.10' - name: Cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/.stack @@ -148,7 +154,7 @@ jobs: - name: Windows Cache id: cache-windows - uses: actions/cache@v2 + uses: actions/cache@v3 if: matrix.os == 'windows-latest' with: path: | From 9091210dfbfe6bafc15d401e9c6aecadb2200e46 Mon Sep 17 00:00:00 2001 From: Bodigrim Date: Sat, 25 Mar 2023 20:10:41 +0000 Subject: [PATCH 2/3] Allow doctest-0.21 --- random.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/random.cabal b/random.cabal index 32eb0b94..8d62a4c7 100644 --- a/random.cabal +++ b/random.cabal @@ -132,7 +132,7 @@ test-suite doctests default-language: Haskell2010 build-depends: base, - doctest >=0.15 && <0.21 + doctest >=0.15 && <0.22 if impl(ghc >= 8.2) && impl(ghc < 8.10) build-depends: mwc-random >=0.13 && <0.16, From c39a647a5ede9546a5c17d0e20cae2af0a71c625 Mon Sep 17 00:00:00 2001 From: Bodigrim Date: Fri, 21 Apr 2023 23:30:48 +0100 Subject: [PATCH 3/3] Tweak inspection testing under GHC 9.4+ --- test-inspection/Spec/Inspection.hs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test-inspection/Spec/Inspection.hs b/test-inspection/Spec/Inspection.hs index 45109a6b..0e0b07bd 100644 --- a/test-inspection/Spec/Inspection.hs +++ b/test-inspection/Spec/Inspection.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} @@ -43,7 +44,15 @@ inspectionTests = testGroup "Inspection" $ [ $(inspectObligations [(`doesNotUse` 'StateGenM), hasNoGenerics, hasNoTypeClasses] 'uniform_Word8) , $(inspectObligations [(`doesNotUse` 'StateGenM), hasNoGenerics, hasNoTypeClasses] 'uniform_Int8) , $(inspectObligations [(`doesNotUse` 'StateGenM), hasNoGenerics, hasNoTypeClasses] 'uniform_Char) - , $(inspectObligations [(`doesNotUse` 'StateGenM), hasNoGenerics, hasNoTypeClasses] 'uniform_MyAction) + , $(inspectObligations [(`doesNotUse` 'StateGenM), hasNoTypeClasses] 'uniform_MyAction) + +#if !MIN_VERSION_base(4,17,0) + -- Starting from GHC 9.4 and base-4.17 + -- 'error' :: M1 C ('MetaCons "Never" 'PrefixI 'False) .. + -- survives. This does not really matter, because Never is uninhabited, + -- but fails inspection testing. + , $(inspectTest $ hasNoGenerics 'uniform_MyAction) +#endif , $(inspectObligations [(`doesNotUse` 'StateGenM), hasNoGenerics, hasNoTypeClasses] 'uniformR_Word8) , $(inspectObligations [(`doesNotUse` 'StateGenM), hasNoGenerics, hasNoTypeClasses] 'uniformR_Int8)