Skip to content

Commit fbc8ba3

Browse files
authored
Merge pull request #39 from haskellari/ci-maintenance
Update CI: Drop support for GHCs prior 8.6.5
2 parents 96a2a4b + 305b9a1 commit fbc8ba3

File tree

14 files changed

+90
-271
lines changed

14 files changed

+90
-271
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 42 additions & 105 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.17.20231010
11+
# version: 0.19.20240501
1212
#
13-
# REGENDATA ("0.17.20231010",["--config=cabal.haskell-ci","github","cabal.project"])
13+
# REGENDATA ("0.19.20240501",["--config=cabal.haskell-ci","github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -27,24 +27,24 @@ jobs:
2727
timeout-minutes:
2828
60
2929
container:
30-
image: buildpack-deps:bionic
30+
image: buildpack-deps:jammy
3131
continue-on-error: ${{ matrix.allow-failure }}
3232
strategy:
3333
matrix:
3434
include:
35-
- compiler: ghc-9.8.1
35+
- compiler: ghc-9.8.2
3636
compilerKind: ghc
37-
compilerVersion: 9.8.1
37+
compilerVersion: 9.8.2
3838
setup-method: ghcup
3939
allow-failure: false
40-
- compiler: ghc-9.6.3
40+
- compiler: ghc-9.6.5
4141
compilerKind: ghc
42-
compilerVersion: 9.6.3
42+
compilerVersion: 9.6.5
4343
setup-method: ghcup
4444
allow-failure: false
45-
- compiler: ghc-9.4.7
45+
- compiler: ghc-9.4.8
4646
compilerKind: ghc
47-
compilerVersion: 9.4.7
47+
compilerVersion: 9.4.8
4848
setup-method: ghcup
4949
allow-failure: false
5050
- compiler: ghc-9.2.8
@@ -65,79 +65,25 @@ jobs:
6565
- compiler: ghc-8.8.4
6666
compilerKind: ghc
6767
compilerVersion: 8.8.4
68-
setup-method: hvr-ppa
68+
setup-method: ghcup
6969
allow-failure: false
7070
- compiler: ghc-8.6.5
7171
compilerKind: ghc
7272
compilerVersion: 8.6.5
73-
setup-method: hvr-ppa
74-
allow-failure: false
75-
- compiler: ghc-8.4.4
76-
compilerKind: ghc
77-
compilerVersion: 8.4.4
78-
setup-method: hvr-ppa
79-
allow-failure: false
80-
- compiler: ghc-8.2.2
81-
compilerKind: ghc
82-
compilerVersion: 8.2.2
83-
setup-method: hvr-ppa
84-
allow-failure: false
85-
- compiler: ghc-8.0.2
86-
compilerKind: ghc
87-
compilerVersion: 8.0.2
88-
setup-method: hvr-ppa
89-
allow-failure: false
90-
- compiler: ghc-7.10.3
91-
compilerKind: ghc
92-
compilerVersion: 7.10.3
93-
setup-method: hvr-ppa
94-
allow-failure: false
95-
- compiler: ghc-7.8.4
96-
compilerKind: ghc
97-
compilerVersion: 7.8.4
98-
setup-method: hvr-ppa
99-
allow-failure: false
100-
- compiler: ghc-7.6.3
101-
compilerKind: ghc
102-
compilerVersion: 7.6.3
103-
setup-method: hvr-ppa
104-
allow-failure: false
105-
- compiler: ghc-7.4.2
106-
compilerKind: ghc
107-
compilerVersion: 7.4.2
108-
setup-method: hvr-ppa
109-
allow-failure: false
110-
- compiler: ghc-7.2.2
111-
compilerKind: ghc
112-
compilerVersion: 7.2.2
113-
setup-method: hvr-ppa
114-
allow-failure: false
115-
- compiler: ghc-7.0.4
116-
compilerKind: ghc
117-
compilerVersion: 7.0.4
118-
setup-method: hvr-ppa
73+
setup-method: ghcup
11974
allow-failure: false
12075
fail-fast: false
12176
steps:
12277
- name: apt
12378
run: |
12479
apt-get update
12580
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
126-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
127-
mkdir -p "$HOME/.ghcup/bin"
128-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
129-
chmod a+x "$HOME/.ghcup/bin/ghcup"
130-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
131-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
132-
else
133-
apt-add-repository -y 'ppa:hvr/ghc'
134-
apt-get update
135-
apt-get install -y "$HCNAME"
136-
mkdir -p "$HOME/.ghcup/bin"
137-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
138-
chmod a+x "$HOME/.ghcup/bin/ghcup"
139-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
140-
fi
81+
mkdir -p "$HOME/.ghcup/bin"
82+
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
83+
chmod a+x "$HOME/.ghcup/bin/ghcup"
84+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
85+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
86+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
14187
env:
14288
HCKIND: ${{ matrix.compilerKind }}
14389
HCNAME: ${{ matrix.compiler }}
@@ -149,22 +95,13 @@ jobs:
14995
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
15096
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
15197
HCDIR=/opt/$HCKIND/$HCVER
152-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
153-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
154-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
155-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
156-
echo "HC=$HC" >> "$GITHUB_ENV"
157-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
158-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
159-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
160-
else
161-
HC=$HCDIR/bin/$HCKIND
162-
echo "HC=$HC" >> "$GITHUB_ENV"
163-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
164-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
165-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
166-
fi
167-
98+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
99+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
100+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
101+
echo "HC=$HC" >> "$GITHUB_ENV"
102+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
103+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
104+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
168105
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
169106
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
170107
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -221,15 +158,15 @@ jobs:
221158
chmod a+x $HOME/.cabal/bin/cabal-plan
222159
cabal-plan --version
223160
- name: checkout
224-
uses: actions/checkout@v3
161+
uses: actions/checkout@v4
225162
with:
226163
path: source
227164
- name: initial cabal.project for sdist
228165
run: |
229166
touch cabal.project
230167
echo "packages: $GITHUB_WORKSPACE/source/indexed-traversable" >> cabal.project
231-
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/indexed-traversable-instances" >> cabal.project ; fi
232-
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/indexed-traversable-benchmarks" >> cabal.project ; fi
168+
echo "packages: $GITHUB_WORKSPACE/source/indexed-traversable-instances" >> cabal.project
169+
echo "packages: $GITHUB_WORKSPACE/source/indexed-traversable-benchmarks" >> cabal.project
233170
cat cabal.project
234171
- name: sdist
235172
run: |
@@ -251,14 +188,14 @@ jobs:
251188
touch cabal.project
252189
touch cabal.project.local
253190
echo "packages: ${PKGDIR_indexed_traversable}" >> cabal.project
254-
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "packages: ${PKGDIR_indexed_traversable_instances}" >> cabal.project ; fi
255-
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "packages: ${PKGDIR_indexed_traversable_benchmarks}" >> cabal.project ; fi
256-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package indexed-traversable" >> cabal.project ; fi
257-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
258-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package indexed-traversable-instances" >> cabal.project ; fi
259-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
260-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package indexed-traversable-benchmarks" >> cabal.project ; fi
261-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
191+
echo "packages: ${PKGDIR_indexed_traversable_instances}" >> cabal.project
192+
echo "packages: ${PKGDIR_indexed_traversable_benchmarks}" >> cabal.project
193+
echo "package indexed-traversable" >> cabal.project
194+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
195+
echo "package indexed-traversable-instances" >> cabal.project
196+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
197+
echo "package indexed-traversable-benchmarks" >> cabal.project
198+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
262199
cat >> cabal.project <<EOF
263200
EOF
264201
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(indexed-traversable|indexed-traversable-benchmarks|indexed-traversable-instances)$/; }' >> cabal.project.local
@@ -269,7 +206,7 @@ jobs:
269206
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
270207
cabal-plan
271208
- name: restore cache
272-
uses: actions/cache/restore@v3
209+
uses: actions/cache/restore@v4
273210
with:
274211
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
275212
path: ~/.cabal/store
@@ -282,15 +219,15 @@ jobs:
282219
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
283220
- name: tests
284221
run: |
285-
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct ; fi
222+
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
286223
- name: cabal check
287224
run: |
288225
cd ${PKGDIR_indexed_traversable} || false
289226
${CABAL} -vnormal check
290-
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then cd ${PKGDIR_indexed_traversable_instances} || false ; fi
291-
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
292-
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then cd ${PKGDIR_indexed_traversable_benchmarks} || false ; fi
293-
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
227+
cd ${PKGDIR_indexed_traversable_instances} || false
228+
${CABAL} -vnormal check
229+
cd ${PKGDIR_indexed_traversable_benchmarks} || false
230+
${CABAL} -vnormal check
294231
- name: haddock
295232
run: |
296233
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
@@ -299,7 +236,7 @@ jobs:
299236
rm -f cabal.project.local
300237
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
301238
- name: save cache
302-
uses: actions/cache/save@v3
239+
uses: actions/cache/save@v4
303240
if: always()
304241
with:
305242
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}

cabal.haskell-ci

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
distribution: jammy
12
branches: master
23
install-dependencies: False
34
jobs-selection: any

cabal.project

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,12 @@ packages: indexed-traversable-instances
33
packages: indexed-traversable-benchmarks
44
tests: True
55
benchmarks: True
6+
7+
package indexed-traversable
8+
ghc-options: -Wall
9+
10+
package indexed-traversable-instances
11+
ghc-options: -Wall
12+
13+
package indexed-traversable-benchmarks
14+
ghc-options: -Wall

indexed-traversable-benchmarks/bench/folds.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{-# LANGUAGE CPP #-}
21
{-# LANGUAGE DeriveFunctor #-}
32
{-# LANGUAGE FlexibleContexts #-}
43
{-# LANGUAGE RankNTypes #-}
@@ -23,14 +22,12 @@ main = defaultMain
2322
, bench "itoList" $ nf itoList v
2423
]
2524
]
26-
#if MIN_VERSION_containers(0,5,0)
2725
, bgroup "sequence"
2826
[ bgroup "itoList"
2927
[ bench "native" $ nf (F.toList . Seq.mapWithIndex (,)) s
3028
, bench "itoList" $ nf itoList s
3129
]
3230
]
33-
#endif
3431
, bgroup "list"
3532
[ bgroup "itoList"
3633
[ bench "native" $ nf (zip [(0::Int)..]) l

indexed-traversable-benchmarks/bench/traversals.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{-# LANGUAGE CPP #-}
21
{-# LANGUAGE DeriveFunctor #-}
32
{-# LANGUAGE FlexibleContexts #-}
43
{-# LANGUAGE RankNTypes #-}
@@ -25,15 +24,13 @@ main = defaultMain
2524
, bench "default" $ nf (imapDefault (\i x -> x + i + 100)) v
2625
]
2726
]
28-
#if MIN_VERSION_containers(0,5,0)
2927
, bgroup "sequence"
3028
[ bgroup "imap"
3129
[ bench "native" $ nf (Seq.mapWithIndex (\i x -> x + i + 100)) s
3230
, bench "imap" $ nf (imap (\i x -> x + i + 100)) s
3331
, bench "default" $ nf (imapDefault (\i x -> x + i + 100)) s
3432
]
3533
]
36-
#endif
3734
, bgroup "list"
3835
[ bgroup "imap"
3936
[ bench "native" $ nf (zipWith (\i x -> x + i + 100) [0..]) l

indexed-traversable-benchmarks/indexed-traversable-benchmarks.cabal

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,14 @@ author: Edward Kmett
1010
synopsis: Benchmark suite for indexed-traversable
1111
description: Benchmark suite for indexed-traversable.
1212
tested-with:
13-
GHC ==7.4.2
14-
|| ==7.6.3
15-
|| ==7.8.4
16-
|| ==7.10.3
17-
|| ==8.0.2
18-
|| ==8.2.2
19-
|| ==8.4.4
20-
|| ==8.6.5
13+
GHC ==8.6.5
2114
|| ==8.8.4
2215
|| ==8.10.7
2316
|| ==9.0.2
2417
|| ==9.2.8
25-
|| ==9.4.7
26-
|| ==9.6.3
27-
|| ==9.8.1
18+
|| ==9.4.8
19+
|| ==9.6.5
20+
|| ==9.8.2
2821

2922
source-repository head
3023
type: git

indexed-traversable-instances/Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.1.2 [2024-05-dd]
2+
3+
- Drop support for GHCs prior 8.6.5
4+
15
# 0.1.1 [2021-10-30]
26

37
- Add `Solo` instances

0 commit comments

Comments
 (0)