Skip to content

Commit 1059644

Browse files
committed
v1.3.2.2-r1: allow text-2.1
1 parent f1ec8b3 commit 1059644

File tree

3 files changed

+65
-24
lines changed

3 files changed

+65
-24
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 48 additions & 13 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.16.4
11+
# version: 0.17.20230824
1212
#
13-
# REGENDATA ("0.16.4",["github","regex-tdfa.cabal"])
13+
# REGENDATA ("0.17.20230824",["github","regex-tdfa.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -32,6 +32,11 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35+
- compiler: ghc-9.8.0.20230822
36+
compilerKind: ghc
37+
compilerVersion: 9.8.0.20230822
38+
setup-method: ghcup
39+
allow-failure: true
3540
- compiler: ghc-9.6.2
3641
compilerKind: ghc
3742
compilerVersion: 9.6.2
@@ -110,17 +115,19 @@ jobs:
110115
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
111116
if [ "${{ matrix.setup-method }}" = ghcup ]; then
112117
mkdir -p "$HOME/.ghcup/bin"
113-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
118+
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
114119
chmod a+x "$HOME/.ghcup/bin/ghcup"
120+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
115121
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
116122
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
117123
else
118124
apt-add-repository -y 'ppa:hvr/ghc'
119125
apt-get update
120126
apt-get install -y "$HCNAME"
121127
mkdir -p "$HOME/.ghcup/bin"
122-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
128+
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
123129
chmod a+x "$HOME/.ghcup/bin/ghcup"
130+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
124131
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
125132
fi
126133
env:
@@ -135,10 +142,12 @@ jobs:
135142
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
136143
HCDIR=/opt/$HCKIND/$HCVER
137144
if [ "${{ matrix.setup-method }}" = ghcup ]; then
138-
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
145+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
146+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
147+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
139148
echo "HC=$HC" >> "$GITHUB_ENV"
140-
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
141-
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
149+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
150+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
142151
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
143152
else
144153
HC=$HCDIR/bin/$HCKIND
@@ -150,9 +159,9 @@ jobs:
150159
151160
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
152161
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
153-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
162+
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
154163
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
155-
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
164+
if [ $((HCNUMVER >= 90800)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
156165
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
157166
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
158167
env:
@@ -181,6 +190,18 @@ jobs:
181190
repository hackage.haskell.org
182191
url: http://hackage.haskell.org/
183192
EOF
193+
if $HEADHACKAGE; then
194+
cat >> $CABAL_CONFIG <<EOF
195+
repository head.hackage.ghc.haskell.org
196+
url: https://ghc.gitlab.haskell.org/head.hackage/
197+
secure: True
198+
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
199+
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
200+
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
201+
key-threshold: 3
202+
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
203+
EOF
204+
fi
184205
cat >> $CABAL_CONFIG <<EOF
185206
program-default-options
186207
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -232,8 +253,12 @@ jobs:
232253
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
233254
cat >> cabal.project <<EOF
234255
allow-newer: bytestring
256+
allow-newer: text
235257
EOF
236-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(Cabal|regex-tdfa|text)$/; }' >> cabal.project.local
258+
if $HEADHACKAGE; then
259+
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
260+
fi
261+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(regex-tdfa)$/; }' >> cabal.project.local
237262
cat cabal.project
238263
cat cabal.project.local
239264
- name: dump install plan
@@ -258,7 +283,7 @@ jobs:
258283
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
259284
- name: tests
260285
run: |
261-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct ; fi
286+
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
262287
- name: cabal check
263288
run: |
264289
cd ${PKGDIR_regex_tdfa} || false
@@ -275,8 +300,18 @@ jobs:
275300
rm -f cabal.project.local
276301
- name: constraint set bytestring-0.12
277302
run: |
278-
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='bytestring >= 0.12' --dependencies-only -j2 all ; fi
279-
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='bytestring >= 0.12' all ; fi
303+
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>= 0.12' all --dry-run ; fi
304+
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then cabal-plan topo | sort ; fi
305+
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>= 0.12' --dependencies-only -j2 all ; fi
306+
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>= 0.12' all ; fi
307+
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>= 0.12' all ; fi
308+
- name: constraint set text-2.1
309+
run: |
310+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text ^>= 2.1' all --dry-run ; fi
311+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then cabal-plan topo | sort ; fi
312+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text ^>= 2.1' --dependencies-only -j2 all ; fi
313+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text ^>= 2.1' all ; fi
314+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text ^>= 2.1' all ; fi
280315
- name: save cache
281316
uses: actions/cache/save@v3
282317
if: always()

cabal.haskell-ci

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
branches: master
22

3-
installed: +all -text -Cabal
3+
installed: +all
44

5-
-- doctest-parallel requires base >= 4.10
6-
tests: >= 8.2
5+
constraint-set text-2.1
6+
-- text-2.1 requires base >=4.10 (GHC 8.2)
7+
ghc: >= 8.2
8+
constraints: text ^>= 2.1
9+
tests: True
10+
run-tests: True
711

812
constraint-set bytestring-0.12
913
-- bytestring-0.12 requires base >=4.9 (GHC 8.0)
1014
ghc: >= 8.0
11-
constraints: bytestring >= 0.12
15+
constraints: bytestring ^>= 0.12
16+
tests: True
17+
run-tests: True
1218
--
1319
-- The following is silently ignored here:
1420
--
1521
-- raw-project
1622
-- allow-newer: bytestring
1723
--
18-
-- Cannot build tests with newer bytestring because doctest-parallel relies on non-upgradeable ghc library
19-
--
20-
-- tests: True
21-
-- run-tests: True
2224

23-
-- The following is meant to be for constraint-set bytestring-0.12 only,
25+
-- The following is meant to be for constraint-set bytestring-0.12 only
26+
-- (and for constraint-set text-2.1)
2427
-- but there is currently no way to enable `allow-newer: bytestring`
2528
-- just for the constraint set.
2629
--
@@ -30,3 +33,4 @@ constraint-set bytestring-0.12
3033
--
3134
raw-project
3235
allow-newer: bytestring
36+
allow-newer: text

regex-tdfa.cabal

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
cabal-version: 1.12
22
name: regex-tdfa
33
version: 1.3.2.2
4+
x-revision: 1
45

56
build-Type: Simple
67
license: BSD3
@@ -25,6 +26,7 @@ extra-source-files:
2526
test/cases/*.txt
2627

2728
tested-with:
29+
GHC == 9.8.0
2830
GHC == 9.6.2
2931
GHC == 9.4.5
3032
GHC == 9.2.8
@@ -47,7 +49,7 @@ source-repository head
4749
source-repository this
4850
type: git
4951
location: https://github.com/haskell-hvr/regex-tdfa.git
50-
tag: v1.3.2.2
52+
tag: v1.3.2.2-r1
5153

5254
flag force-O2
5355
default: False
@@ -111,7 +113,7 @@ library
111113
, mtl >= 2.1.3 && < 2.4
112114
, parsec == 3.1.*
113115
, regex-base == 0.94.*
114-
, text >= 1.2.3 && < 2.1
116+
, text >= 1.2.3 && < 2.2
115117

116118
default-language: Haskell2010
117119
default-extensions: BangPatterns

0 commit comments

Comments
 (0)