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
79 changes: 65 additions & 14 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.20250506
# version: 0.19.20250908
#
# REGENDATA ("0.19.20250506",["github","cabal.project"])
# REGENDATA ("0.19.20250908",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -32,6 +32,11 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.14.0.20250819
compilerKind: ghc
compilerVersion: 9.14.0.20250819
setup-method: ghcup-prerelease
allow-failure: false
- compiler: ghc-9.12.2
compilerKind: ghc
compilerVersion: 9.12.2
Expand Down Expand Up @@ -100,8 +105,8 @@ jobs:
chmod a+x "$HOME/.ghcup/bin/ghcup"
- name: Install cabal-install
run: |
"$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"
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
- name: Install GHC (GHCup)
if: matrix.setup-method == 'ghcup'
run: |
Expand All @@ -116,6 +121,21 @@ 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 @@ -126,7 +146,7 @@ jobs:
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
Expand Down Expand Up @@ -154,6 +174,18 @@ 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 @@ -177,7 +209,7 @@ jobs:
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
path: source
- name: initial cabal.project for sdist
Expand Down Expand Up @@ -230,24 +262,43 @@ jobs:
echo "packages: ${PKGDIR_hackage_security_HTTP}" >> cabal.project
echo "packages: ${PKGDIR_precompute_fileinfo}" >> cabal.project
echo "package hackage-security" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
echo "package hackage-security-http-client" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
echo "package example-client" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
echo "package hackage-security-curl" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
echo "package hackage-root-tool" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
echo "package hackage-repo-tool" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
echo "package hackage-security-HTTP" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
echo "package precompute-fileinfo" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package hackage-security" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package hackage-security-http-client" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package example-client" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package hackage-security-curl" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package hackage-root-tool" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package hackage-repo-tool" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package hackage-security-HTTP" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package precompute-fileinfo" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
cat >> cabal.project <<EOF
constraints: base-compat >= 0.12.2
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 /^(example-client|hackage-repo-tool|hackage-root-tool|hackage-security|hackage-security-HTTP|hackage-security-curl|hackage-security-http-client|precompute-fileinfo)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
ghc: ['9.12', '9.10', '9.8', '9.6']
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: haskell-actions/setup@v2
id: setup
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc: ['9.10', '9.8', '9.6', '9.4', '9.2', '9.0', '8.10', '8.8', '8.6', '8.4']
ghc: ['9.12', '9.10', '9.8', '9.6', '9.4', '9.2', '9.0', '8.10', '8.8', '8.6', '8.4']
include:
- os: macos-latest
ghc: '9.10'
ghc: '9.12'
- os: windows-latest
ghc: '9.10'
ghc: '9.12'

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

- uses: haskell-actions/setup@v2
id: setup
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ dist-newstyle
.ghc.environment.*
cabal.project.local
stack*.yaml.lock
*~
4 changes: 4 additions & 0 deletions cabal.haskell-ci
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
branches: master
installed: +all

-- Andreas 2025-09-08: Latest Haskell CI adds -Werror=unused-packages
-- which is hard to get to work in our setting with many conditionals.
error-unused-packages: False

-- Andreas, 2023-07-01: We use some haddock features that are new in 8.6.
haddock: >= 8.6

Expand Down
6 changes: 3 additions & 3 deletions example-client/example-client.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ build-type: Simple
cabal-version: >=1.10

tested-with:
GHC == 9.14.1
GHC == 9.12.2
GHC == 9.10.2
GHC == 9.8.4
Expand All @@ -33,7 +34,7 @@ executable example-client
main-is: Main.hs
other-modules: ExampleClient.Options

build-depends: base >= 4.11 && < 4.22,
build-depends: base >= 4.11 && < 4.23,
bytestring >= 0.10.8.2,
directory >= 1.3.1.5,
filepath >= 1.4.2,
Expand All @@ -47,8 +48,7 @@ executable example-client
hackage-security-http-client
hs-source-dirs: src
default-language: Haskell2010
default-extensions: DeriveDataTypeable
FlexibleContexts
default-extensions: FlexibleContexts
RankNTypes
RecordWildCards
ScopedTypeVariables
Expand Down
8 changes: 4 additions & 4 deletions hackage-repo-tool/hackage-repo-tool.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ homepage: https://github.com/haskell/hackage-security
bug-reports: https://github.com/haskell/hackage-security/issues

tested-with:
GHC == 9.14.1
GHC == 9.12.2
GHC == 9.10.2
GHC == 9.8.4
Expand Down Expand Up @@ -59,13 +60,13 @@ executable hackage-repo-tool

-- For boot libraries we try to accomodate the versions bundled with
-- the respective GHC release
build-depends: base >= 4.11 && < 4.22,
build-depends: base >= 4.11 && < 4.23,
bytestring >= 0.10.8.2 && < 0.13,
directory >= 1.3.1.5 && < 1.4,
filepath >= 1.4.2 && < 1.6,
network-uri >= 2.6 && < 2.7,
network >= 2.6 && < 3.3,
time >= 1.8.0.2 && < 1.15
time >= 1.8.0.2 && < 1.16
if !os(windows)
build-depends: unix >= 2.7.2.2 && < 2.9

Expand All @@ -85,8 +86,7 @@ executable hackage-repo-tool


default-language: Haskell2010
default-extensions: DeriveDataTypeable
FlexibleContexts
default-extensions: FlexibleContexts
FlexibleInstances
NoMonomorphismRestriction
ScopedTypeVariables
Expand Down
2 changes: 0 additions & 2 deletions hackage-repo-tool/src/Hackage/Security/RepoTool/Util/IO.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import qualified Codec.Archive.Tar.Entry as Tar
import qualified Codec.Compression.GZip as GZip
import Control.Exception
import qualified Data.ByteString.Lazy as BS.L
import Data.Typeable
import qualified System.Directory as Directory
import System.IO.Error

Expand Down Expand Up @@ -111,7 +110,6 @@ tarExtractFile opts repoLoc pathTarGz pathToExtract =
go es

data TarGzError = TarGzError FilePath SomeException
deriving (Typeable)

instance Exception TarGzError where
displayException (TarGzError path e) = path ++ ": " ++ displayException e
Expand Down
1 change: 1 addition & 0 deletions hackage-root-tool/hackage-root-tool.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ build-type: Simple
cabal-version: >=1.10

tested-with:
GHC == 9.14.1
GHC == 9.12.2
GHC == 9.10.2
GHC == 9.8.4
Expand Down
6 changes: 3 additions & 3 deletions hackage-security-HTTP/hackage-security-HTTP.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ bug-reports: https://github.com/haskell/hackage-security/issues
build-type: Simple

tested-with:
GHC == 9.14.1
GHC == 9.12.2
GHC == 9.10.2
GHC == 9.8.4
Expand All @@ -40,7 +41,7 @@ source-repository head

library
exposed-modules: Hackage.Security.Client.Repository.HttpLib.HTTP
build-depends: base >= 4.11 && < 4.22,
build-depends: base >= 4.11 && < 4.23,
bytestring >= 0.10.8.2 && < 0.13,
HTTP >= 4000.2.19 && < 4000.5,
mtl >= 2.2.2 && < 2.4,
Expand All @@ -50,8 +51,7 @@ library
hackage-security >= 0.5 && < 0.7
hs-source-dirs: src
default-language: Haskell2010
default-extensions: DeriveDataTypeable
FlexibleContexts
default-extensions: FlexibleContexts
RankNTypes
RecordWildCards
ScopedTypeVariables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import Control.Concurrent
import Control.Exception
import Control.Monad
import Data.List (intercalate)
import Data.Typeable (Typeable)
import Network.URI
import qualified Data.ByteString.Lazy as BS.L
import qualified Control.Monad.State as State
Expand Down Expand Up @@ -120,10 +119,8 @@ wrapCustomEx act = handleChecked (\(ex :: UnexpectedResponse) -> go ex)
go ex = throwChecked (SomeRemoteError ex)

data UnexpectedResponse = UnexpectedResponse URI (Int, Int, Int)
deriving (Typeable)

data InvalidProxy = InvalidProxy String
deriving (Typeable)

instance Pretty UnexpectedResponse where
pretty (UnexpectedResponse uri code) = "Unexpected response " ++ show code
Expand Down
3 changes: 2 additions & 1 deletion hackage-security-curl/hackage-security-curl.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ build-type: Simple
cabal-version: >=1.10

tested-with:
GHC == 9.14.1
GHC == 9.12.2
GHC == 9.10.2
GHC == 9.8.4
Expand All @@ -30,7 +31,7 @@ tested-with:

library
exposed-modules: Hackage.Security.Client.Repository.HttpLib.Curl
build-depends: base >= 4.11 && < 4.22,
build-depends: base >= 4.11 && < 4.23,
bytestring >= 0.10.8.2 && < 0.13,
network-uri >= 2.6 && < 2.7,
network >= 2.6 && < 3.3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ cabal-version: >=1.10
extra-source-files: ChangeLog.md

tested-with:
GHC == 9.14.1
GHC == 9.12.2
GHC == 9.10.2
GHC == 9.8.4
Expand All @@ -30,7 +31,7 @@ tested-with:

library
exposed-modules: Hackage.Security.Client.Repository.HttpLib.HttpClient
build-depends: base >= 4.11 && < 4.22,
build-depends: base >= 4.11 && < 4.23,
bytestring >= 0.10.8.2 && < 0.13,
http-client >= 0.4 && < 0.8,
http-types >= 0.12.2 && < 0.13,
Expand Down
9 changes: 5 additions & 4 deletions hackage-security/hackage-security.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ bug-reports: https://github.com/haskell/hackage-security/issues
build-type: Simple

tested-with:
GHC == 9.14.1
GHC == 9.12.2
GHC == 9.10.2
GHC == 9.8.4
Expand Down Expand Up @@ -106,11 +107,11 @@ library
Hackage.Security.Util.Stack
Hackage.Security.Util.TypedEmbedded

build-depends: base >= 4.11 && < 4.22,
build-depends: base >= 4.11 && < 4.23,
base16-bytestring >= 0.1.1 && < 1.1,
base64-bytestring >= 1.0 && < 1.3,
bytestring >= 0.10.8.2 && < 0.13,
containers >= 0.5.11 && < 0.8,
containers >= 0.5.11 && < 0.9,
cryptohash-sha256 >= 0.11 && < 0.12,
directory >= 1.3.1.5 && < 1.4,
ed25519 >= 0.0 && < 0.1,
Expand All @@ -123,8 +124,8 @@ library
-- 0.4.2 introduces TarIndex, 0.4.4 introduces more
-- functionality, 0.5.0 changes type of serialise
tar >= 0.5 && < 0.7,
template-haskell >= 2.13 && < 2.24,
time >= 1.8.0.2 && < 1.15,
template-haskell >= 2.13 && < 2.25,
time >= 1.8.0.2 && < 1.16,
transformers >= 0.3 && < 0.7,
zlib >= 0.5 && < 0.8,
-- whatever versions are bundled with ghc:
Expand Down
Loading
Loading