Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 22 additions & 72 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.19.20250821
# version: 0.19.20260209
#
# REGENDATA ("0.19.20250821",["github","hackage-cli.cabal"])
# REGENDATA ("0.19.20260209",["github","hackage-cli.cabal"])
#
name: Haskell-CI
on:
Expand All @@ -20,6 +20,11 @@ on:
pull_request:
branches:
- master
merge_group:
branches:
- master
workflow_dispatch:
{}
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
Expand All @@ -32,19 +37,19 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.14.0.20250819
- compiler: ghc-9.14.1
compilerKind: ghc
compilerVersion: 9.14.0.20250819
setup-method: ghcup-prerelease
compilerVersion: 9.14.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.12.2
- compiler: ghc-9.12.4
compilerKind: ghc
compilerVersion: 9.12.2
compilerVersion: 9.12.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.10.2
- compiler: ghc-9.10.3
compilerKind: ghc
compilerVersion: 9.10.2
compilerVersion: 9.10.3
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.8.4
Expand Down Expand Up @@ -72,37 +77,12 @@ jobs:
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
- compiler: ghc-8.6.5
compilerKind: ghc
compilerVersion: 8.6.5
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.4.4
compilerKind: ghc
compilerVersion: 8.4.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.2.2
compilerKind: ghc
compilerVersion: 8.2.2
setup-method: ghcup
allow-failure: false
fail-fast: false
steps:
- name: apt-get install
run: |
apt-get update
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
apt-get install -y libbrotli-dev
- name: Install GHCup
run: |
Expand All @@ -127,21 +107,6 @@ jobs:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
HCVER: ${{ matrix.compilerVersion }}
- name: Install GHC (GHCup prerelease)
if: matrix.setup-method == 'ghcup-prerelease'
run: |
"$HOME/.ghcup/bin/ghcup" config add-release-channel prereleases
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
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"
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
HCVER: ${{ matrix.compilerVersion }}
- name: Set PATH and environment variables
run: |
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
Expand All @@ -152,7 +117,7 @@ jobs:
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
Expand Down Expand Up @@ -180,18 +145,6 @@ jobs:
repository hackage.haskell.org
url: http://hackage.haskell.org/
EOF
if $HEADHACKAGE; then
cat >> $CABAL_CONFIG <<EOF
repository head.hackage.ghc.haskell.org
url: https://ghc.gitlab.haskell.org/head.hackage/
secure: True
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
key-threshold: 3
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
EOF
fi
cat >> $CABAL_CONFIG <<EOF
program-default-options
ghc-options: $GHCJOBS +RTS -M3G -RTS
Expand All @@ -215,7 +168,7 @@ jobs:
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
path: source
- name: initial cabal.project for sdist
Expand Down Expand Up @@ -243,22 +196,19 @@ jobs:
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package hackage-cli" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package hackage-cli" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
echo "package hackage-cli" >> cabal.project
echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project
cat >> cabal.project <<EOF
EOF
if $HEADHACKAGE; then
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
fi
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(Cabal|binary|hackage-cli)$/; }' >> cabal.project.local
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(hackage-cli)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
- name: dump install plan
run: |
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
cabal-plan
- name: restore cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
Expand Down Expand Up @@ -289,7 +239,7 @@ jobs:
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: save cache
if: always()
uses: actions/cache/save@v4
uses: actions/cache/save@v5
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
23 changes: 17 additions & 6 deletions .github/workflows/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,31 @@ jobs:
# ghc-ver: '9.10'

env:
ARGS: "--stack-yaml=stack-${{ matrix.ghc-ver }}.yaml --no-terminal --system-ghc"
# ARGS: "--stack-yaml=stack-${{ matrix.ghc-ver }}.yaml --no-terminal --system-ghc"
ARGS: "--stack-yaml=stack-${{ matrix.ghc-ver }}.yaml --no-terminal"

# Needed for Windows to make piping (... >> ...) and evaluation ( $(...) ) work.
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc-ver }}
enable-stack: true
# Andreas, 2026-04-18
# There have been problems with libcrypto on macOS with GHC 9.8.4 with --system-ghc
# so we let Stack install GHC itself.
stack-no-global: true

- name: Set up the openssl library (MacOS)
if: runner.os == 'macOS'
# Already installed:
# brew install openssl
run: |
echo "PKG_CONFIG_PATH=${PKG_CONFIG_PATH}"
echo "PKG_CONFIG_PATH=$(brew --prefix)/opt/openssl/lib/pkgconfig" >> "${GITHUB_ENV}"
Expand All @@ -66,13 +73,17 @@ jobs:
sudo apt-get install libbrotli-dev -qq

- name: Cache dependencies (restore)
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
id: cache
env:
key: ${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-ghc-${{ matrix.ghc-ver }}
# ${{ steps.setup.outputs.ghc-version }} is empty with stack-no-global
# so we use plain ${{ matrix.ghc-ver }}
with:
path: ${{ steps.setup.outputs.stack-root }}
# Use a unique primary key (always save new cache); works if caches aren't to big or too many...
key: ${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-ghc-${{ steps.setup.outputs.ghc-version }}-commit-${{ github.sha }}
restore-keys: ${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-ghc-${{ steps.setup.outputs.ghc-version }}-
key: ${{ env.key }}-commit-${{ github.sha }}
restore-keys: ${{ env.key }}-

- name: Install dependencies
# if: ${{ steps.cache.outputs.cache-hit != 'true' }}
Expand All @@ -88,7 +99,7 @@ jobs:
stack test ${{ env.ARGS }} --flag HsOpenSSL:use-pkg-config

- name: Cache dependencies (save)
uses: actions/cache/save@v4
uses: actions/cache/save@v5
if: always() && steps.cache.outputs.cache-hit != 'true'
# # Will fail if we already have a cache with this key (in this case, cache-hit is true).
with:
Expand Down
3 changes: 2 additions & 1 deletion cabal.haskell-ci
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ branches: master

-- By default `installed` constraints are used for packages
-- in global db. We can modify which constraints are used.
installed: +all -binary -Cabal
-- 2026-04-18: For building with GHC 8, we'd need to unconstrain Cabal:
-- installed: +all -binary -Cabal

apt: libbrotli-dev
19 changes: 10 additions & 9 deletions hackage-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,19 @@ build-type: Simple
tested-with:
-- Keep in descending order.
GHC == 9.14.1
GHC == 9.12.2
GHC == 9.10.2
GHC == 9.12.4
GHC == 9.10.3
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
GHC == 8.6.5
GHC == 8.4.4
GHC == 8.2.2
-- -- 2026-04-18: Stop testing GHC 8 on CI
-- GHC == 8.10.7
-- GHC == 8.8.4
-- GHC == 8.6.5
-- GHC == 8.4.4
-- GHC == 8.2.2

extra-doc-files:
CHANGELOG.md
Expand Down Expand Up @@ -59,7 +60,7 @@ library cabal-revisions
, base >= 4.10.0.0 && < 5
, bytestring >= 0.10.4.0 && < 0.13
, Cabal >= 3.4 && < 3.17
, containers >= 0.5.0.0 && < 0.8
, containers >= 0.5.0.0 && < 1
, mtl >= 2.2.2 && < 2.3 || >= 2.3.1 && < 2.4
, pretty ^>= 1.1.2

Expand Down Expand Up @@ -134,7 +135,7 @@ executable hackage-cli
, tagsoup ^>= 0.14
, tar >= 0.5 && < 1
, text >= 1.2 && < 2.2
, time >= 1.5.0.1 && < 1.15
, time >= 1.5.0.1 && < 2
, zlib >= 0.6.1 && < 0.8

ghc-options: -Wall -Wcompat -threaded
2 changes: 1 addition & 1 deletion stack-9.10.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-24.7
resolver: lts-24.37
compiler: ghc-9.10.2
compiler-check: match-exact

Expand Down
2 changes: 1 addition & 1 deletion stack-9.12.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: nightly-2025-08-30
resolver: nightly-2026-04-15
compiler: ghc-9.12.2
compiler-check: match-exact

Expand Down
6 changes: 0 additions & 6 deletions stack-9.2.4.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions stack-9.2.5.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions stack-9.2.6.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions stack-9.2.7.yaml

This file was deleted.

File renamed without changes.
3 changes: 0 additions & 3 deletions stack-9.4.3.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions stack-9.4.4.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions stack-9.4.5.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions stack-9.4.6.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions stack-9.4.7.yaml

This file was deleted.

File renamed without changes.
3 changes: 0 additions & 3 deletions stack-9.6.2.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions stack-9.6.3.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions stack-9.6.4.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions stack-9.8.1.yaml

This file was deleted.