From 15b0f4e9457362f69588ad3389e6c6de6e6afcbd Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 7 May 2024 13:12:58 +0200 Subject: [PATCH 1/2] .github: don't test on GHC 8.8.4 This GHC version has been dropped from nixpkgs, so isn't too interesting to us anymore. --- .github/workflows/haskell-ci.yml | 71 +++++++------------ cabal2nix/cabal2nix.cabal | 2 +- .../distribution-nixpkgs.cabal | 2 +- hackage-db/hackage-db.cabal | 2 +- language-nix/language-nix.cabal | 2 +- 5 files changed, 28 insertions(+), 51 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 5bee1e71e..d47f63acc 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.17.20231219 +# version: 0.19.20240501 # -# REGENDATA ("0.17.20231219",["--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"]) +# 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"]) # name: Haskell-CI on: @@ -27,7 +27,7 @@ jobs: timeout-minutes: 60 container: - image: buildpack-deps:bionic + image: buildpack-deps:jammy continue-on-error: ${{ matrix.allow-failure }} strategy: matrix: @@ -52,32 +52,18 @@ jobs: compilerVersion: 8.10.7 setup-method: ghcup allow-failure: false - - compiler: ghc-8.8.4 - compilerKind: ghc - compilerVersion: 8.8.4 - setup-method: hvr-ppa - allow-failure: false fail-fast: false steps: - name: apt run: | apt-get update apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 - if [ "${{ matrix.setup-method }}" = ghcup ]; then - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - else - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - fi + mkdir -p "$HOME/.ghcup/bin" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" + chmod a+x "$HOME/.ghcup/bin/ghcup" + "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml; + "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) + "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) env: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} @@ -89,22 +75,13 @@ jobs: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER - if [ "${{ matrix.setup-method }}" = ghcup ]; then - HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") - HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') - HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" - echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" - else - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" - fi - + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') + echo "HC=$HC" >> "$GITHUB_ENV" + echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" + echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" @@ -152,9 +129,9 @@ jobs: run: | $CABAL v2-update -v - name: cache (tools) - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: - key: ${{ runner.os }}-${{ matrix.compiler }}-tools-65c9c5ff + key: ${{ runner.os }}-${{ matrix.compiler }}-tools-dd324315 path: ~/.haskell-ci-tools - name: install cabal-plan run: | @@ -167,16 +144,16 @@ jobs: cabal-plan --version - name: install doctest run: | - 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 $CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.22.0' ; fi if [ $((HCNUMVER < 90400)) -ne 0 ] ; then doctest --version ; fi - name: save cache (tools) - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 if: always() with: - key: ${{ runner.os }}-${{ matrix.compiler }}-tools-65c9c5ff + key: ${{ runner.os }}-${{ matrix.compiler }}-tools-dd324315 path: ~/.haskell-ci-tools - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: source - name: initial cabal.project for sdist @@ -230,7 +207,7 @@ jobs: $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all cabal-plan - name: restore cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} path: ~/.cabal/store @@ -276,7 +253,7 @@ jobs: rm -f cabal.project.local $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - name: save cache - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 if: always() with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} diff --git a/cabal2nix/cabal2nix.cabal b/cabal2nix/cabal2nix.cabal index cf37bc8c1..2c926f228 100644 --- a/cabal2nix/cabal2nix.cabal +++ b/cabal2nix/cabal2nix.cabal @@ -12,7 +12,7 @@ author: Peter Simons -- list all contributors: git log --pretty='%an' | sort | uniq maintainer: sternenseemann stability: stable -tested-with: GHC == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 +tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 category: Distribution, Nix homepage: https://github.com/nixos/cabal2nix#readme bug-reports: https://github.com/nixos/cabal2nix/issues diff --git a/distribution-nixpkgs/distribution-nixpkgs.cabal b/distribution-nixpkgs/distribution-nixpkgs.cabal index 712744f81..939501468 100644 --- a/distribution-nixpkgs/distribution-nixpkgs.cabal +++ b/distribution-nixpkgs/distribution-nixpkgs.cabal @@ -6,7 +6,7 @@ license: BSD3 license-file: LICENSE author: Peter Simons maintainer: sternenseemann -tested-with: GHC == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 +tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 category: Distribution, Nix homepage: https://github.com/NixOS/cabal2nix/tree/master/distribution-nixpkgs#readme bug-reports: https://github.com/NixOS/cabal2nix/issues diff --git a/hackage-db/hackage-db.cabal b/hackage-db/hackage-db.cabal index 51e82074b..f07c8be5d 100644 --- a/hackage-db/hackage-db.cabal +++ b/hackage-db/hackage-db.cabal @@ -9,7 +9,7 @@ license: BSD3 license-file: LICENSE author: Peter Simons, Alexander Altman, Ben James, Kevin Quick maintainer: sternenseemann -tested-with: GHC == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 +tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 category: Distribution homepage: https://github.com/NixOS/cabal2nix/tree/master/hackage-db#readme bug-reports: https://github.com/NixOS/cabal2nix/issues diff --git a/language-nix/language-nix.cabal b/language-nix/language-nix.cabal index 2f9c81e7a..9c587539a 100644 --- a/language-nix/language-nix.cabal +++ b/language-nix/language-nix.cabal @@ -7,7 +7,7 @@ license: BSD3 license-file: LICENSE author: Peter Simons maintainer: simons@cryp.to -tested-with: GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.8, GHC == 9.4.8 +tested-with: GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.8, GHC == 9.4.8 category: Distribution, Language, Nix homepage: https://github.com/NixOS/cabal2nix/tree/master/language-nix#readme bug-reports: https://github.com/NixOS/cabal2nix/issues From 05c35ebb9139b6cf592d777f51e1683f15760347 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 7 May 2024 13:15:22 +0200 Subject: [PATCH 2/2] .github: test on GHC 9.6.5 It's about time, 9.6.5 is our default GHC in nixpkgs at the moment. --- .github/workflows/haskell-ci.yml | 5 +++++ cabal2nix/cabal2nix.cabal | 2 +- distribution-nixpkgs/distribution-nixpkgs.cabal | 2 +- hackage-db/hackage-db.cabal | 2 +- language-nix/language-nix.cabal | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index d47f63acc..2ab7d7249 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -32,6 +32,11 @@ jobs: strategy: matrix: include: + - compiler: ghc-9.6.5 + compilerKind: ghc + compilerVersion: 9.6.5 + setup-method: ghcup + allow-failure: false - compiler: ghc-9.4.8 compilerKind: ghc compilerVersion: 9.4.8 diff --git a/cabal2nix/cabal2nix.cabal b/cabal2nix/cabal2nix.cabal index 2c926f228..4f03d3e83 100644 --- a/cabal2nix/cabal2nix.cabal +++ b/cabal2nix/cabal2nix.cabal @@ -12,7 +12,7 @@ author: Peter Simons -- list all contributors: git log --pretty='%an' | sort | uniq maintainer: sternenseemann stability: stable -tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 +tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.5 category: Distribution, Nix homepage: https://github.com/nixos/cabal2nix#readme bug-reports: https://github.com/nixos/cabal2nix/issues diff --git a/distribution-nixpkgs/distribution-nixpkgs.cabal b/distribution-nixpkgs/distribution-nixpkgs.cabal index 939501468..bf4320244 100644 --- a/distribution-nixpkgs/distribution-nixpkgs.cabal +++ b/distribution-nixpkgs/distribution-nixpkgs.cabal @@ -6,7 +6,7 @@ license: BSD3 license-file: LICENSE author: Peter Simons maintainer: sternenseemann -tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 +tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.5 category: Distribution, Nix homepage: https://github.com/NixOS/cabal2nix/tree/master/distribution-nixpkgs#readme bug-reports: https://github.com/NixOS/cabal2nix/issues diff --git a/hackage-db/hackage-db.cabal b/hackage-db/hackage-db.cabal index f07c8be5d..b4814f7e1 100644 --- a/hackage-db/hackage-db.cabal +++ b/hackage-db/hackage-db.cabal @@ -9,7 +9,7 @@ license: BSD3 license-file: LICENSE author: Peter Simons, Alexander Altman, Ben James, Kevin Quick maintainer: sternenseemann -tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 +tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.5 category: Distribution homepage: https://github.com/NixOS/cabal2nix/tree/master/hackage-db#readme bug-reports: https://github.com/NixOS/cabal2nix/issues diff --git a/language-nix/language-nix.cabal b/language-nix/language-nix.cabal index 9c587539a..63f6135fe 100644 --- a/language-nix/language-nix.cabal +++ b/language-nix/language-nix.cabal @@ -7,7 +7,7 @@ license: BSD3 license-file: LICENSE author: Peter Simons maintainer: simons@cryp.to -tested-with: GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.8, GHC == 9.4.8 +tested-with: GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.8, GHC == 9.4.8, GHC == 9.6.5 category: Distribution, Language, Nix homepage: https://github.com/NixOS/cabal2nix/tree/master/language-nix#readme bug-reports: https://github.com/NixOS/cabal2nix/issues