Skip to content

Commit bd1a7dc

Browse files
committed
7.2.1.7 - allow time 1.15. test with GHC 9.14
1 parent 9d19a54 commit bd1a7dc

File tree

3 files changed

+100
-40
lines changed

3 files changed

+100
-40
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 78 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
#
77
# haskell-ci regenerate
88
#
9-
# For more information, see https://github.com/andreasabel/haskell-ci
9+
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.17.20231012
11+
# version: 0.19.20250821
1212
#
13-
# REGENDATA ("0.17.20231012",["github","happstack-server-tls.cabal"])
13+
# REGENDATA ("0.19.20250821",["github","happstack-server-tls.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -23,33 +23,43 @@ on:
2323
jobs:
2424
linux:
2525
name: Haskell-CI - Linux - ${{ matrix.compiler }}
26-
runs-on: ubuntu-20.04
26+
runs-on: ubuntu-24.04
2727
timeout-minutes:
2828
60
2929
container:
30-
image: buildpack-deps:focal
30+
image: buildpack-deps:jammy
3131
continue-on-error: ${{ matrix.allow-failure }}
3232
strategy:
3333
matrix:
3434
include:
35-
- compiler: ghc-9.10.1
35+
- compiler: ghc-9.14.0.20250819
3636
compilerKind: ghc
37-
compilerVersion: 9.10.1
37+
compilerVersion: 9.14.0.20250819
38+
setup-method: ghcup-prerelease
39+
allow-failure: false
40+
- compiler: ghc-9.12.2
41+
compilerKind: ghc
42+
compilerVersion: 9.12.2
43+
setup-method: ghcup
44+
allow-failure: false
45+
- compiler: ghc-9.10.2
46+
compilerKind: ghc
47+
compilerVersion: 9.10.2
3848
setup-method: ghcup
3949
allow-failure: false
4050
- compiler: ghc-9.8.2
4151
compilerKind: ghc
4252
compilerVersion: 9.8.2
4353
setup-method: ghcup
4454
allow-failure: false
45-
- compiler: ghc-9.6.3
55+
- compiler: ghc-9.6.7
4656
compilerKind: ghc
47-
compilerVersion: 9.6.3
57+
compilerVersion: 9.6.7
4858
setup-method: ghcup
4959
allow-failure: false
50-
- compiler: ghc-9.4.7
60+
- compiler: ghc-9.4.8
5161
compilerKind: ghc
52-
compilerVersion: 9.4.7
62+
compilerVersion: 9.4.8
5363
setup-method: ghcup
5464
allow-failure: false
5565
- compiler: ghc-9.2.8
@@ -94,41 +104,60 @@ jobs:
94104
allow-failure: false
95105
fail-fast: false
96106
steps:
97-
- name: apt
107+
- name: apt-get install
98108
run: |
99109
apt-get update
100110
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
111+
- name: Install GHCup
112+
run: |
101113
mkdir -p "$HOME/.ghcup/bin"
102-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
114+
curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
103115
chmod a+x "$HOME/.ghcup/bin/ghcup"
104-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
116+
- name: Install cabal-install
117+
run: |
118+
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
119+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
120+
- name: Install GHC (GHCup)
121+
if: matrix.setup-method == 'ghcup'
122+
run: |
105123
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
106-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
124+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
125+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
126+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
127+
echo "HC=$HC" >> "$GITHUB_ENV"
128+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
129+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
107130
env:
108131
HCKIND: ${{ matrix.compilerKind }}
109132
HCNAME: ${{ matrix.compiler }}
110133
HCVER: ${{ matrix.compilerVersion }}
111-
- name: Set PATH and environment variables
134+
- name: Install GHC (GHCup prerelease)
135+
if: matrix.setup-method == 'ghcup-prerelease'
112136
run: |
113-
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
114-
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
115-
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
116-
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
117-
HCDIR=/opt/$HCKIND/$HCVER
137+
"$HOME/.ghcup/bin/ghcup" config add-release-channel prereleases
138+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
118139
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
119140
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
120141
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
121142
echo "HC=$HC" >> "$GITHUB_ENV"
122143
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
123144
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
124-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
145+
env:
146+
HCKIND: ${{ matrix.compilerKind }}
147+
HCNAME: ${{ matrix.compiler }}
148+
HCVER: ${{ matrix.compilerVersion }}
149+
- name: Set PATH and environment variables
150+
run: |
151+
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
152+
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
153+
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
154+
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
125155
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
126156
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
127157
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
128158
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
129-
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
159+
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
130160
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
131-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
132161
env:
133162
HCKIND: ${{ matrix.compilerKind }}
134163
HCNAME: ${{ matrix.compiler }}
@@ -155,6 +184,18 @@ jobs:
155184
repository hackage.haskell.org
156185
url: http://hackage.haskell.org/
157186
EOF
187+
if $HEADHACKAGE; then
188+
cat >> $CABAL_CONFIG <<EOF
189+
repository head.hackage.ghc.haskell.org
190+
url: https://ghc.gitlab.haskell.org/head.hackage/
191+
secure: True
192+
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
193+
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
194+
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
195+
key-threshold: 3
196+
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
197+
EOF
198+
fi
158199
cat >> $CABAL_CONFIG <<EOF
159200
program-default-options
160201
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -181,8 +222,6 @@ jobs:
181222
uses: actions/checkout@v4
182223
with:
183224
path: source
184-
env:
185-
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
186225
- name: initial cabal.project for sdist
187226
run: |
188227
touch cabal.project
@@ -198,25 +237,30 @@ jobs:
198237
find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \;
199238
- name: generate cabal.project
200239
run: |
201-
PKGDIR_happstack_server="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/happstack-server-tls-[0-9.]*')"
202-
echo "PKGDIR_happstack_server=${PKGDIR_happstack_server}" >> "$GITHUB_ENV"
240+
PKGDIR_happstack_server_tls="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/happstack-server-tls-[0-9.]*')"
241+
echo "PKGDIR_happstack_server_tls=${PKGDIR_happstack_server_tls}" >> "$GITHUB_ENV"
203242
rm -f cabal.project cabal.project.local
204243
touch cabal.project
205244
touch cabal.project.local
206-
echo "packages: ${PKGDIR_happstack_server}" >> cabal.project
245+
echo "packages: ${PKGDIR_happstack_server_tls}" >> cabal.project
207246
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package happstack-server-tls" >> cabal.project ; fi
208-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
247+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi
248+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package happstack-server-tls" >> cabal.project ; fi
249+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
209250
cat >> cabal.project <<EOF
210251
EOF
211-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(happstack-server-tls)$/; }' >> cabal.project.local
252+
if $HEADHACKAGE; then
253+
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
254+
fi
255+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(happstack-server-tls)$/; }' >> cabal.project.local
212256
cat cabal.project
213257
cat cabal.project.local
214258
- name: dump install plan
215259
run: |
216260
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
217261
cabal-plan
218262
- name: restore cache
219-
uses: actions/cache/restore@v3
263+
uses: actions/cache/restore@v4
220264
with:
221265
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
222266
path: ~/.cabal/store
@@ -231,12 +275,9 @@ jobs:
231275
- name: build
232276
run: |
233277
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
234-
- name: tests
235-
run: |
236-
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
237278
- name: cabal check
238279
run: |
239-
cd ${PKGDIR_happstack_server} || false
280+
cd ${PKGDIR_happstack_server_tls} || false
240281
${CABAL} -vnormal check
241282
- name: haddock
242283
run: |
@@ -246,8 +287,8 @@ jobs:
246287
rm -f cabal.project.local
247288
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
248289
- name: save cache
249-
uses: actions/cache/save@v3
250290
if: always()
291+
uses: actions/cache/save@v4
251292
with:
252293
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
253294
path: ~/.cabal/store

cabal.haskell-ci

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
branches: master
2+
3+
error-incomplete-patterns: False

happstack-server-tls.cabal

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: happstack-server-tls
2-
Version: 7.2.1.6
2+
Version: 7.2.1.7
33
Synopsis: extend happstack-server with https:// support (TLS/SSL)
44
Description: Allows you to use https:// without relying on apache, nginx, etc
55
Homepage: http://www.happstack.com/
@@ -11,8 +11,24 @@ Copyright: 2012-2019, Jeremy Shaw
1111
Category: Web, Happstack
1212
Build-type: Simple
1313
Cabal-version: >=1.10
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.8, GHC==9.6.4, GHC==9.8.2
1514
extra-source-files: README.md
15+
tested-with:
16+
GHC == 9.14.1
17+
GHC == 9.12.2
18+
GHC == 9.10.2
19+
GHC == 9.8.2
20+
GHC == 9.6.7
21+
GHC == 9.4.8
22+
GHC == 9.2.8
23+
GHC == 9.0.2
24+
GHC == 8.10.7
25+
GHC == 8.8.4
26+
GHC == 8.6.5
27+
GHC == 8.4.4
28+
GHC == 8.2.2
29+
GHC == 8.0.2
30+
31+
1632

1733
source-repository head
1834
type: git
@@ -34,7 +50,7 @@ Library
3450
HsOpenSSL >= 0.10 && < 0.12,
3551
network > 3.0.0 && < 3.3,
3652
sendfile == 0.7.*,
37-
time >= 1.2 && < 1.15
53+
time >= 1.2 && < 1.16
3854
-- these extra libraries are not needed to build/install the server
3955
-- but they do need to be installed if you want to use GHCi or
4056
-- Template Haskell afterwards

0 commit comments

Comments
 (0)