Skip to content

Commit dd195d9

Browse files
authored
Merge pull request #467 from phadej/ghc-9.2
Allow base-4.16, hashable-1.4, bytestring-0.11
2 parents e0fa8ac + 9df0ad5 commit dd195d9

File tree

4 files changed

+59
-26
lines changed

4 files changed

+59
-26
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 47 additions & 16 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.13.20210827
11+
# version: 0.13.20211111
1212
#
13-
# REGENDATA ("0.13.20210827",["--config=cabal.haskell-ci","github","cabal.project"])
13+
# REGENDATA ("0.13.20211111",["--config=cabal.haskell-ci","github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -24,21 +24,28 @@ 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:
35+
- compiler: ghc-9.2.1
36+
compilerKind: ghc
37+
compilerVersion: 9.2.1
38+
setup-method: ghcup
39+
allow-failure: false
3340
- compiler: ghc-9.0.1
3441
compilerKind: ghc
3542
compilerVersion: 9.0.1
3643
setup-method: hvr-ppa
3744
allow-failure: false
38-
- compiler: ghc-8.10.4
45+
- compiler: ghc-8.10.7
3946
compilerKind: ghc
40-
compilerVersion: 8.10.4
41-
setup-method: hvr-ppa
47+
compilerVersion: 8.10.7
48+
setup-method: ghcup
4249
allow-failure: false
4350
- compiler: ghc-8.8.4
4451
compilerKind: ghc
@@ -81,9 +88,21 @@ jobs:
8188
run: |
8289
apt-get update
8390
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
84-
apt-add-repository -y 'ppa:hvr/ghc'
85-
apt-get update
86-
apt-get install -y "$HCNAME" cabal-install-3.4
91+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
92+
mkdir -p "$HOME/.ghcup/bin"
93+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
94+
chmod a+x "$HOME/.ghcup/bin/ghcup"
95+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
96+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
97+
else
98+
apt-add-repository -y 'ppa:hvr/ghc'
99+
apt-get update
100+
apt-get install -y "$HCNAME"
101+
mkdir -p "$HOME/.ghcup/bin"
102+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
103+
chmod a+x "$HOME/.ghcup/bin/ghcup"
104+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
105+
fi
87106
env:
88107
HCKIND: ${{ matrix.compilerKind }}
89108
HCNAME: ${{ matrix.compiler }}
@@ -95,11 +114,20 @@ jobs:
95114
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
96115
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
97116
HCDIR=/opt/$HCKIND/$HCVER
98-
HC=$HCDIR/bin/$HCKIND
99-
echo "HC=$HC" >> "$GITHUB_ENV"
100-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
101-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
102-
echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> "$GITHUB_ENV"
117+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
118+
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
119+
echo "HC=$HC" >> "$GITHUB_ENV"
120+
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
121+
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
122+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
123+
else
124+
HC=$HCDIR/bin/$HCKIND
125+
echo "HC=$HC" >> "$GITHUB_ENV"
126+
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
127+
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
128+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
129+
fi
130+
103131
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
104132
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
105133
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -133,6 +161,10 @@ jobs:
133161
repository hackage.haskell.org
134162
url: http://hackage.haskell.org/
135163
EOF
164+
cat >> $CABAL_CONFIG <<EOF
165+
program-default-options
166+
ghc-options: $GHCJOBS +RTS -M3G -RTS
167+
EOF
136168
cat $CABAL_CONFIG
137169
- name: versions
138170
run: |
@@ -185,14 +217,13 @@ jobs:
185217
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package github-samples" >> cabal.project ; fi
186218
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
187219
cat >> cabal.project <<EOF
188-
constraints: hashable ^>=1.3
220+
constraints: hashable >=1.3
189221
constraints: semigroups ^>=0.19
190222
constraints: github +openssl
191223
constraints: github-samples +openssl
192224
allow-newer: deepseq-generics-0.2.0.0:base
193225
allow-newer: deepseq-generics-0.2.0.0:ghc-prim
194-
allow-newer: cryptohash-sha1-0.11.100.1:base
195-
allow-newer: http-link-header-1.2.0:attoparsec
226+
allow-newer: HsOpenSSL:bytestring
196227
optimization: False
197228
EOF
198229
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(github|github-samples)$/; }' >> cabal.project.local

cabal.project

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ packages: samples
44
optimization: False
55
tests: True
66

7-
constraints: hashable ^>=1.3
7+
constraints: hashable >=1.3
88
constraints: semigroups ^>=0.19
99

1010
constraints: github +openssl
1111
constraints: github-samples +openssl
1212

1313
allow-newer: deepseq-generics-0.2.0.0:base
1414
allow-newer: deepseq-generics-0.2.0.0:ghc-prim
15-
allow-newer: cryptohash-sha1-0.11.100.1:base
16-
allow-newer: http-link-header-1.2.0:attoparsec
15+
allow-newer: HsOpenSSL:bytestring

github.cabal

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
cabal-version: >=1.10
22
name: github
33
version: 0.27
4+
x-revision: 1
45
synopsis: Access to the GitHub API, v3.
56
category: Network
67
description:
@@ -37,8 +38,9 @@ tested-with:
3738
|| ==8.4.4
3839
|| ==8.6.5
3940
|| ==8.8.4
40-
|| ==8.10.4
41+
|| ==8.10.7
4142
|| ==9.0.1
43+
|| ==9.2.1
4244

4345
extra-source-files:
4446
README.md
@@ -158,9 +160,9 @@ library
158160

159161
-- Packages bundles with GHC, mtl and text are also here
160162
build-depends:
161-
base >=4.7 && <4.16
163+
base >=4.7 && <4.17
162164
, binary >=0.7.1.0 && <0.11
163-
, bytestring >=0.10.4.0 && <0.11
165+
, bytestring >=0.10.4.0 && <0.12
164166
, containers >=0.5.5.1 && <0.7
165167
, deepseq >=1.3.0.2 && <1.5
166168
, mtl >=2.1.3.1 && <2.2 || >=2.2.1 && <2.3
@@ -177,7 +179,7 @@ library
177179
, cryptohash-sha1 >=0.11.100.1 && <0.12
178180
, deepseq-generics >=0.2.0.0 && <0.3
179181
, exceptions >=0.10.2 && <0.11
180-
, hashable >=1.2.7.0 && <1.4
182+
, hashable >=1.2.7.0 && <1.5
181183
, http-client >=0.5.12 && <0.8
182184
, http-link-header >=1.0.3.1 && <1.3
183185
, http-types >=0.12.3 && <0.13
@@ -209,7 +211,7 @@ test-suite github-test
209211
hs-source-dirs: spec
210212
main-is: Spec.hs
211213
ghc-options: -Wall -threaded
212-
build-tool-depends: hspec-discover:hspec-discover >=2.7.1 && <2.8
214+
build-tool-depends: hspec-discover:hspec-discover >=2.7.1 && <2.10
213215
other-extensions: TemplateHaskell
214216
other-modules:
215217
GitHub.ActivitySpec
@@ -234,7 +236,7 @@ test-suite github-test
234236
, bytestring
235237
, file-embed
236238
, github
237-
, hspec >=2.6.1 && <2.8
239+
, hspec >=2.6.1 && <2.10
238240
, tagged
239241
, text
240242
, unordered-containers

samples/github-samples.cabal

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ tested-with:
1616
|| ==8.4.4
1717
|| ==8.6.5
1818
|| ==8.8.4
19-
|| ==8.10.4
19+
|| ==8.10.7
2020
|| ==9.0.1
21+
|| ==9.2.1
2122

2223
library
2324
hs-source-dirs: src

0 commit comments

Comments
 (0)