Skip to content

Commit a0953d5

Browse files
authored
Merge pull request #29 from ulysses4ever/haskell-CI-9.10
2 parents 79e6d06 + 54bc8ed commit a0953d5

File tree

3 files changed

+46
-113
lines changed

3 files changed

+46
-113
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 40 additions & 99 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.20240608
1212
#
13-
# REGENDATA ("0.17.20231010",["github","cabal.project"])
13+
# REGENDATA ("0.19.20240608",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -27,19 +27,19 @@ 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.10.1
3636
compilerKind: ghc
37-
compilerVersion: 9.8.1
37+
compilerVersion: 9.10.1
3838
setup-method: ghcup
3939
allow-failure: false
40-
- compiler: ghc-9.6.3
40+
- compiler: ghc-9.8.2
4141
compilerKind: ghc
42-
compilerVersion: 9.6.3
42+
compilerVersion: 9.8.2
4343
setup-method: ghcup
4444
allow-failure: false
4545
- compiler: ghc-9.4.7
@@ -65,79 +65,29 @@ 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
73+
setup-method: ghcup
7474
allow-failure: false
7575
- compiler: ghc-8.4.4
7676
compilerKind: ghc
7777
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
78+
setup-method: ghcup
11979
allow-failure: false
12080
fail-fast: false
12181
steps:
12282
- name: apt
12383
run: |
12484
apt-get update
125-
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
85+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
86+
mkdir -p "$HOME/.ghcup/bin"
87+
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
88+
chmod a+x "$HOME/.ghcup/bin/ghcup"
89+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
90+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
14191
env:
14292
HCKIND: ${{ matrix.compilerKind }}
14393
HCNAME: ${{ matrix.compiler }}
@@ -149,26 +99,17 @@ jobs:
14999
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
150100
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
151101
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-
102+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
103+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
104+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
105+
echo "HC=$HC" >> "$GITHUB_ENV"
106+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
107+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
108+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
168109
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
169110
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
170-
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
171-
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" ; else echo "ARG_BENCH=--disable-benchmarks" >> "$GITHUB_ENV" ; fi
111+
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
112+
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
172113
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
173114
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
174115
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
@@ -223,14 +164,14 @@ jobs:
223164
- name: install cabal-docspec
224165
run: |
225166
mkdir -p $HOME/.cabal/bin
226-
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20230517/cabal-docspec-0.0.0.20230517-x86_64-linux.xz > cabal-docspec.xz
227-
echo '3b31bbe463ad4d671abbc103db49628562ec48a6604cab278207b5b6acd21ed7 cabal-docspec.xz' | sha256sum -c -
167+
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20240414/cabal-docspec-0.0.0.20240414-x86_64-linux.xz > cabal-docspec.xz
168+
echo '2d18a3f79619e8ec5f11870f926f6dc2616e02a6c889315b7f82044b95a1adb9 cabal-docspec.xz' | sha256sum -c -
228169
xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec
229170
rm -f cabal-docspec.xz
230171
chmod a+x $HOME/.cabal/bin/cabal-docspec
231172
cabal-docspec --version
232173
- name: checkout
233-
uses: actions/checkout@v3
174+
uses: actions/checkout@v4
234175
with:
235176
path: source
236177
- name: initial cabal.project for sdist
@@ -254,20 +195,20 @@ jobs:
254195
touch cabal.project
255196
touch cabal.project.local
256197
echo "packages: ${PKGDIR_rere}" >> cabal.project
257-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package rere" >> cabal.project ; fi
258-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
198+
echo "package rere" >> cabal.project
199+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
259200
cat >> cabal.project <<EOF
260201
constraints: rere +rere-intersection
261202
EOF
262-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(rere)$/; }' >> cabal.project.local
203+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(rere)$/; }' >> cabal.project.local
263204
cat cabal.project
264205
cat cabal.project.local
265206
- name: dump install plan
266207
run: |
267208
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
268209
cabal-plan
269210
- name: restore cache
270-
uses: actions/cache/restore@v3
211+
uses: actions/cache/restore@v4
271212
with:
272213
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
273214
path: ~/.cabal/store
@@ -284,11 +225,11 @@ jobs:
284225
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
285226
- name: tests
286227
run: |
287-
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct ; fi
228+
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
288229
- name: docspec
289230
run: |
290-
if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all ; fi
291-
if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then cabal-docspec $ARG_COMPILER ; fi
231+
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all
232+
cabal-docspec $ARG_COMPILER
292233
- name: cabal check
293234
run: |
294235
cd ${PKGDIR_rere} || false
@@ -311,12 +252,12 @@ jobs:
311252
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='rere +rere-intersection' all
312253
- name: constraint set no-cfg
313254
run: |
314-
if [ $((HCNUMVER >= 70800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='rere -rere-cfg' all --dry-run ; fi
315-
if [ $((HCNUMVER >= 70800)) -ne 0 ] ; then cabal-plan topo | sort ; fi
316-
if [ $((HCNUMVER >= 70800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='rere -rere-cfg' --dependencies-only -j2 all ; fi
317-
if [ $((HCNUMVER >= 70800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='rere -rere-cfg' all ; fi
255+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='rere -rere-cfg' all --dry-run
256+
cabal-plan topo | sort
257+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='rere -rere-cfg' --dependencies-only -j2 all
258+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='rere -rere-cfg' all
318259
- name: save cache
319-
uses: actions/cache/save@v3
260+
uses: actions/cache/save@v4
320261
if: always()
321262
with:
322263
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}

cabal.haskell-ci

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
branches: master
2-
tests: >=7.4
3-
benchmarks: >=7.4
2+
tests: >=8.4
3+
benchmarks: >=8.4
44
docspec: >=8.4
55

66
constraint-set no-cfg
7-
ghc: >=7.8
7+
ghc: >=8.4
88
constraints: rere -rere-cfg
99

1010
constraint-set intersection

rere.cabal

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,15 @@ extra-source-files:
1919
rere.sty
2020

2121
tested-with:
22-
GHC ==7.0.4
23-
|| ==7.2.2
24-
|| ==7.4.2
25-
|| ==7.6.3
26-
|| ==7.8.4
27-
|| ==7.10.3
28-
|| ==8.0.2
29-
|| ==8.2.2
30-
|| ==8.4.4
22+
GHC ==8.4.4
3123
|| ==8.6.5
3224
|| ==8.8.4
3325
|| ==8.10.7
3426
|| ==9.0.2
3527
|| ==9.2.8
3628
|| ==9.4.7
37-
|| ==9.6.3
38-
|| ==9.8.1
29+
|| ==9.6.6
30+
|| ==9.8.2
3931
|| ==9.10.1
4032

4133
source-repository head

0 commit comments

Comments
 (0)