Skip to content

Commit 4dc6476

Browse files
authored
Merge pull request #58 from sjakobi/ghc-9.2
Allow base 4.16 / GHC 9.2
2 parents cd09f81 + ca5756c commit 4dc6476

2 files changed

Lines changed: 54 additions & 15 deletions

File tree

.github/workflows/haskell-ci.yml

Lines changed: 49 additions & 12 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.20210606
11+
# version: 0.13.20211111
1212
#
13-
# REGENDATA ("0.13.20210606",["github","feed.cabal"])
13+
# REGENDATA ("0.13.20211111",["github","feed.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -20,17 +20,29 @@ jobs:
2020
linux:
2121
name: Haskell-CI - Linux - ${{ matrix.compiler }}
2222
runs-on: ubuntu-18.04
23+
timeout-minutes:
24+
60
2325
container:
2426
image: buildpack-deps:bionic
2527
continue-on-error: ${{ matrix.allow-failure }}
2628
strategy:
2729
matrix:
2830
include:
29-
- compiler: ghc-8.10.4
31+
- compiler: ghc-9.2.1
3032
compilerKind: ghc
31-
compilerVersion: 8.10.4
33+
compilerVersion: 9.2.1
34+
setup-method: ghcup
35+
allow-failure: false
36+
- compiler: ghc-9.0.1
37+
compilerKind: ghc
38+
compilerVersion: 9.0.1
3239
setup-method: hvr-ppa
3340
allow-failure: false
41+
- compiler: ghc-8.10.7
42+
compilerKind: ghc
43+
compilerVersion: 8.10.7
44+
setup-method: ghcup
45+
allow-failure: false
3446
- compiler: ghc-8.8.4
3547
compilerKind: ghc
3648
compilerVersion: 8.8.4
@@ -77,9 +89,21 @@ jobs:
7789
run: |
7890
apt-get update
7991
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
80-
apt-add-repository -y 'ppa:hvr/ghc'
81-
apt-get update
82-
apt-get install -y "$HCNAME" cabal-install-3.4
92+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
93+
mkdir -p "$HOME/.ghcup/bin"
94+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
95+
chmod a+x "$HOME/.ghcup/bin/ghcup"
96+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
97+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
98+
else
99+
apt-add-repository -y 'ppa:hvr/ghc'
100+
apt-get update
101+
apt-get install -y "$HCNAME"
102+
mkdir -p "$HOME/.ghcup/bin"
103+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
104+
chmod a+x "$HOME/.ghcup/bin/ghcup"
105+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
106+
fi
83107
env:
84108
HCKIND: ${{ matrix.compilerKind }}
85109
HCNAME: ${{ matrix.compiler }}
@@ -91,11 +115,20 @@ jobs:
91115
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
92116
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
93117
HCDIR=/opt/$HCKIND/$HCVER
94-
HC=$HCDIR/bin/$HCKIND
95-
echo "HC=$HC" >> "$GITHUB_ENV"
96-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
97-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
98-
echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> "$GITHUB_ENV"
118+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
119+
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
120+
echo "HC=$HC" >> "$GITHUB_ENV"
121+
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
122+
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
123+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
124+
else
125+
HC=$HCDIR/bin/$HCKIND
126+
echo "HC=$HC" >> "$GITHUB_ENV"
127+
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
128+
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
129+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
130+
fi
131+
99132
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
100133
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
101134
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -129,6 +162,10 @@ jobs:
129162
repository hackage.haskell.org
130163
url: http://hackage.haskell.org/
131164
EOF
165+
cat >> $CABAL_CONFIG <<EOF
166+
program-default-options
167+
ghc-options: $GHCJOBS +RTS -M3G -RTS
168+
EOF
132169
cat $CABAL_CONFIG
133170
- name: versions
134171
run: |

feed.cabal

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ tested-with:
3232
, GHC == 8.4.4
3333
, GHC == 8.6.5
3434
, GHC == 8.8.4
35-
, GHC == 8.10.4
35+
, GHC == 8.10.7
36+
, GHC == 9.0.1
37+
, GHC == 9.2.1
3638
data-files:
3739
tests/files/*.xml
3840
extra-source-files:
@@ -77,7 +79,7 @@ library
7779
Data.Text.Util
7880
Data.XML.Compat
7981
build-depends:
80-
base >= 4 && < 4.16
82+
base >= 4 && < 4.17
8183
, base-compat >= 0.9 && < 0.13
8284
, bytestring >= 0.9 && < 0.12
8385
, old-locale == 1.0.*
@@ -115,7 +117,7 @@ test-suite tests
115117
Text.RSS.Tests
116118
Text.RSS.Utils
117119
build-depends:
118-
base >= 4.6 && < 4.16
120+
base >= 4.6 && < 4.17
119121
, base-compat >= 0.9 && < 0.13
120122
, HUnit >= 1.2 && < 1.7
121123
, feed

0 commit comments

Comments
 (0)