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

support GHC 9.10 #220

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
87 changes: 35 additions & 52 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# This GitHub workflow config has been generated by a script via
#
# haskell-ci 'github' '--haddock' '--hlint' '--hlint-job' '9.4.8' '--github-patches' '.github/haskell-ci.patch' 'cabal.project'
# haskell-ci 'github' '--haddock' '--github-patches' '.github/haskell-ci.patch' 'cabal.project'
#
# To regenerate the script (for example after adjusting tested-with) run
#
# haskell-ci regenerate
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.17.20231110
# version: 0.19.20240708
#
# REGENDATA ("0.17.20231110",["github","--haddock","--hlint","--hlint-job","9.4.8","--github-patches",".github/haskell-ci.patch","cabal.project"])
# REGENDATA ("0.19.20240708",["github","--haddock","--github-patches",".github/haskell-ci.patch","cabal.project"])
#
name: Haskell-CI
on:
Expand Down Expand Up @@ -38,19 +38,24 @@ jobs:
timeout-minutes:
60
container:
image: buildpack-deps:bionic
image: buildpack-deps:jammy
continue-on-error: ${{ matrix.allow-failure }}
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.2
compilerKind: ghc
compilerVersion: 9.6.3
compilerVersion: 9.8.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.6
compilerKind: ghc
compilerVersion: 9.6.6
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
Expand Down Expand Up @@ -80,10 +85,10 @@ jobs:
apt-get update
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
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"
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)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -101,7 +106,7 @@ jobs:
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"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.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"
Expand Down Expand Up @@ -148,11 +153,6 @@ jobs:
- name: update cabal index
run: |
$CABAL v2-update -v
- name: cache (tools)
uses: actions/cache/restore@v3
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-d8b62173
path: ~/.haskell-ci-tools
- name: install cabal-plan
run: |
mkdir -p $HOME/.cabal/bin
Expand All @@ -162,29 +162,17 @@ jobs:
rm -f cabal-plan.xz
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: install hlint
blackheaven marked this conversation as resolved.
Show resolved Hide resolved
run: |
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then HLINTVER=$(cd /tmp && (${CABAL} v2-install -v $ARG_COMPILER --dry-run hlint --constraint='hlint >=3.5 && <3.6' | perl -ne 'if (/\bhlint-(\d+(\.\d+)*)\b/) { print "$1"; last; }')); echo "HLint version $HLINTVER" ; fi
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then if [ ! -e $HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint ]; then echo "Downloading HLint version $HLINTVER"; mkdir -p $HOME/.haskell-ci-tools; curl --write-out 'Status Code: %{http_code} Redirects: %{num_redirects} Total time: %{time_total} Total Dsize: %{size_download}\n' --silent --location --output $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz "https://github.com/ndmitchell/hlint/releases/download/v$HLINTVER/hlint-$HLINTVER-x86_64-linux.tar.gz"; tar -xzv -f $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz -C $HOME/.haskell-ci-tools; fi ; fi
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then mkdir -p $CABAL_DIR/bin && ln -sf "$HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint" $CABAL_DIR/bin/hlint ; fi
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then hlint --version ; fi
- name: save cache (tools)
uses: actions/cache/save@v3
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-d8b62173
path: ~/.haskell-ci-tools
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: source
- name: initial cabal.project for sdist
run: |
touch cabal.project
echo "packages: $GITHUB_WORKSPACE/source/code/hsec-core" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/code/hsec-tools" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/code/hsec-sync" >> 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
cat cabal.project
- name: sdist
Expand All @@ -199,43 +187,43 @@ jobs:
run: |
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_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_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_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_hsec_core}" >> 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_cvss}" >> cabal.project
echo "package hsec-tools" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo "package hsec-sync" >> cabal.project
echo "package cvss" >> 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 osv" >> cabal.project
echo "package hsec-sync" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo "package cvss" >> cabal.project
echo "package osv" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(cvss|osv|hsec-core|hsec-tools|hsec-sync)$/; }' >> cabal.project.local
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(cvss|hsec-core|hsec-sync|hsec-tools|osv)$/; }' >> 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@v3
uses: actions/cache/restore@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
Expand All @@ -253,21 +241,16 @@ jobs:
- name: tests
run: |
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
- name: hlint
run: |
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_hsec_tools} && hlint -XHaskell2010 src) ; fi
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_hsec_tools} && hlint -XHaskell2010 app) ; fi
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_hsec_core} && hlint -XHaskell2010 src) ; fi
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_osv} && hlint -XHaskell2010 src) ; fi
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_cvss} && hlint -XHaskell2010 src) ; fi
- name: cabal check
run: |
cd ${PKGDIR_hsec_core} || false
${CABAL} -vnormal check
cd ${PKGDIR_hsec_tools} || false
${CABAL} -vnormal check
cd ${PKGDIR_cvss} || false
${CABAL} -vnormal check
cd ${PKGDIR_hsec_core} || false
${CABAL} -vnormal check
cd ${PKGDIR_hsec_sync} || false
${CABAL} -vnormal check
cd ${PKGDIR_osv} || false
${CABAL} -vnormal check
- name: haddock
Expand All @@ -278,7 +261,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 }}
Expand Down
3 changes: 2 additions & 1 deletion 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: [email protected]
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.2 || ==9.10.1

library
exposed-modules: Security.CVSS
Expand Down
6 changes: 3 additions & 3 deletions code/hsec-core/hsec-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ 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.2 || ==9.10.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.11
, base >=4.14 && <4.21
, Cabal-syntax >=3.8.1.0 && <3.13
, cvss >= 0.1 && < 0.2
, osv >= 0.1 && < 0.2
, pandoc-types >=1.22 && <2
Expand Down
12 changes: 6 additions & 6 deletions code/hsec-sync/hsec-sync.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ maintainer: [email protected]
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.2 || ==9.10.1

library
exposed-modules: Security.Advisories.Sync
Expand All @@ -30,14 +30,14 @@ library
Security.Advisories.Sync.Git

build-depends:
, base >=4.14 && <4.20
, base >=4.14 && <4.21
, directory >=1.3 && <1.4
, extra >=1.7 && <1.8
, feed >=1.3 && <1.4
, filepath >=1.4 && <1.5
, filepath >=1.4 && <1.6
, hsec-core ^>= 0.2
, http-client >=0.7.0 && <0.8
, lens >=5.1 && <5.3
, lens >=5.1 && <5.4
, process >=1.6 && <1.7
, text >=1.2 && <3
, time >=1.9 && <1.14
Expand All @@ -60,9 +60,9 @@ executable hsec-sync
-- other-extensions:
build-depends:
, aeson >=2.0.1.0 && <3
, base >=4.14 && <4.20
, base >=4.14 && <4.21
, 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
14 changes: 7 additions & 7 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.2 || ==9.10.1

library
exposed-modules:
Expand All @@ -44,16 +44,16 @@ library

build-depends:
, aeson >=2.0.1.0 && <3
, base >=4.14 && <4.20
, base >=4.14 && <4.21
, bytestring >=0.10 && <0.13
, Cabal-syntax >=3.8.1.0 && <3.11
, Cabal-syntax >=3.8.1.0 && <3.13
, commonmark ^>=0.2.2
, commonmark-pandoc >=0.2 && <0.3
, containers >=0.6 && <0.7
, cvss >= 0.1 && < 0.2
, directory <2
, extra ^>=1.7.5
, filepath >=1.4 && <1.5
, filepath >=1.4 && <1.6
, hsec-core ^>= 0.2
, feed ==1.3.*
, file-embed >=0.0.13.0 && <0.0.17
Expand Down Expand Up @@ -88,10 +88,10 @@ executable hsec-tools
-- other-extensions:
build-depends:
, aeson >=2.0.1.0 && <3
, base >=4.14 && <4.20
, base >=4.14 && <4.21
, 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.13
, filepath >=1.4 && <1.6
, hsec-core ^>= 0.2
, hsec-tools
, optparse-applicative >=0.17 && <0.19
Expand Down
4 changes: 2 additions & 2 deletions code/osv/osv.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ 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.2 || ==9.10.1

library
exposed-modules:
Security.OSV

build-depends:
, aeson >=2.0.1.0 && <3
, base >=4.14 && <4.20
, base >=4.14 && <4.21
, cvss >= 0.1 && < 0.2
, text >=1.2 && <3
, time >=1.9 && <1.14
Expand Down
Loading