Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GHC 9.10 support #264

Merged
merged 4 commits into from
Feb 23, 2025
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
100 changes: 62 additions & 38 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.20240708
# version: 0.19.20250216
#
# REGENDATA ("0.19.20240708",["github","--haddock","--github-patches",".github/haskell-ci.patch","cabal.project"])
# REGENDATA ("0.19.20250216",["github","--haddock","--github-patches",".github/haskell-ci.patch","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -34,7 +34,7 @@ jobs:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
needs: tools_changed
if: ${{ needs.tools_changed.outputs.should_skip != 'true' }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes:
60
container:
Expand All @@ -43,14 +43,19 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.8.1
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.8.1
compilerVersion: 9.10.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.3
- compiler: ghc-9.8.3
compilerKind: ghc
compilerVersion: 9.8.3
setup-method: ghcup-vanilla
allow-failure: false
- compiler: ghc-9.6.6
compilerKind: ghc
compilerVersion: 9.6.3
compilerVersion: 9.6.6
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
Expand All @@ -75,40 +80,59 @@ jobs:
allow-failure: false
fail-fast: false
steps:
- name: apt
- 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
- name: Install GHCup
run: |
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
- name: Install cabal-install
run: |
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
- name: Install GHC (GHCup)
if: matrix.setup-method == 'ghcup'
run: |
"$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
- name: Install GHC (GHCup vanilla)
if: matrix.setup-method == 'ghcup-vanilla'
run: |
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$HCKIND/$HCVER
"$HOME/.ghcup/bin/ghcup" -s https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-vanilla-0.0.8.yaml 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"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$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
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$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"
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand Down Expand Up @@ -164,11 +188,11 @@ jobs:
- name: initial cabal.project for sdist
run: |
touch cabal.project
echo "packages: $GITHUB_WORKSPACE/source/code/osv" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/code/hsec-tools" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/code/cvss" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/code/hsec-core" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/code/hsec-sync" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/code/osv" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/code/hsec-core" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/code/cvss" >> cabal.project
cat cabal.project
- name: sdist
run: |
Expand All @@ -180,33 +204,33 @@ jobs:
find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \;
- name: generate cabal.project
run: |
PKGDIR_osv="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/osv-[0-9.]*')"
echo "PKGDIR_osv=${PKGDIR_osv}" >> "$GITHUB_ENV"
PKGDIR_hsec_tools="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/hsec-tools-[0-9.]*')"
echo "PKGDIR_hsec_tools=${PKGDIR_hsec_tools}" >> "$GITHUB_ENV"
PKGDIR_cvss="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/cvss-[0-9.]*')"
echo "PKGDIR_cvss=${PKGDIR_cvss}" >> "$GITHUB_ENV"
PKGDIR_hsec_core="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/hsec-core-[0-9.]*')"
echo "PKGDIR_hsec_core=${PKGDIR_hsec_core}" >> "$GITHUB_ENV"
PKGDIR_hsec_sync="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/hsec-sync-[0-9.]*')"
echo "PKGDIR_hsec_sync=${PKGDIR_hsec_sync}" >> "$GITHUB_ENV"
PKGDIR_osv="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/osv-[0-9.]*')"
echo "PKGDIR_osv=${PKGDIR_osv}" >> "$GITHUB_ENV"
PKGDIR_hsec_core="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/hsec-core-[0-9.]*')"
echo "PKGDIR_hsec_core=${PKGDIR_hsec_core}" >> "$GITHUB_ENV"
PKGDIR_cvss="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/cvss-[0-9.]*')"
echo "PKGDIR_cvss=${PKGDIR_cvss}" >> "$GITHUB_ENV"
rm -f cabal.project cabal.project.local
touch cabal.project
touch cabal.project.local
echo "packages: ${PKGDIR_osv}" >> cabal.project
echo "packages: ${PKGDIR_hsec_tools}" >> cabal.project
echo "packages: ${PKGDIR_cvss}" >> cabal.project
echo "packages: ${PKGDIR_hsec_core}" >> cabal.project
echo "packages: ${PKGDIR_hsec_sync}" >> cabal.project
echo "packages: ${PKGDIR_osv}" >> cabal.project
echo "packages: ${PKGDIR_hsec_core}" >> cabal.project
echo "packages: ${PKGDIR_cvss}" >> cabal.project
echo "package osv" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo "package hsec-tools" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo "package cvss" >> cabal.project
echo "package hsec-sync" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo "package hsec-core" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo "package hsec-sync" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo "package osv" >> cabal.project
echo "package cvss" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
EOF
Expand Down Expand Up @@ -238,15 +262,15 @@ jobs:
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
- name: cabal check
run: |
cd ${PKGDIR_osv} || false
${CABAL} -vnormal check
cd ${PKGDIR_hsec_tools} || false
${CABAL} -vnormal check
cd ${PKGDIR_cvss} || false
cd ${PKGDIR_hsec_sync} || false
${CABAL} -vnormal check
cd ${PKGDIR_hsec_core} || false
${CABAL} -vnormal check
cd ${PKGDIR_hsec_sync} || false
${CABAL} -vnormal check
cd ${PKGDIR_osv} || false
cd ${PKGDIR_cvss} || false
${CABAL} -vnormal check
- name: haddock
run: |
Expand All @@ -256,8 +280,8 @@ jobs:
rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: save cache
uses: actions/cache/save@v4
if: always()
uses: actions/cache/save@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
5 changes: 3 additions & 2 deletions code/cvss/cvss.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ author: Tristan de Cacqueray
maintainer: tdecacqu@redhat.com
category: Data
extra-doc-files: CHANGELOG.md
tested-with: GHC ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1
tested-with:
GHC ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.3 || ==9.10.1 || ==9.12.1

library
exposed-modules: Security.CVSS
Expand All @@ -31,7 +32,7 @@ test-suite spec
build-depends:
, base <5
, cvss
, tasty <1.5
, tasty <1.6
, tasty-hunit <1.0
, text

Expand Down
13 changes: 4 additions & 9 deletions code/hsec-core/hsec-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,22 @@ category: Data
extra-doc-files: CHANGELOG.md

tested-with:
GHC ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1
GHC ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.3 || ==9.10.1 || ==9.12.1

library
exposed-modules:
Security.Advisories.Core.Advisory
Security.Advisories.Core.HsecId

build-depends:
, base >=4.14 && <4.20
, Cabal-syntax >=3.8.1.0 && <3.13
, base >=4.14 && <5
, Cabal-syntax >=3.8.1.0 && <3.15
, cvss >= 0.2 && < 0.3
, osv >= 0.1 && < 0.2
, pandoc-types >=1.22 && <2
, safe >=0.3 && <0.4
, text >=1.2 && <3
, time >=1.9 && <1.14

-- , commonmark ^>=0.2.2
-- , commonmark-pandoc >=0.2 && <0.3
-- , containers >=0.6 && <0.7
-- , mtl >=2.2 && <2.4
, time >=1.9 && <1.15
hs-source-dirs: src
default-language: Haskell2010
ghc-options:
Expand Down
14 changes: 6 additions & 8 deletions code/hsec-sync/hsec-sync.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ maintainer: gautier.difolco@gmail.com
category: Data
extra-doc-files: CHANGELOG.md, overview.png, recommended-workflow.png
tested-with:
GHC ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1
GHC ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.3 || ==9.10.1 || ==9.12.1

library
exposed-modules: Security.Advisories.Sync
Expand All @@ -30,19 +30,17 @@ library
Security.Advisories.Sync.Url

build-depends:
, aeson >=2.0 && <2.3
, base >=4.14 && <4.21
, aeson >=2.0 && <3
, base >=4.14 && <5
, bytestring >=0.10 && <0.13
, directory >=1.3 && <1.4
, either >=5.0 && <5.1
, extra >=1.7 && <1.8
, feed >=1.3 && <1.4
, extra >=1.7 && <1.9
, filepath >=1.4 && <1.6
, hsec-core ^>=0.2
, http-client >=0.7.0 && <0.8
, lens >=5.1 && <5.4
, tar >=0.5 && <0.7
, tar-conduit >=0.3 && <0.5
, temporary >=1 && <2
, text >=1.2 && <3
, time >=1.9 && <1.15
Expand All @@ -66,9 +64,9 @@ executable hsec-sync
-- other-extensions:
build-depends:
, aeson >=2.0.1.0 && <3
, base >=4.14 && <4.20
, base >=4.14 && <5
, bytestring >=0.10 && <0.13
, filepath >=1.4 && <1.5
, filepath >=1.4 && <1.6
, hsec-sync
, optparse-applicative >=0.17 && <0.19
, text >=1.2 && <3
Expand Down
4 changes: 4 additions & 0 deletions code/hsec-tools/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.0.1

- Rework HTML/Atom generation, use `atom-conduit` instead of `feed`

## 0.1.1.0

- Redesign index
32 changes: 19 additions & 13 deletions code/hsec-tools/hsec-tools.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ extra-source-files:
test/golden/*.md

tested-with:
GHC ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1
GHC ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.3 || ==9.10.1 || ==9.12.1

library
exposed-modules:
Expand All @@ -51,35 +51,41 @@ library

build-depends:
, aeson >=2.0.1.0 && <3
, base >=4.14 && <4.21
, atom-conduit >=0.9 && <0.10
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this could be mentioned in the CHANGELOG?

, base >=4.14 && <5
, bytestring >=0.10 && <0.14
, Cabal-syntax >=3.8.1.0 && <3.13
, Cabal-syntax >=3.8.1.0 && <3.15
, commonmark ^>=0.2.2
, commonmark-pandoc >=0.2 && <0.3
, containers >=0.6 && <0.7
, conduit >=1.3 && <1.4
, conduit-extra >=1.3 && <1.4
, containers >=0.6 && <0.8
, cvss >= 0.2 && < 0.3
, data-default >=0.7 && <0.8
, directory <2
, extra ^>=1.7.5
, filepath >=1.4 && <1.5
, extra >=1.7 && <1.9
, filepath >=1.4 && <1.6
, hsec-core ^>= 0.2
, feed ==1.3.*
, file-embed >=0.0.13.0 && <0.0.17
, lucid >=2.9.0 && < 3
, mtl >=2.2 && <2.4
, osv >= 0.1 && < 0.2
, pandoc >=2.0 && <3.6
, pandoc >=2.0 && <3.8
, pandoc-types >=1.22 && <2
, parsec >=3 && <4
, pathwalk >=0.3 && <0.4
, pretty >=1.0 && <1.2
, prettyprinter >=1.7 && <1.8
, process >=1.6 && <1.7
, refined >=0.7 && <0.9
, resourcet >=1.2 && <1.4
, safe >=0.3 && <0.4
, text >=1.2 && <3
, template-haskell >=2.16.0.0 && <2.23
, time >=1.9 && <1.14
, template-haskell >=2.16.0.0 && <2.24
, time >=1.9 && <1.15
, toml-parser >=2.0.0.0 && <2.1
, uri-bytestring >=0.3 && <0.5
, xml-conduit >=1.9 && <1.11
, validation-selective >=0.1 && <1

hs-source-dirs: src
Expand All @@ -101,10 +107,10 @@ executable hsec-tools
-- other-extensions:
build-depends:
, aeson >=2.0.1.0 && <3
, base >=4.14 && <4.20
, base >=4.14 && <5
, bytestring >=0.10 && <0.13
, Cabal-syntax >=3.8.1.0 && <3.11
, filepath >=1.4 && <1.5
, Cabal-syntax >=3.8.1.0 && <3.15
, filepath >=1.4 && <1.6
, hsec-core ^>= 0.2
, hsec-tools
, optparse-applicative >=0.17 && <0.19
Expand Down
Loading
Loading