Skip to content

Commit e8d52bf

Browse files
authored
Merge pull request #60 from haskellari/ghc-9.2
Ghc 9.2
2 parents b52e1e5 + d7c59e5 commit e8d52bf

File tree

3 files changed

+116
-39
lines changed

3 files changed

+116
-39
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 109 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.12
11+
# version: 0.13.20211116
1212
#
13-
# REGENDATA ("0.12",["github","cabal.project"])
13+
# REGENDATA ("0.13.20211116",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -24,83 +24,152 @@ jobs:
2424
linux:
2525
name: Haskell-CI - Linux - ${{ matrix.compiler }}
2626
runs-on: ubuntu-18.04
27+
timeout-minutes:
28+
60
2729
container:
2830
image: buildpack-deps:bionic
2931
continue-on-error: ${{ matrix.allow-failure }}
3032
strategy:
3133
matrix:
3234
include:
3335
- compiler: ghcjs-8.4
36+
compilerKind: ghcjs
37+
compilerVersion: "8.4"
38+
setup-method: hvr-ppa
39+
allow-failure: false
40+
- compiler: ghc-9.2.1
41+
compilerKind: ghc
42+
compilerVersion: 9.2.1
43+
setup-method: ghcup
3444
allow-failure: false
3545
- compiler: ghc-9.0.1
46+
compilerKind: ghc
47+
compilerVersion: 9.0.1
48+
setup-method: hvr-ppa
3649
allow-failure: false
3750
- compiler: ghc-8.10.4
51+
compilerKind: ghc
52+
compilerVersion: 8.10.4
53+
setup-method: hvr-ppa
3854
allow-failure: false
3955
- compiler: ghc-8.8.4
56+
compilerKind: ghc
57+
compilerVersion: 8.8.4
58+
setup-method: hvr-ppa
4059
allow-failure: false
4160
- compiler: ghc-8.6.5
61+
compilerKind: ghc
62+
compilerVersion: 8.6.5
63+
setup-method: hvr-ppa
4264
allow-failure: false
4365
- compiler: ghc-8.4.4
66+
compilerKind: ghc
67+
compilerVersion: 8.4.4
68+
setup-method: hvr-ppa
4469
allow-failure: false
4570
- compiler: ghc-8.2.2
71+
compilerKind: ghc
72+
compilerVersion: 8.2.2
73+
setup-method: hvr-ppa
4674
allow-failure: false
4775
- compiler: ghc-8.0.2
76+
compilerKind: ghc
77+
compilerVersion: 8.0.2
78+
setup-method: hvr-ppa
4879
allow-failure: false
4980
- compiler: ghc-7.10.3
81+
compilerKind: ghc
82+
compilerVersion: 7.10.3
83+
setup-method: hvr-ppa
5084
allow-failure: false
5185
- compiler: ghc-7.8.4
86+
compilerKind: ghc
87+
compilerVersion: 7.8.4
88+
setup-method: hvr-ppa
5289
allow-failure: false
5390
- compiler: ghc-7.6.3
91+
compilerKind: ghc
92+
compilerVersion: 7.6.3
93+
setup-method: hvr-ppa
5494
allow-failure: false
5595
- compiler: ghc-7.4.2
96+
compilerKind: ghc
97+
compilerVersion: 7.4.2
98+
setup-method: hvr-ppa
5699
allow-failure: false
57100
fail-fast: false
58101
steps:
59102
- name: Set GHCJS environment variables
60103
run: |
61-
if echo $CC | grep -q ghcjs; then
62-
echo "GHCJS=true" >> $GITHUB_ENV
63-
echo "GHCJSARITH=1" >> $GITHUB_ENV
104+
if [ $HCKIND = ghcjs ]; then
105+
echo "GHCJS=true" >> "$GITHUB_ENV"
106+
echo "GHCJSARITH=1" >> "$GITHUB_ENV"
64107
else
65-
echo "GHCJS=false" >> $GITHUB_ENV
66-
echo "GHCJSARITH=0" >> $GITHUB_ENV
108+
echo "GHCJS=false" >> "$GITHUB_ENV"
109+
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
67110
fi
68111
env:
69-
CC: ${{ matrix.compiler }}
112+
HCKIND: ${{ matrix.compilerKind }}
113+
HCNAME: ${{ matrix.compiler }}
114+
HCVER: ${{ matrix.compilerVersion }}
70115
- name: apt
71116
run: |
72117
apt-get update
73-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common
74-
apt-add-repository -y 'ppa:hvr/ghc'
75-
if [ $((GHCJSARITH)) -ne 0 ] ; then apt-add-repository -y 'ppa:hvr/ghcjs' ; fi
76-
if [ $((GHCJSARITH)) -ne 0 ] ; then curl -sSL "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" | apt-key add - ; fi
77-
if [ $((GHCJSARITH)) -ne 0 ] ; then apt-add-repository -y 'deb https://deb.nodesource.com/node_10.x bionic main' ; fi
78-
apt-get update
79-
if [ $((GHCJSARITH)) -ne 0 ] ; then apt-get install -y $CC cabal-install-3.4 ghc-8.4.4 nodejs ; else apt-get install -y $CC cabal-install-3.4 ; fi
118+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
119+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
120+
mkdir -p "$HOME/.ghcup/bin"
121+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
122+
chmod a+x "$HOME/.ghcup/bin/ghcup"
123+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
124+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
125+
else
126+
apt-add-repository -y 'ppa:hvr/ghc'
127+
if [ $((GHCJSARITH)) -ne 0 ] ; then apt-add-repository -y 'ppa:hvr/ghcjs' ; fi
128+
if [ $((GHCJSARITH)) -ne 0 ] ; then curl -sSL "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" | apt-key add - ; fi
129+
if [ $((GHCJSARITH)) -ne 0 ] ; then apt-add-repository -y 'deb https://deb.nodesource.com/node_10.x bionic main' ; fi
130+
apt-get update
131+
if [ $((GHCJSARITH)) -ne 0 ] ; then apt-get install -y "$HCNAME" ghc-8.4.4 nodejs ; else apt-get install -y "$HCNAME" ; fi
132+
mkdir -p "$HOME/.ghcup/bin"
133+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
134+
chmod a+x "$HOME/.ghcup/bin/ghcup"
135+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
136+
fi
80137
env:
81-
CC: ${{ matrix.compiler }}
138+
HCKIND: ${{ matrix.compilerKind }}
139+
HCNAME: ${{ matrix.compiler }}
140+
HCVER: ${{ matrix.compilerVersion }}
82141
- name: Set PATH and environment variables
83142
run: |
84143
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
85144
if [ $((GHCJSARITH)) -ne 0 ] ; then echo "/opt/ghc/8.4.4/bin" >> $GITHUB_PATH ; fi
86-
echo "LANG=C.UTF-8" >> $GITHUB_ENV
87-
echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV
88-
echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV
89-
HCDIR=$(echo "/opt/$CC" | sed 's/-/\//')
90-
if [ $((GHCJSARITH)) -ne 0 ] ; then HCNAME=ghcjs ; else HCNAME=ghc ; fi
91-
HC=$HCDIR/bin/$HCNAME
92-
echo "HC=$HC" >> $GITHUB_ENV
93-
echo "HCPKG=$HCDIR/bin/$HCNAME-pkg" >> $GITHUB_ENV
94-
echo "HADDOCK=$HCDIR/bin/haddock" >> $GITHUB_ENV
95-
echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
145+
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
146+
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
147+
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
148+
HCDIR=/opt/$HCKIND/$HCVER
149+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
150+
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
151+
echo "HC=$HC" >> "$GITHUB_ENV"
152+
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
153+
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
154+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
155+
else
156+
HC=$HCDIR/bin/$HCKIND
157+
echo "HC=$HC" >> "$GITHUB_ENV"
158+
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
159+
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
160+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
161+
fi
162+
96163
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
97-
echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV
98-
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 70600)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV ; else echo "ARG_TESTS=--disable-tests" >> $GITHUB_ENV ; fi
99-
echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV
100-
echo "HEADHACKAGE=false" >> $GITHUB_ENV
101-
echo "ARG_COMPILER=--$HCNAME --with-compiler=$HC" >> $GITHUB_ENV
164+
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
165+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 70600)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
166+
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
167+
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
168+
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
102169
env:
103-
CC: ${{ matrix.compiler }}
170+
HCKIND: ${{ matrix.compilerKind }}
171+
HCNAME: ${{ matrix.compiler }}
172+
HCVER: ${{ matrix.compilerVersion }}
104173
- name: env
105174
run: |
106175
env
@@ -123,6 +192,10 @@ jobs:
123192
repository hackage.haskell.org
124193
url: http://hackage.haskell.org/
125194
EOF
195+
cat >> $CABAL_CONFIG <<EOF
196+
program-default-options
197+
ghc-options: $GHCJOBS +RTS -M3G -RTS
198+
EOF
126199
cat $CABAL_CONFIG
127200
- name: versions
128201
run: |
@@ -146,8 +219,8 @@ jobs:
146219
- name: install cabal-docspec
147220
run: |
148221
mkdir -p $HOME/.cabal/bin
149-
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20210111/cabal-docspec-0.0.0.20210111.xz > cabal-docspec.xz
150-
echo '0829bd034fba901cbcfe491d98ed8b28fd54f9cb5c91fa8e1ac62dc4413c9562 cabal-docspec.xz' | sha256sum -c -
222+
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20211114/cabal-docspec-0.0.0.20211114.xz > cabal-docspec.xz
223+
echo 'e224700d9e8c9ec7ec6bc3f542ba433cd9925a5d356676c62a9bd1f2c8be8f8a cabal-docspec.xz' | sha256sum -c -
151224
xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec
152225
rm -f cabal-docspec.xz
153226
chmod a+x $HOME/.cabal/bin/cabal-docspec
@@ -172,7 +245,8 @@ jobs:
172245
- name: generate cabal.project
173246
run: |
174247
PKGDIR_tree_diff="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/tree-diff-[0-9.]*')"
175-
echo "PKGDIR_tree_diff=${PKGDIR_tree_diff}" >> $GITHUB_ENV
248+
echo "PKGDIR_tree_diff=${PKGDIR_tree_diff}" >> "$GITHUB_ENV"
249+
rm -f cabal.project cabal.project.local
176250
touch cabal.project
177251
touch cabal.project.local
178252
echo "packages: ${PKGDIR_tree_diff}" >> cabal.project

src/Data/TreeDiff/Class.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,10 @@ instance ToExpr a => ToExpr (Mon.First a) where
379379
instance ToExpr a => ToExpr (Mon.Last a) where
380380

381381
-- ...
382+
#if !MIN_VERSION_base(4,16,0)
382383
instance ToExpr a => ToExpr (Semi.Option a) where
383384
toExpr (Semi.Option x) = App "Option" [toExpr x]
385+
#endif
384386
instance ToExpr a => ToExpr (Semi.Min a) where
385387
toExpr (Semi.Min x) = App "Min" [toExpr x]
386388
instance ToExpr a => ToExpr (Semi.Max a) where

tree-diff.cabal

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ tested-with:
5555
|| ==8.8.4
5656
|| ==8.10.4
5757
|| ==9.0.1
58+
|| ==9.2.1
5859
, GHCJS ==8.4
5960

6061
extra-source-files:
@@ -83,22 +84,22 @@ library
8384

8485
-- GHC boot libraries
8586
build-depends:
86-
, base >=4.5 && <4.16
87+
, base >=4.5 && <4.17
8788
, bytestring ^>=0.9.2.1 || ^>=0.10.0.2 || ^>=0.11.0.0
8889
, containers ^>=0.4.2.1 || ^>=0.5.0.0 || ^>=0.6.0.1
8990
, deepseq ^>=1.3.0.0 || ^>=1.4.0.0
9091
, parsec ^>=3.1.13.0
9192
, pretty ^>=1.1.1.0
9293
, text ^>=1.2.3.0
93-
, time ^>=1.4 || ^>=1.5.0.1 || ^>=1.6.0.1 || ^>=1.8.0.2 || ^>=1.9.3
94+
, time ^>=1.4 || ^>=1.5.0.1 || ^>=1.6.0.1 || ^>=1.8.0.2 || ^>=1.9.3 || ^>=1.10 || ^>=1.11 || ^>=1.12
9495

9596
build-depends:
9697
, aeson ^>=1.4.6.0 || ^>=1.5.6.0 || ^>=2.0.0.0
9798
, ansi-terminal >=0.10 && <0.12
9899
, ansi-wl-pprint ^>=0.6.8.2
99100
, base-compat ^>=0.10.5 || ^>=0.11.0 || ^>=0.12
100101
, bytestring-builder ^>=0.10.8.2.0
101-
, hashable ^>=1.2.7.0 || ^>=1.3.0.0
102+
, hashable ^>=1.2.7.0 || ^>=1.3.0.0 || ^>=1.4.0.1
102103
, parsers ^>=0.12.10
103104
, primitive ^>=0.7.1.0
104105
, QuickCheck ^>=2.14.2
@@ -115,7 +116,7 @@ library
115116
build-depends: ghc-prim
116117

117118
if !impl(ghc >=8.0)
118-
build-depends: semigroups ^>=0.19.1
119+
build-depends: semigroups ^>=0.19.1 || ^>=0.20
119120

120121
if !impl(ghc >=7.8)
121122
build-depends: generic-deriving >=1.13.1 && <1.15

0 commit comments

Comments
 (0)