Skip to content

Commit 2ff39e0

Browse files
authored
Merge pull request #18 from phadej/ghc-9.4
Allow base-4.17 and other bound relaxations
2 parents 0b8f965 + d6320e4 commit 2ff39e0

File tree

2 files changed

+123
-43
lines changed

2 files changed

+123
-43
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 113 additions & 31 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.15.20220822
1212
#
13-
# REGENDATA ("0.12",["github","cabal.project"])
13+
# REGENDATA ("0.15.20220822",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -23,72 +23,147 @@ on:
2323
jobs:
2424
linux:
2525
name: Haskell-CI - Linux - ${{ matrix.compiler }}
26-
runs-on: ubuntu-18.04
26+
runs-on: ubuntu-20.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:
33-
- compiler: ghc-9.0.1
35+
- compiler: ghc-9.4.1
36+
compilerKind: ghc
37+
compilerVersion: 9.4.1
38+
setup-method: ghcup
3439
allow-failure: false
35-
- compiler: ghc-8.10.4
40+
- compiler: ghc-9.2.4
41+
compilerKind: ghc
42+
compilerVersion: 9.2.4
43+
setup-method: ghcup
44+
allow-failure: false
45+
- compiler: ghc-9.0.2
46+
compilerKind: ghc
47+
compilerVersion: 9.0.2
48+
setup-method: ghcup
49+
allow-failure: false
50+
- compiler: ghc-8.10.7
51+
compilerKind: ghc
52+
compilerVersion: 8.10.7
53+
setup-method: ghcup
3654
allow-failure: false
3755
- compiler: ghc-8.8.4
56+
compilerKind: ghc
57+
compilerVersion: 8.8.4
58+
setup-method: hvr-ppa
3859
allow-failure: false
3960
- compiler: ghc-8.6.5
61+
compilerKind: ghc
62+
compilerVersion: 8.6.5
63+
setup-method: hvr-ppa
4064
allow-failure: false
4165
- compiler: ghc-8.4.4
66+
compilerKind: ghc
67+
compilerVersion: 8.4.4
68+
setup-method: hvr-ppa
4269
allow-failure: false
4370
- compiler: ghc-8.2.2
71+
compilerKind: ghc
72+
compilerVersion: 8.2.2
73+
setup-method: hvr-ppa
4474
allow-failure: false
4575
- compiler: ghc-8.0.2
76+
compilerKind: ghc
77+
compilerVersion: 8.0.2
78+
setup-method: hvr-ppa
4679
allow-failure: false
4780
- compiler: ghc-7.10.3
81+
compilerKind: ghc
82+
compilerVersion: 7.10.3
83+
setup-method: hvr-ppa
4884
allow-failure: false
4985
- compiler: ghc-7.8.4
86+
compilerKind: ghc
87+
compilerVersion: 7.8.4
88+
setup-method: hvr-ppa
5089
allow-failure: false
5190
- compiler: ghc-7.6.3
91+
compilerKind: ghc
92+
compilerVersion: 7.6.3
93+
setup-method: hvr-ppa
5294
allow-failure: false
5395
- compiler: ghc-7.4.2
96+
compilerKind: ghc
97+
compilerVersion: 7.4.2
98+
setup-method: hvr-ppa
5499
allow-failure: false
55100
- compiler: ghc-7.2.2
101+
compilerKind: ghc
102+
compilerVersion: 7.2.2
103+
setup-method: hvr-ppa
56104
allow-failure: false
57105
- compiler: ghc-7.0.4
106+
compilerKind: ghc
107+
compilerVersion: 7.0.4
108+
setup-method: hvr-ppa
58109
allow-failure: false
59110
fail-fast: false
60111
steps:
61112
- name: apt
62113
run: |
63114
apt-get update
64-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common
65-
apt-add-repository -y 'ppa:hvr/ghc'
66-
apt-get update
67-
apt-get install -y $CC cabal-install-3.4
115+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
116+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
117+
mkdir -p "$HOME/.ghcup/bin"
118+
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
119+
chmod a+x "$HOME/.ghcup/bin/ghcup"
120+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
121+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
122+
else
123+
apt-add-repository -y 'ppa:hvr/ghc'
124+
apt-get update
125+
apt-get install -y "$HCNAME"
126+
mkdir -p "$HOME/.ghcup/bin"
127+
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
128+
chmod a+x "$HOME/.ghcup/bin/ghcup"
129+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
130+
fi
68131
env:
69-
CC: ${{ matrix.compiler }}
132+
HCKIND: ${{ matrix.compilerKind }}
133+
HCNAME: ${{ matrix.compiler }}
134+
HCVER: ${{ matrix.compilerVersion }}
70135
- name: Set PATH and environment variables
71136
run: |
72137
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
73-
echo "LANG=C.UTF-8" >> $GITHUB_ENV
74-
echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV
75-
echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV
76-
HCDIR=$(echo "/opt/$CC" | sed 's/-/\//')
77-
HCNAME=ghc
78-
HC=$HCDIR/bin/$HCNAME
79-
echo "HC=$HC" >> $GITHUB_ENV
80-
echo "HCPKG=$HCDIR/bin/$HCNAME-pkg" >> $GITHUB_ENV
81-
echo "HADDOCK=$HCDIR/bin/haddock" >> $GITHUB_ENV
82-
echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
138+
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
139+
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
140+
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
141+
HCDIR=/opt/$HCKIND/$HCVER
142+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
143+
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
144+
echo "HC=$HC" >> "$GITHUB_ENV"
145+
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
146+
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
147+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
148+
else
149+
HC=$HCDIR/bin/$HCKIND
150+
echo "HC=$HC" >> "$GITHUB_ENV"
151+
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
152+
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
153+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
154+
fi
155+
83156
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
84-
echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV
85-
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV ; else echo "ARG_TESTS=--disable-tests" >> $GITHUB_ENV ; fi
86-
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV ; else echo "ARG_BENCH=--disable-benchmarks" >> $GITHUB_ENV ; fi
87-
echo "HEADHACKAGE=false" >> $GITHUB_ENV
88-
echo "ARG_COMPILER=--$HCNAME --with-compiler=$HC" >> $GITHUB_ENV
89-
echo "GHCJSARITH=0" >> $GITHUB_ENV
157+
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
158+
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
159+
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" ; else echo "ARG_BENCH=--disable-benchmarks" >> "$GITHUB_ENV" ; fi
160+
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
161+
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
162+
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
90163
env:
91-
CC: ${{ matrix.compiler }}
164+
HCKIND: ${{ matrix.compilerKind }}
165+
HCNAME: ${{ matrix.compiler }}
166+
HCVER: ${{ matrix.compilerVersion }}
92167
- name: env
93168
run: |
94169
env
@@ -111,6 +186,10 @@ jobs:
111186
repository hackage.haskell.org
112187
url: http://hackage.haskell.org/
113188
EOF
189+
cat >> $CABAL_CONFIG <<EOF
190+
program-default-options
191+
ghc-options: $GHCJOBS +RTS -M3G -RTS
192+
EOF
114193
cat $CABAL_CONFIG
115194
- name: versions
116195
run: |
@@ -132,8 +211,8 @@ jobs:
132211
- name: install cabal-docspec
133212
run: |
134213
mkdir -p $HOME/.cabal/bin
135-
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
136-
echo '0829bd034fba901cbcfe491d98ed8b28fd54f9cb5c91fa8e1ac62dc4413c9562 cabal-docspec.xz' | sha256sum -c -
214+
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
215+
echo 'e224700d9e8c9ec7ec6bc3f542ba433cd9925a5d356676c62a9bd1f2c8be8f8a cabal-docspec.xz' | sha256sum -c -
137216
xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec
138217
rm -f cabal-docspec.xz
139218
chmod a+x $HOME/.cabal/bin/cabal-docspec
@@ -158,7 +237,8 @@ jobs:
158237
- name: generate cabal.project
159238
run: |
160239
PKGDIR_rere="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/rere-[0-9.]*')"
161-
echo "PKGDIR_rere=${PKGDIR_rere}" >> $GITHUB_ENV
240+
echo "PKGDIR_rere=${PKGDIR_rere}" >> "$GITHUB_ENV"
241+
rm -f cabal.project cabal.project.local
162242
touch cabal.project
163243
touch cabal.project.local
164244
echo "packages: ${PKGDIR_rere}" >> cabal.project
@@ -203,7 +283,7 @@ jobs:
203283
${CABAL} -vnormal check
204284
- name: haddock
205285
run: |
206-
$CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
286+
$CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
207287
- name: unconstrained build
208288
run: |
209289
rm -f cabal.project.local
@@ -213,7 +293,9 @@ jobs:
213293
rm -f cabal.project.local
214294
- name: constraint set intersection
215295
run: |
296+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='rere +rere-intersection' --dependencies-only -j2 all
216297
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='rere +rere-intersection' all
217298
- name: constraint set no-cfg
218299
run: |
300+
if [ $((HCNUMVER >= 70800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='rere -rere-cfg' --dependencies-only -j2 all ; fi
219301
if [ $((HCNUMVER >= 70800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='rere -rere-cfg' all ; fi

rere.cabal

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cabal-version: 2.2
22
name: rere
33
version: 0.2
4-
x-revision: 1
4+
x-revision: 2
55
synopsis:
66
Regular-expressions extended with fixpoints for context-free powers
77

@@ -31,9 +31,10 @@ tested-with:
3131
|| ==8.4.4
3232
|| ==8.6.5
3333
|| ==8.8.4
34-
|| ==8.10.4
35-
|| ==9.0.1
36-
|| ==9.2.1
34+
|| ==8.10.7
35+
|| ==9.0.2
36+
|| ==9.2.4
37+
|| ==9.4.1
3738

3839
source-repository head
3940
type: git
@@ -59,7 +60,7 @@ library
5960

6061
-- GHC boot libraries
6162
build-depends:
62-
, base >=4.3.0.0 && <4.17
63+
, base >=4.3.0.0 && <4.18
6364
, containers ^>=0.4.0.0 || ^>=0.5.0.0 || ^>=0.6.0.1
6465
, parsec ^>=3.1.12.0
6566
, transformers ^>=0.3.0.0 || ^>=0.4.2.0 || ^>=0.5.2.0
@@ -119,7 +120,7 @@ benchmark simple
119120
build-depends:
120121
, base
121122
, containers
122-
, criterion ^>=1.5.5.0
123+
, criterion ^>=1.5.5.0 || ^>=1.6.0.0
123124
, derp
124125
, parsec
125126
, rere
@@ -144,24 +145,21 @@ benchmark json
144145
other-modules: DerpConv
145146
ghc-options: -Wall -rtsopts
146147
build-depends:
147-
, aeson ^>=1.4.6.0 || ^>=1.5.0.0
148+
, aeson ^>=1.4.6.0 || ^>=1.5.0.0 || ^>=2.0.0.0 || ^>=2.1.0.0
148149
, attoparsec
149150
, base
150151
, bytestring
151152
, clock ^>=0.8
152153
, containers
153-
, criterion ^>=1.5.5.0
154+
, criterion ^>=1.5.5.0 || ^>=1.6.0.0
154155
, derp
155156
, fin
156157
, parsec
157158
, rere
158159
, vec
159160

160-
-- extras
161-
-- build-depends: saison
162-
163161
if !impl(ghc >=8.0)
164-
build-depends: semigroups >=0.18.4 && <0.20
162+
build-depends: semigroups >=0.18.4 && <0.21
165163

166164
if !impl(ghc >=7.10)
167165
build-depends: void ^>=0.7.2

0 commit comments

Comments
 (0)