Skip to content

Commit f43ad87

Browse files
committed
Allow containers-0.7; adjust Haskell CI to 8.0 - 9.8.1
Also update build status badge (Linux build).
1 parent cff121f commit f43ad87

File tree

4 files changed

+95
-115
lines changed

4 files changed

+95
-115
lines changed

.github/workflows/haskell-ci.yml

+70-100
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.15.20220525
11+
# version: 0.17.20231012
1212
#
13-
# REGENDATA ("0.15.20220525",["github","hsc2hs.cabal"])
13+
# REGENDATA ("0.17.20231012",["github","hsc2hs.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 }}
2226
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.0.20220501
35+
- compiler: ghc-9.8.1
3236
compilerKind: ghc
33-
compilerVersion: 9.4.0.20220501
37+
compilerVersion: 9.8.1
3438
setup-method: ghcup
35-
allow-failure: true
36-
- compiler: ghc-9.2.2
39+
allow-failure: false
40+
- compiler: ghc-9.6.3
41+
compilerKind: ghc
42+
compilerVersion: 9.6.3
43+
setup-method: ghcup
44+
allow-failure: false
45+
- compiler: ghc-9.4.7
3746
compilerKind: ghc
38-
compilerVersion: 9.2.2
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,80 +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
75-
allow-failure: false
76-
- compiler: ghc-7.10.3
77-
compilerKind: ghc
78-
compilerVersion: 7.10.3
79-
setup-method: hvr-ppa
80-
allow-failure: false
81-
- compiler: ghc-7.8.4
82-
compilerKind: ghc
83-
compilerVersion: 7.8.4
84-
setup-method: hvr-ppa
85-
allow-failure: false
86-
- compiler: ghc-7.6.3
87-
compilerKind: ghc
88-
compilerVersion: 7.6.3
89-
setup-method: hvr-ppa
90-
allow-failure: false
91-
- compiler: ghc-7.4.2
92-
compilerKind: ghc
93-
compilerVersion: 7.4.2
94-
setup-method: hvr-ppa
95-
allow-failure: false
96-
- compiler: ghc-7.2.2
97-
compilerKind: ghc
98-
compilerVersion: 7.2.2
99-
setup-method: hvr-ppa
100-
allow-failure: false
101-
- compiler: ghc-7.0.4
102-
compilerKind: ghc
103-
compilerVersion: 7.0.4
104-
setup-method: hvr-ppa
88+
setup-method: ghcup
10589
allow-failure: false
10690
fail-fast: false
10791
steps:
10892
- name: apt
10993
run: |
11094
apt-get update
111-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
112-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
113-
mkdir -p "$HOME/.ghcup/bin"
114-
curl -sL https://downloads.haskell.org/ghcup/0.1.17.8/x86_64-linux-ghcup-0.1.17.8 > "$HOME/.ghcup/bin/ghcup"
115-
chmod a+x "$HOME/.ghcup/bin/ghcup"
116-
if $HEADHACKAGE; then "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml; fi
117-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
118-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
119-
else
120-
apt-add-repository -y 'ppa:hvr/ghc'
121-
apt-get update
122-
apt-get install -y "$HCNAME"
123-
mkdir -p "$HOME/.ghcup/bin"
124-
curl -sL https://downloads.haskell.org/ghcup/0.1.17.8/x86_64-linux-ghcup-0.1.17.8 > "$HOME/.ghcup/bin/ghcup"
125-
chmod a+x "$HOME/.ghcup/bin/ghcup"
126-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
127-
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)
128102
env:
129103
HCKIND: ${{ matrix.compilerKind }}
130104
HCNAME: ${{ matrix.compiler }}
@@ -136,25 +110,18 @@ jobs:
136110
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
137111
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
138112
HCDIR=/opt/$HCKIND/$HCVER
139-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
140-
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
141-
echo "HC=$HC" >> "$GITHUB_ENV"
142-
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
143-
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
144-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
145-
else
146-
HC=$HCDIR/bin/$HCKIND
147-
echo "HC=$HC" >> "$GITHUB_ENV"
148-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
149-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
150-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
151-
fi
152-
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"
153120
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
154121
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
155122
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
156-
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" ; else echo "ARG_BENCH=--disable-benchmarks" >> "$GITHUB_ENV" ; fi
157-
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
123+
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
124+
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
158125
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
159126
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
160127
env:
@@ -183,17 +150,6 @@ jobs:
183150
repository hackage.haskell.org
184151
url: http://hackage.haskell.org/
185152
EOF
186-
if $HEADHACKAGE; then
187-
cat >> $CABAL_CONFIG <<EOF
188-
repository head.hackage.ghc.haskell.org
189-
url: https://ghc.gitlab.haskell.org/head.hackage/
190-
secure: True
191-
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
192-
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
193-
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
194-
key-threshold: 3
195-
EOF
196-
fi
197153
cat >> $CABAL_CONFIG <<EOF
198154
program-default-options
199155
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -210,14 +166,14 @@ jobs:
210166
- name: install cabal-plan
211167
run: |
212168
mkdir -p $HOME/.cabal/bin
213-
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
214-
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 -
215171
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
216172
rm -f cabal-plan.xz
217173
chmod a+x $HOME/.cabal/bin/cabal-plan
218174
cabal-plan --version
219175
- name: checkout
220-
uses: actions/checkout@v2
176+
uses: actions/checkout@v4
221177
with:
222178
path: source
223179
- name: initial cabal.project for sdist
@@ -244,19 +200,17 @@ jobs:
244200
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package hsc2hs" >> cabal.project ; fi
245201
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
246202
cat >> cabal.project <<EOF
203+
allow-newer: containers
247204
EOF
248-
if $HEADHACKAGE; then
249-
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
250-
fi
251-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(hsc2hs|process)$/; }' >> cabal.project.local
205+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(hsc2hs)$/; }' >> cabal.project.local
252206
cat cabal.project
253207
cat cabal.project.local
254208
- name: dump install plan
255209
run: |
256210
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
257211
cabal-plan
258-
- name: cache
259-
uses: actions/cache@v2
212+
- name: restore cache
213+
uses: actions/cache/restore@v3
260214
with:
261215
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
262216
path: ~/.cabal/store
@@ -280,8 +234,24 @@ jobs:
280234
${CABAL} -vnormal check
281235
- name: haddock
282236
run: |
283-
$CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
237+
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
284238
- name: unconstrained build
285239
run: |
286240
rm -f cabal.project.local
287241
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
242+
- name: prepare for constraint sets
243+
run: |
244+
rm -f cabal.project.local
245+
- name: constraint set containers-0.7
246+
run: |
247+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.7' all --dry-run ; fi
248+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then cabal-plan topo | sort ; fi
249+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.7' --dependencies-only -j2 all ; fi
250+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.7' all ; fi
251+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.7' all ; fi
252+
- name: save cache
253+
uses: actions/cache/save@v3
254+
if: always()
255+
with:
256+
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
257+
path: ~/.cabal/store

README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ The following are unsupported:
251251

252252
.. |Hackage| image:: https://img.shields.io/hackage/v/hsc2hs.svg
253253
:target: http://hackage.haskell.org/package/hsc2hs
254-
.. |Linux build| image:: https://img.shields.io/travis/haskell/hsc2hs.svg
255-
:target: https://travis-ci.org/haskell/hsc2hs
254+
.. |Linux build| image:: https://github.com/haskell/hsc2hs/actions/workflows/haskell-ci.yml/badge.svg
255+
:target: https://github.com/haskell/hsc2hs/actions/workflows/haskell-ci.yml
256256
.. |Windows build| image:: https://ci.appveyor.com/api/projects/status/ee434vcpvit2qeqh?svg=true
257257
:target: https://ci.appveyor.com/project/RyanGlScott/hsc2hs

cabal.haskell-ci

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
ghc-head: True
2-
tests: True
3-
benchmarks: >=7.4
4-
installed: +all -process
1+
branches: master
2+
installed: +all
3+
4+
constraint-set containers-0.7
5+
ghc: >= 8.2
6+
constraints: containers ^>= 0.7
7+
tests: True
8+
run-tests: True
9+
10+
raw-project
11+
allow-newer: containers
12+

hsc2hs.cabal

+11-9
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,23 @@ Data-Files: template-hsc.h
2727
build-type: Simple
2828

2929
tested-with:
30-
GHC == 9.4.1
31-
GHC == 9.2.2
30+
GHC == 9.8.1
31+
GHC == 9.6.3
32+
GHC == 9.4.7
33+
GHC == 9.2.8
3234
GHC == 9.0.2
3335
GHC == 8.10.7
3436
GHC == 8.8.4
3537
GHC == 8.6.5
3638
GHC == 8.4.4
3739
GHC == 8.2.2
3840
GHC == 8.0.2
39-
GHC == 7.10.3
40-
GHC == 7.8.4
41-
GHC == 7.6.3
42-
GHC == 7.4.2
43-
GHC == 7.2.2
44-
GHC == 7.0.4
41+
-- GHC == 7.10.3
42+
-- GHC == 7.8.4
43+
-- GHC == 7.6.3
44+
-- GHC == 7.4.2
45+
-- GHC == 7.2.2
46+
-- GHC == 7.0.4
4547

4648
extra-source-files:
4749
changelog.md
@@ -79,7 +81,7 @@ Executable hsc2hs
7981
Other-Extensions: CPP, NoMonomorphismRestriction
8082

8183
Build-Depends: base >= 4.3.0 && < 4.20,
82-
containers >= 0.4.0 && < 0.7,
84+
containers >= 0.4.0 && < 0.8,
8385
directory >= 1.1.0 && < 1.4,
8486
filepath >= 1.2.0 && < 1.5,
8587
process >= 1.1.0 && < 1.7

0 commit comments

Comments
 (0)