diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index aa6d01a128d..476cb5a02f4 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -43,7 +43,7 @@ jobs: strategy: matrix: os: ["ubuntu-latest", "macos-latest", "windows-latest"] - ghc: ["9.6.3", "9.4.7", "9.2.8", "9.0.2", "8.10.7", "8.8.4", "8.6.5", "8.4.4"] + ghc: ["9.8.1", "9.6.3", "9.4.8", "9.2.8", "9.0.2", "8.10.7", "8.8.4", "8.6.5", "8.4.4"] exclude: # corrupts GHA cache or the fabric of reality itself, see https://github.com/haskell/cabal/issues/8356 - os: "windows-latest" @@ -62,6 +62,12 @@ jobs: - uses: actions/checkout@v4 + - uses: haskell-actions/setup@v2 + id: setup-haskell + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: '3.10.2.1' + # See the following link for a breakdown of the following step # https://github.com/haskell/actions/issues/7#issuecomment-745697160 - uses: actions/cache@v3 @@ -73,12 +79,6 @@ jobs: key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }} restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- - - uses: haskell/actions/setup@v2 - id: setup-haskell - with: - ghc-version: ${{ matrix.ghc }} - cabal-version: '3.10.1.0' - - name: Work around git problem https://bugs.launchpad.net/ubuntu/+source/git/+bug/1993586 (cabal PR #8546) run: | git config --global protocol.file.allow always @@ -111,11 +111,6 @@ jobs: fi echo "FLAGS=$FLAGS" >> $GITHUB_ENV - - name: Allow newer dependencies when built with latest GHC - if: ${{ matrix.ghc }} == '9.6.3' - run: | - echo "allow-newer: rere:base, rere:transformers" >> cabal.project.validate - - name: Validate print-config run: sh validate.sh $FLAGS -s print-config diff --git a/cabal.project b/cabal.project index d0b2fbabc1f..d506fe9b117 100644 --- a/cabal.project +++ b/cabal.project @@ -1,3 +1,5 @@ +import: cabal.project.latest-ghc + packages: Cabal/ packages: cabal-testsuite/ packages: Cabal-syntax/ diff --git a/cabal.project.latest-ghc b/cabal.project.latest-ghc new file mode 100644 index 00000000000..5132415b48c --- /dev/null +++ b/cabal.project.latest-ghc @@ -0,0 +1,12 @@ +-- Usually, the latest GHC requires a few allow-newer's +-- for some time after the release. This project file is meant to host these. +-- The file is supposed to be included in the main project files used for +-- Cabal development: +-- - cabal.project (day-to-day development), +-- - cabal.project.validate (Cabal CI), +-- Commented out below are the usual suspects. Feel free to add more. + +-- NOTE: don't forget to update the compiler version in the conditional +-- when upgrading to a newer GHC +if impl(ghc >= 9.8.1) + -- allow-newer: windns:* diff --git a/cabal.project.validate b/cabal.project.validate index 66e823f62b1..d3583c31b0e 100644 --- a/cabal.project.validate +++ b/cabal.project.validate @@ -1,3 +1,5 @@ +import: cabal.project.latest-ghc + packages: Cabal-syntax/ packages: Cabal/ packages: cabal-testsuite/