From 55971bb55385c33c5129d9f7169ea6d36881eb5d Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Sun, 11 May 2025 17:42:25 +0200 Subject: [PATCH 1/4] Bump to Cabal 3.14 and GHC 9.12 --- .github/workflows/haskell-ci.yml | 25 +++++++++++++++---------- hackage-server.cabal | 25 +++++++++++++------------ 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index abc97cb0..3d7f9ba6 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.19.20250330 +# version: 0.19.20250506 # -# REGENDATA ("0.19.20250330",["github","hackage-server.cabal"]) +# REGENDATA ("0.19.20250506",["github","hackage-server.cabal"]) # name: Haskell-CI on: @@ -32,19 +32,24 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.10.1 + - compiler: ghc-9.12.2 compilerKind: ghc - compilerVersion: 9.10.1 + compilerVersion: 9.12.2 setup-method: ghcup allow-failure: false - - compiler: ghc-9.8.2 + - compiler: ghc-9.10.2 compilerKind: ghc - compilerVersion: 9.8.2 + compilerVersion: 9.10.2 setup-method: ghcup allow-failure: false - - compiler: ghc-9.6.5 + - compiler: ghc-9.8.4 compilerKind: ghc - compilerVersion: 9.6.5 + compilerVersion: 9.8.4 + setup-method: ghcup + allow-failure: false + - compiler: ghc-9.6.7 + compilerKind: ghc + compilerVersion: 9.6.7 setup-method: ghcup allow-failure: false - compiler: ghc-9.4.8 @@ -86,8 +91,8 @@ jobs: chmod a+x "$HOME/.ghcup/bin/ghcup" - name: Install cabal-install run: | - "$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.1-p1 || (cat "$HOME"/.ghcup/logs/*.* && false) - echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.1-p1 -vnormal+nowrap" >> "$GITHUB_ENV" + "$HOME/.ghcup/bin/ghcup" install cabal 3.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | diff --git a/hackage-server.cabal b/hackage-server.cabal index 6ef76b48..5e6630a2 100644 --- a/hackage-server.cabal +++ b/hackage-server.cabal @@ -28,9 +28,10 @@ license: BSD-3-Clause license-file: LICENSE tested-with: - GHC == 9.10.1 - GHC == 9.8.2 - GHC == 9.6.5 + GHC == 9.12.2 + GHC == 9.10.2 + GHC == 9.8.4 + GHC == 9.6.7 GHC == 9.4.8 GHC == 9.2.8 GHC == 9.0.2 @@ -130,10 +131,10 @@ common defaults -- see `cabal.project.local-ghc-${VERSION}` files build-depends: , array >= 0.5 && < 0.6 - , base >= 4.13 && < 4.21 + , base >= 4.13 && < 4.22 , binary >= 0.8 && < 0.9 , bytestring >= 0.10 && < 0.13 - , containers >= 0.6.0 && < 0.8 + , containers >= 0.6.0 && < 0.9 , deepseq >= 1.4 && < 1.6 , directory >= 1.3 && < 1.4 , filepath >= 1.4 && < 1.6 @@ -142,15 +143,15 @@ common defaults , pretty >= 1.1 && < 1.2 , process >= 1.6 && < 1.7 , text ^>= 1.2.5.0 || >= 2.0 && < 2.2 - , time >= 1.9 && < 1.13 + , time >= 1.9 && < 1.15 , transformers >= 0.5 && < 0.7 , unix >= 2.7 && < 2.9 , scientific -- other dependencies shared by most components build-depends: , aeson >= 2.1.0.0 && < 2.3 - , Cabal >= 3.12.1.0 && < 3.14 - , Cabal-syntax >= 3.12.1.0 && < 3.14 + , Cabal >= 3.14.2.0 && < 3.16 + , Cabal-syntax >= 3.14.2.0 && < 3.16 -- Cabal-syntax needs to be bound to constrain hackage-security -- see https://github.com/haskell/hackage-server/issues/1130 , fail ^>= 4.9.0 @@ -444,12 +445,12 @@ library -- haddock-library-1.11.0 changed type of markupOrderedList -- see https://github.com/haskell/hackage-server/issues/1128 , happstack-server ^>= 7.7.1 || ^>= 7.8.0 || ^>= 7.9.0 - , hashable ^>= 1.3 || ^>= 1.4 + , hashable >= 1.3 && < 1.6 , hs-captcha ^>= 1.0 , hslogger ^>= 1.3.1 , lifted-base ^>= 0.2.1 , mime-mail ^>= 0.5 - , random ^>= 1.2 + , random >= 1.2 && < 1.4 , rss ^>= 3000.2.0.7 , safecopy ^>= 0.10 , semigroups ^>= 0.20 @@ -458,7 +459,7 @@ library , stringsearch ^>= 0.3.6.6 , tagged ^>= 0.8.5 , transformers ^>= 0.6 - , xhtml >= 3000.2.0.0 && < 3000.4 + , xhtml >= 3000.2.0.0 && < 3000.5 , xmlgen ^>= 0.6 , xss-sanitize ^>= 0.3.6 @@ -600,7 +601,7 @@ test-suite ReverseDependenciesTest , tasty-hedgehog ^>= 1.4 , tasty-hunit ^>= 0.10 , HUnit ^>= 1.6 - , hedgehog ^>= 1.4 + , hedgehog >= 1.4 && < 1.6 , exceptions , bimap , mime-mail From 13fb50ef7797fdcd1da55e0f5c3a285f66a8e6d2 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Sun, 11 May 2025 17:53:29 +0200 Subject: [PATCH 2/4] Temporarily switch off other workflows than Haskell CI --- .github/workflows/dependabot-auto-approve.yml | 22 ---------- .github/workflows/nix-flake.yml | 42 ------------------- .github/workflows/update-flake-lock.yml | 22 ---------- 3 files changed, 86 deletions(-) delete mode 100644 .github/workflows/dependabot-auto-approve.yml delete mode 100644 .github/workflows/nix-flake.yml delete mode 100644 .github/workflows/update-flake-lock.yml diff --git a/.github/workflows/dependabot-auto-approve.yml b/.github/workflows/dependabot-auto-approve.yml deleted file mode 100644 index 6e7e31f8..00000000 --- a/.github/workflows/dependabot-auto-approve.yml +++ /dev/null @@ -1,22 +0,0 @@ -# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#approve-a-pull-request -name: Dependabot auto-approve -on: pull_request - -permissions: - pull-requests: write - -jobs: - dependabot: - runs-on: ubuntu-latest - if: github.actor == 'dependabot[bot]' - steps: - - name: Dependabot metadata - id: metadata - uses: dependabot/fetch-metadata@v2 - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: Approve a PR - run: gh pr review --approve "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/nix-flake.yml b/.github/workflows/nix-flake.yml deleted file mode 100644 index 20562100..00000000 --- a/.github/workflows/nix-flake.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: "Test Nix Flake" -on: - push: - branches: - - master - pull_request: - branches: - - master -jobs: - nix: - strategy: - fail-fast: true - matrix: - os: - - ubuntu-latest - - ubuntu-24.04-arm - - macos-latest - name: Nix on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v30 - with: - extra_nix_config: | - trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hackage-server.cachix.org-1:iw0iRh6+gsFIrxROFaAt5gKNgIHejKjIfyRdbpPYevY= - substituters = https://cache.nixos.org/ https://hackage-server.cachix.org/ - - uses: cachix/cachix-action@v15 - with: - # https://nix.dev/tutorials/continuous-integration-github-actions#setting-up-github-actions - name: hackage-server - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - - name: "Check `nix develop` shell" - run: nix develop --check - - - name: "Check `nix develop` shell can run command" - run: nix develop --command "echo" - - - run: nix build - - - continue-on-error: false - run: nix flake check diff --git a/.github/workflows/update-flake-lock.yml b/.github/workflows/update-flake-lock.yml deleted file mode 100644 index 320ffdab..00000000 --- a/.github/workflows/update-flake-lock.yml +++ /dev/null @@ -1,22 +0,0 @@ -# https://github.com/DeterminateSystems/update-flake-lock -name: update-flake-lock -on: - workflow_dispatch: # allows manual triggering - schedule: - - cron: '0 0 1 * *' # runs on first day of the month - -jobs: - lockfile: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@main - - name: Update flake.lock - uses: DeterminateSystems/update-flake-lock@main - with: - pr-title: "Update flake.lock" # Title of PR to be created - pr-labels: | # Labels to be set on the PR - dependencies - automated From bc8f430d56ca94154cc74928db41401f8158f92e Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Sun, 11 May 2025 17:53:56 +0200 Subject: [PATCH 3/4] Haskell CI: allow older transformers --- .github/workflows/haskell-ci.yml | 2 +- cabal.haskell-ci | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 3d7f9ba6..62eaa870 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -196,7 +196,7 @@ jobs: echo " ghc-options: -Werror=missing-methods" >> cabal.project cat >> cabal.project <> cabal.project.local + $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(Cabal|Cabal-syntax|hackage-server|parsec|process|text|transformers)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local - name: dump install plan diff --git a/cabal.haskell-ci b/cabal.haskell-ci index 391b2ebb..ab3045f6 100644 --- a/cabal.haskell-ci +++ b/cabal.haskell-ci @@ -1,6 +1,6 @@ branches: master -installed: +all -Cabal -Cabal-syntax -text -parsec -process +installed: +all -Cabal -Cabal-syntax -text -parsec -process -transformers -- Does not work with GHA: -- -- allow failures with ghc-7.6 and ghc-7.8 From e82017afdae869db72c6dccac52caf57a99af150 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Sun, 11 May 2025 18:28:08 +0200 Subject: [PATCH 4/4] Drop GHC 9.4 and lower --- .github/workflows/haskell-ci.yml | 27 +-------------------------- cabal.haskell-ci | 6 +++--- hackage-server.cabal | 8 ++------ 3 files changed, 6 insertions(+), 35 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 62eaa870..ecc1c91d 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -52,31 +52,6 @@ jobs: compilerVersion: 9.6.7 setup-method: ghcup allow-failure: false - - compiler: ghc-9.4.8 - compilerKind: ghc - compilerVersion: 9.4.8 - setup-method: ghcup - allow-failure: false - - compiler: ghc-9.2.8 - compilerKind: ghc - compilerVersion: 9.2.8 - setup-method: ghcup - allow-failure: false - - compiler: ghc-9.0.2 - compilerKind: ghc - compilerVersion: 9.0.2 - setup-method: ghcup - allow-failure: false - - compiler: ghc-8.10.7 - compilerKind: ghc - compilerVersion: 8.10.7 - setup-method: ghcup - allow-failure: false - - compiler: ghc-8.8.4 - compilerKind: ghc - compilerVersion: 8.8.4 - setup-method: ghcup - allow-failure: false fail-fast: false steps: - name: apt-get install @@ -196,7 +171,7 @@ jobs: echo " ghc-options: -Werror=missing-methods" >> cabal.project cat >> cabal.project <> cabal.project.local + $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(Cabal|Cabal-syntax|hackage-server|parsec|process|text)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local - name: dump install plan diff --git a/cabal.haskell-ci b/cabal.haskell-ci index ab3045f6..bdf6a02d 100644 --- a/cabal.haskell-ci +++ b/cabal.haskell-ci @@ -1,13 +1,13 @@ branches: master -installed: +all -Cabal -Cabal-syntax -text -parsec -process -transformers +installed: +all -Cabal -Cabal-syntax -text -parsec -process -- Does not work with GHA: -- -- allow failures with ghc-7.6 and ghc-7.8 -- allow-failures: <7.9 --- Use Ubuntu 22.04 -distribution: jammy +-- -- Use Ubuntu 22.04 +-- distribution: jammy apt: libbrotli-dev libgd-dev -- libgd-dev is for gd via hs-captcha diff --git a/hackage-server.cabal b/hackage-server.cabal index 5e6630a2..5d9c0445 100644 --- a/hackage-server.cabal +++ b/hackage-server.cabal @@ -32,11 +32,7 @@ tested-with: GHC == 9.10.2 GHC == 9.8.4 GHC == 9.6.7 - GHC == 9.4.8 - GHC == 9.2.8 - GHC == 9.0.2 - GHC == 8.10.7 - GHC == 8.8.4 + -- Constraint transformers >= 0.6 forces GHC >= 9.6 for CI data-dir: datafiles data-files: @@ -131,7 +127,7 @@ common defaults -- see `cabal.project.local-ghc-${VERSION}` files build-depends: , array >= 0.5 && < 0.6 - , base >= 4.13 && < 4.22 + , base >= 4.18 && < 4.22 , binary >= 0.8 && < 0.9 , bytestring >= 0.10 && < 0.13 , containers >= 0.6.0 && < 0.9