Skip to content

Commit

Permalink
Merge pull request #42 from haskellari/ghc-9.8-strict
Browse files Browse the repository at this point in the history
Support GHC-9.8 for strict and strict-optics
  • Loading branch information
phadej committed Oct 4, 2023
2 parents 40a8b5f + c6d4e40 commit efa77bf
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 42 deletions.
63 changes: 36 additions & 27 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.15.20230313
# version: 0.17.20231004
#
# REGENDATA ("0.15.20230313",["github","cabal.project"])
# REGENDATA ("0.17.20231004",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -32,19 +32,24 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.6.1
- compiler: ghc-9.8.0.20230929
compilerKind: ghc
compilerVersion: 9.6.1
compilerVersion: 9.8.0.20230929
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.4
- compiler: ghc-9.6.3
compilerKind: ghc
compilerVersion: 9.4.4
compilerVersion: 9.6.3
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.7
- compiler: ghc-9.4.7
compilerKind: ghc
compilerVersion: 9.2.7
compilerVersion: 9.4.7
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.8
compilerKind: ghc
compilerVersion: 9.2.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.0.2
Expand Down Expand Up @@ -110,17 +115,19 @@ jobs:
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.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
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" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
"$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.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
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" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
env:
Expand All @@ -135,10 +142,12 @@ jobs:
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$HCKIND/$HCVER
if [ "${{ matrix.setup-method }}" = ghcup ]; then
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
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=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$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
Expand Down Expand Up @@ -197,8 +206,8 @@ jobs:
- name: install cabal-plan
run: |
mkdir -p $HOME/.cabal/bin
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz
echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.7.3.0/cabal-plan-0.7.3.0-x86_64-linux.xz > cabal-plan.xz
echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
rm -f cabal-plan.xz
chmod a+x $HOME/.cabal/bin/cabal-plan
Expand All @@ -211,8 +220,8 @@ jobs:
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 && HCNUMVER < 90800)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/strict-lens" >> cabal.project ; fi
if [ $((HCNUMVER >= 80000 && HCNUMVER < 90800)) -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
cat cabal.project
- name: sdist
Expand All @@ -237,15 +246,15 @@ 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 && HCNUMVER < 90800)) -ne 0 ] ; then echo "packages: ${PKGDIR_strict_lens}" >> cabal.project ; fi
if [ $((HCNUMVER >= 80000 && HCNUMVER < 90800)) -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 && HCNUMVER < 90800)) -ne 0 ] ; then echo "package strict-lens" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200 && HCNUMVER < 90800)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200 && HCNUMVER < 90800)) -ne 0 ] ; then echo "package strict-base-types" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200 && HCNUMVER < 90800)) -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
cat >> cabal.project <<EOF
Expand Down Expand Up @@ -273,10 +282,10 @@ 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 && HCNUMVER < 90800)) -ne 0 ] ; then cd ${PKGDIR_strict_lens} || false ; fi
if [ $((HCNUMVER >= 80000 && HCNUMVER < 90800)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
if [ $((HCNUMVER >= 80000 && HCNUMVER < 90800)) -ne 0 ] ; then cd ${PKGDIR_strict_base_types} || false ; fi
if [ $((HCNUMVER >= 80000 && HCNUMVER < 90800)) -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
- name: haddock
Expand Down
3 changes: 3 additions & 0 deletions cabal.haskell-ci
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ install-dependencies: False
-- to allow different set of packages per GHC versions
jobs-selection: any

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

-- test that we build fine with assoc flag disabled
-- constraint-set no-assoc
-- constraints: strict -assoc
Expand Down
6 changes: 3 additions & 3 deletions strict-base-types/strict-base-types.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ tested-with:
|| ==8.8.4
|| ==8.10.7
|| ==9.0.2
|| ==9.2.7
|| ==9.4.4
|| ==9.6.1
|| ==9.2.8
|| ==9.4.7
|| ==9.6.3

extra-source-files: CHANGES

Expand Down
6 changes: 3 additions & 3 deletions strict-lens/strict-lens.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ tested-with:
|| ==8.8.4
|| ==8.10.7
|| ==9.0.2
|| ==9.2.7
|| ==9.4.4
|| ==9.6.1
|| ==9.2.8
|| ==9.4.7
|| ==9.6.3

extra-source-files: CHANGES.md

Expand Down
7 changes: 4 additions & 3 deletions strict-optics/strict-optics.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ tested-with:
|| ==8.8.4
|| ==8.10.7
|| ==9.0.2
|| ==9.2.7
|| ==9.4.4
|| ==9.6.1
|| ==9.2.8
|| ==9.4.7
|| ==9.6.3
|| ==9.8.1

extra-source-files: CHANGES.md

Expand Down
14 changes: 8 additions & 6 deletions strict/strict.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Name: strict
Version: 0.5
x-revision: 1
Synopsis: Strict data types and String IO.
Category: Data, System
Description:
Expand Down Expand Up @@ -66,9 +67,10 @@ tested-with:
|| ==8.8.4
|| ==8.10.7
|| ==9.0.2
|| ==9.2.7
|| ==9.4.4
|| ==9.6.1
|| ==9.2.8
|| ==9.4.7
|| ==9.6.3
|| ==9.8.1

library
default-language: Haskell2010
Expand All @@ -79,10 +81,10 @@ library
base >= 4.5.0.0 && < 5
, assoc >= 1.1 && < 1.2
, binary >= 0.5.1.0 && < 0.9
, bytestring >= 0.9.2.1 && < 0.12
, deepseq >= 1.3.0.0 && < 1.5
, bytestring >= 0.9.2.1 && < 0.13
, deepseq >= 1.3.0.0 && < 1.6
, hashable >= 1.2.7.0 && < 1.5
, text >= 1.2.3.0 && < 1.3 || >=2.0 && <2.1
, text >= 1.2.3.0 && < 1.3 || >=2.0 && <2.2
, these >= 1.2 && < 1.3
, transformers >= 0.3.0.0 && < 0.7
, ghc-prim
Expand Down

0 comments on commit efa77bf

Please sign in to comment.