Skip to content

Commit 3373f5f

Browse files
committed
Allow bytestring-0.12 and test it in Haskell CI
1 parent f2ef924 commit 3373f5f

File tree

3 files changed

+40
-4
lines changed

3 files changed

+40
-4
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
#
1515
name: Haskell-CI
1616
on:
17-
- push
18-
- pull_request
17+
push:
18+
branches:
19+
- master
20+
pull_request:
21+
branches:
22+
- master
1923
jobs:
2024
linux:
2125
name: Haskell-CI - Linux - ${{ matrix.compiler }}
@@ -227,6 +231,7 @@ jobs:
227231
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package attoparsec" >> cabal.project ; fi
228232
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
229233
cat >> cabal.project <<EOF
234+
allow-newer: bytestring
230235
EOF
231236
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(attoparsec)$/; }' >> cabal.project.local
232237
cat cabal.project
@@ -268,6 +273,11 @@ jobs:
268273
- name: prepare for constraint sets
269274
run: |
270275
rm -f cabal.project.local
276+
- name: constraint set bytestring-0.12
277+
run: |
278+
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' --dependencies-only -j2 all ; fi
279+
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' all ; fi
280+
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' all ; fi
271281
- name: constraint set text-2
272282
run: |
273283
if [ $((HCNUMVER >= 80400 && HCNUMVER < 90400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text >= 2' --dependencies-only -j2 all ; fi

attoparsec.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ library attoparsec-internal
5757
hs-source-dirs: internal
5858
build-depends: array,
5959
base >= 4.3 && < 5,
60-
bytestring <0.12,
60+
bytestring <0.13,
6161
text >= 1.1.1.3
6262
if !impl(ghc >= 8.0)
6363
build-depends: semigroups >=0.16.1 && <0.21
@@ -73,7 +73,7 @@ library attoparsec-internal
7373
library
7474
build-depends: array,
7575
base >= 4.5 && < 5,
76-
bytestring <0.12,
76+
bytestring <0.13,
7777
containers,
7878
deepseq,
7979
scientific >= 0.3.1 && < 0.4,

cabal.haskell-ci

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
branches: master
2+
13
constraint-set text-1
24
constraints: text < 2
35
ghc: < 8.4
@@ -9,3 +11,27 @@ constraint-set text-2
911
ghc: >= 8.4 && < 9.4
1012
tests: True
1113
run-tests: True
14+
15+
constraint-set bytestring-0.12
16+
-- bytestring-0.12 requires base >=4.9 (GHC 8.0)
17+
ghc: >= 8.0
18+
constraints: bytestring >= 0.12
19+
--
20+
-- The following is silently ignored here:
21+
--
22+
-- raw-project
23+
-- allow-newer: bytestring
24+
--
25+
tests: True
26+
run-tests: True
27+
28+
-- The following is meant to be for constraint-set bytestring-0.12 only,
29+
-- but there is currently no way to enable `allow-newer: bytestring`
30+
-- just for the constraint set.
31+
--
32+
-- Since core library `bytestring` is constrained to `installed`,
33+
-- it is not harmful to allow newer `bytestring` in the default runs
34+
-- as well---it will have no effect there.
35+
--
36+
raw-project
37+
allow-newer: bytestring

0 commit comments

Comments
 (0)