Skip to content

Commit

Permalink
Merge pull request #45 from haskellari/noble
Browse files Browse the repository at this point in the history
Support GHC-8.6.5...9.10.1
  • Loading branch information
phadej authored Jul 3, 2024
2 parents ec35bdb + 56158be commit 8215f89
Show file tree
Hide file tree
Showing 11 changed files with 190 additions and 466 deletions.
153 changes: 52 additions & 101 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.17.20231010
# version: 0.19.20240702
#
# REGENDATA ("0.17.20231010",["github","cabal.project"])
# REGENDATA ("0.19.20240702",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -27,24 +27,29 @@ 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.4.7
- compiler: ghc-9.6.6
compilerKind: ghc
compilerVersion: 9.4.7
compilerVersion: 9.6.6
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
Expand All @@ -65,69 +70,24 @@ jobs:
- compiler: ghc-8.8.4
compilerKind: ghc
compilerVersion: 8.8.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.5
compilerKind: ghc
compilerVersion: 8.6.5
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-8.4.4
compilerKind: ghc
compilerVersion: 8.4.4
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-8.2.2
compilerKind: ghc
compilerVersion: 8.2.2
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-8.0.2
compilerKind: ghc
compilerVersion: 8.0.2
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-7.10.3
compilerKind: ghc
compilerVersion: 7.10.3
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-7.8.4
compilerKind: ghc
compilerVersion: 7.8.4
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-7.6.3
compilerKind: ghc
compilerVersion: 7.6.3
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-7.4.2
compilerKind: ghc
compilerVersion: 7.4.2
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
fail-fast: false
steps:
- name: apt
run: |
apt-get update
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
if [ "${{ matrix.setup-method }}" = ghcup ]; then
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$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.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
else
apt-add-repository -y 'ppa:hvr/ghc'
apt-get update
apt-get install -y "$HCNAME"
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
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"
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.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -139,22 +99,13 @@ jobs:
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$HCKIND/$HCVER
if [ "${{ matrix.setup-method }}" = ghcup ]; then
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.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
else
HC=$HCDIR/bin/$HCKIND
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
fi
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"
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 @@ -211,16 +162,16 @@ jobs:
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- 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/strict" >> cabal.project
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/strict-lens" >> cabal.project ; fi
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/strict-base-types" >> cabal.project ; fi
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/strict-optics" >> cabal.project ; fi
echo "packages: $GITHUB_WORKSPACE/source/strict-lens" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/strict-base-types" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/strict-optics" >> cabal.project
cat cabal.project
- name: sdist
run: |
Expand All @@ -244,28 +195,28 @@ jobs:
touch cabal.project
touch cabal.project.local
echo "packages: ${PKGDIR_strict}" >> cabal.project
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then echo "packages: ${PKGDIR_strict_lens}" >> cabal.project ; fi
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then echo "packages: ${PKGDIR_strict_base_types}" >> cabal.project ; fi
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then echo "packages: ${PKGDIR_strict_optics}" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package strict" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package strict-lens" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package strict-base-types" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package strict-optics" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
echo "packages: ${PKGDIR_strict_lens}" >> cabal.project
echo "packages: ${PKGDIR_strict_base_types}" >> cabal.project
echo "packages: ${PKGDIR_strict_optics}" >> cabal.project
echo "package strict" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo "package strict-lens" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo "package strict-base-types" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo "package strict-optics" >> 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 /^(strict|strict-base-types|strict-lens|strict-optics)$/; }' >> cabal.project.local
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(strict|strict-base-types|strict-lens|strict-optics)$/; }' >> 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 @@ -280,12 +231,12 @@ jobs:
run: |
cd ${PKGDIR_strict} || false
${CABAL} -vnormal check
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then cd ${PKGDIR_strict_lens} || false ; fi
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then cd ${PKGDIR_strict_base_types} || false ; fi
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then cd ${PKGDIR_strict_optics} || false ; fi
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
cd ${PKGDIR_strict_lens} || false
${CABAL} -vnormal check
cd ${PKGDIR_strict_base_types} || false
${CABAL} -vnormal check
cd ${PKGDIR_strict_optics} || false
${CABAL} -vnormal check
- name: haddock
run: |
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
Expand All @@ -294,7 +245,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: 0 additions & 3 deletions cabal.haskell-ci
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ branches: master
-- we have inplace dependencies
install-dependencies: False

-- to allow different set of packages per GHC versions
jobs-selection: any

-- Don't use head.hackage
head-hackage: False

Expand Down
25 changes: 11 additions & 14 deletions strict-base-types/strict-base-types.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: strict-base-types
version: 0.8
x-revision: 1
version: 0.8.1
synopsis: Strict variants of the types provided in base.
category: Data
description:
Expand All @@ -25,17 +24,15 @@ homepage: https://github.com/haskell-strict/strict
cabal-version: >=1.10
build-type: Simple
tested-with:
GHC ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.5
GHC ==8.6.5
|| ==8.8.4
|| ==8.10.7
|| ==9.0.2
|| ==9.2.8
|| ==9.4.7
|| ==9.6.3
|| ==9.8.1
|| ==9.4.8
|| ==9.6.6
|| ==9.8.2
|| ==9.10.1

extra-source-files: CHANGES

Expand All @@ -48,11 +45,11 @@ library
default-language: Haskell2010
ghc-options: -Wall
build-depends:
aeson >=2.1.2.1 && <2.3
, base >=4.9 && <5
, quickcheck-instances >=0.3.24 && <0.4
, strict >=0.5 && <0.5.1
, strict-lens >=0.4 && <0.5
aeson >=2.2.3.0 && <2.3
, base >=4.12.0.0 && <5
, quickcheck-instances >=0.3.31 && <0.4
, strict >=0.5.1 && <0.5.2
, strict-lens >=0.4.1 && <0.4.2

hs-source-dirs: src
exposed-modules:
Expand Down
20 changes: 9 additions & 11 deletions strict-lens/strict-lens.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: strict-lens
version: 0.4.0.3
version: 0.4.1
synopsis: Lenses for types in strict package
category: Data, Lenses
description: Lenses for types in strict package.
Expand All @@ -18,17 +18,15 @@ homepage: https://github.com/haskell-strict/strict
cabal-version: >=1.10
build-type: Simple
tested-with:
GHC ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.5
GHC ==8.6.5
|| ==8.8.4
|| ==8.10.7
|| ==9.0.2
|| ==9.2.8
|| ==9.4.7
|| ==9.6.3
|| ==9.8.1
|| ==9.4.8
|| ==9.6.6
|| ==9.8.2
|| ==9.10.1

extra-source-files: CHANGES.md

Expand All @@ -47,9 +45,9 @@ library
-Wnoncanonical-monadfail-instances

build-depends:
base >=4.9 && <5
, lens >=5.2.1 && <5.3
, strict >=0.5 && <0.6
base >=4.12.0.0 && <5
, lens >=5.2.1 && <5.4
, strict >=0.5.1 && <0.6

hs-source-dirs: src
exposed-modules: Data.Strict.Lens
21 changes: 9 additions & 12 deletions strict-optics/strict-optics.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: strict-optics
version: 0.4.0.1
x-revision: 2
version: 0.4.1
synopsis: Optics for types in strict package
category: Data, Optics
description: Optics for types in strict package.
Expand All @@ -20,17 +19,15 @@ homepage: https://github.com/haskell-strict/strict
cabal-version: >=1.10
build-type: Simple
tested-with:
GHC ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.5
GHC ==8.6.5
|| ==8.8.4
|| ==8.10.7
|| ==9.0.2
|| ==9.2.8
|| ==9.4.7
|| ==9.6.3
|| ==9.8.1
|| ==9.4.8
|| ==9.6.6
|| ==9.8.2
|| ==9.10.1

extra-source-files: CHANGES.md

Expand All @@ -46,9 +43,9 @@ library
-Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances

build-depends:
base >=4.9 && <5
, optics-core >=0.3 && <0.5
, strict >=0.4 && <0.5.1
base >=4.12.0.0 && <5
, optics-core >=0.4.1.1 && <0.5
, strict >=0.5.1 && <0.5.2

hs-source-dirs: src
exposed-modules: Data.Strict.Optics
Loading

0 comments on commit 8215f89

Please sign in to comment.