Skip to content

Commit 4c2148c

Browse files
authored
Merge pull request #80 from andreasabel/master
Allow text-2.1 for GHC 9.8; bump CI to latest GHC versions
2 parents 9ab50f8 + 2cac5fc commit 4c2148c

3 files changed

Lines changed: 71 additions & 54 deletions

File tree

.github/workflows/haskell-ci.yml

Lines changed: 56 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,50 @@
66
#
77
# haskell-ci regenerate
88
#
9-
# For more information, see https://github.com/haskell-CI/haskell-ci
9+
# For more information, see https://github.com/andreasabel/haskell-ci
1010
#
11-
# version: 0.14.3
11+
# version: 0.17.20231012
1212
#
13-
# REGENDATA ("0.14.3",["github","happstack-server.cabal"])
13+
# REGENDATA ("0.17.20231012",["github","happstack-server.cabal"])
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 }}
22-
runs-on: ubuntu-18.04
26+
runs-on: ubuntu-20.04
2327
timeout-minutes:
2428
60
2529
container:
26-
image: buildpack-deps:bionic
30+
image: buildpack-deps:focal
2731
continue-on-error: ${{ matrix.allow-failure }}
2832
strategy:
2933
matrix:
3034
include:
31-
- compiler: ghc-9.4.3
35+
- compiler: ghc-9.8.1
3236
compilerKind: ghc
33-
compilerVersion: 9.4.3
37+
compilerVersion: 9.8.1
3438
setup-method: ghcup
3539
allow-failure: false
36-
- compiler: ghc-9.2.5
40+
- compiler: ghc-9.6.3
3741
compilerKind: ghc
38-
compilerVersion: 9.2.5
42+
compilerVersion: 9.6.3
43+
setup-method: ghcup
44+
allow-failure: false
45+
- compiler: ghc-9.4.7
46+
compilerKind: ghc
47+
compilerVersion: 9.4.7
48+
setup-method: ghcup
49+
allow-failure: false
50+
- compiler: ghc-9.2.8
51+
compilerKind: ghc
52+
compilerVersion: 9.2.8
3953
setup-method: ghcup
4054
allow-failure: false
4155
- compiler: ghc-9.0.2
@@ -51,49 +65,40 @@ jobs:
5165
- compiler: ghc-8.8.4
5266
compilerKind: ghc
5367
compilerVersion: 8.8.4
54-
setup-method: hvr-ppa
68+
setup-method: ghcup
5569
allow-failure: false
5670
- compiler: ghc-8.6.5
5771
compilerKind: ghc
5872
compilerVersion: 8.6.5
59-
setup-method: hvr-ppa
73+
setup-method: ghcup
6074
allow-failure: false
6175
- compiler: ghc-8.4.4
6276
compilerKind: ghc
6377
compilerVersion: 8.4.4
64-
setup-method: hvr-ppa
78+
setup-method: ghcup
6579
allow-failure: false
6680
- compiler: ghc-8.2.2
6781
compilerKind: ghc
6882
compilerVersion: 8.2.2
69-
setup-method: hvr-ppa
83+
setup-method: ghcup
7084
allow-failure: false
7185
- compiler: ghc-8.0.2
7286
compilerKind: ghc
7387
compilerVersion: 8.0.2
74-
setup-method: hvr-ppa
88+
setup-method: ghcup
7589
allow-failure: false
7690
fail-fast: false
7791
steps:
7892
- name: apt
7993
run: |
8094
apt-get update
81-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
82-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
83-
mkdir -p "$HOME/.ghcup/bin"
84-
curl -sL https://downloads.haskell.org/ghcup/0.1.17.5/x86_64-linux-ghcup-0.1.17.5 > "$HOME/.ghcup/bin/ghcup"
85-
chmod a+x "$HOME/.ghcup/bin/ghcup"
86-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
87-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
88-
else
89-
apt-add-repository -y 'ppa:hvr/ghc'
90-
apt-get update
91-
apt-get install -y "$HCNAME"
92-
mkdir -p "$HOME/.ghcup/bin"
93-
curl -sL https://downloads.haskell.org/ghcup/0.1.17.5/x86_64-linux-ghcup-0.1.17.5 > "$HOME/.ghcup/bin/ghcup"
94-
chmod a+x "$HOME/.ghcup/bin/ghcup"
95-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
96-
fi
95+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
96+
mkdir -p "$HOME/.ghcup/bin"
97+
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
98+
chmod a+x "$HOME/.ghcup/bin/ghcup"
99+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
100+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
101+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
97102
env:
98103
HCKIND: ${{ matrix.compilerKind }}
99104
HCNAME: ${{ matrix.compiler }}
@@ -105,20 +110,13 @@ jobs:
105110
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
106111
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
107112
HCDIR=/opt/$HCKIND/$HCVER
108-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
109-
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
110-
echo "HC=$HC" >> "$GITHUB_ENV"
111-
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
112-
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
113-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
114-
else
115-
HC=$HCDIR/bin/$HCKIND
116-
echo "HC=$HC" >> "$GITHUB_ENV"
117-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
118-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
119-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
120-
fi
121-
113+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
114+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
115+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
116+
echo "HC=$HC" >> "$GITHUB_ENV"
117+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
118+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
119+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
122120
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
123121
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
124122
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -168,14 +166,14 @@ jobs:
168166
- name: install cabal-plan
169167
run: |
170168
mkdir -p $HOME/.cabal/bin
171-
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz
172-
echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
169+
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.7.3.0/cabal-plan-0.7.3.0-x86_64-linux.xz > cabal-plan.xz
170+
echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
173171
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
174172
rm -f cabal-plan.xz
175173
chmod a+x $HOME/.cabal/bin/cabal-plan
176174
cabal-plan --version
177175
- name: checkout
178-
uses: actions/checkout@v2
176+
uses: actions/checkout@v4
179177
with:
180178
path: source
181179
- name: initial cabal.project for sdist
@@ -210,8 +208,8 @@ jobs:
210208
run: |
211209
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
212210
cabal-plan
213-
- name: cache
214-
uses: actions/cache@v2
211+
- name: restore cache
212+
uses: actions/cache/restore@v3
215213
with:
216214
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
217215
path: ~/.cabal/store
@@ -235,8 +233,14 @@ jobs:
235233
${CABAL} -vnormal check
236234
- name: haddock
237235
run: |
238-
$CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
236+
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
239237
- name: unconstrained build
240238
run: |
241239
rm -f cabal.project.local
242240
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
241+
- name: save cache
242+
uses: actions/cache/save@v3
243+
if: always()
244+
with:
245+
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
246+
path: ~/.cabal/store

cabal.haskell-ci

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
branches: master

happstack-server.cabal

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,19 @@ Category: Web, Happstack
1111
Build-Type: Simple
1212
Cabal-Version: >= 1.10
1313
Extra-Source-Files: tests/Happstack/Server/Tests.hs README.md
14-
tested-with: GHC==8.0.2, GHC==8.2.2, GHC==8.4.4, GHC==8.6.5, GHC==8.8.4, GHC==8.10.7, GHC==9.0.2, GHC==9.2.5, GHC==9.4.3
14+
15+
tested-with:
16+
GHC == 9.8.1
17+
GHC == 9.6.3
18+
GHC == 9.4.7
19+
GHC == 9.2.8
20+
GHC == 9.0.2
21+
GHC == 8.10.7
22+
GHC == 8.8.4
23+
GHC == 8.6.5
24+
GHC == 8.4.4
25+
GHC == 8.2.2
26+
GHC == 8.0.2
1527

1628
source-repository head
1729
type: git
@@ -85,7 +97,7 @@ Library
8597
sendfile >= 0.7.1 && < 0.8,
8698
system-filepath >= 0.3.1,
8799
syb,
88-
text >= 0.10 && < 2.1,
100+
text >= 0.10 && < 2.2,
89101
time,
90102
threads >= 0.5,
91103
transformers >= 0.1.3 && < 0.7,

0 commit comments

Comments
 (0)