Skip to content

Commit 9fc5850

Browse files
committed
CI: Run "haskell-ci regenerate"
1 parent 91221f8 commit 9fc5850

File tree

1 file changed

+40
-21
lines changed

1 file changed

+40
-21
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 40 additions & 21 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.20231106
11+
# version: 0.19.20250722
1212
#
13-
# REGENDATA ("0.17.20231106",["github","basic-sop.cabal"])
13+
# REGENDATA ("0.19.20250722",["github","basic-sop.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -19,15 +19,25 @@ on:
1919
jobs:
2020
linux:
2121
name: Haskell-CI - Linux - ${{ matrix.compiler }}
22-
runs-on: ubuntu-20.04
22+
runs-on: ubuntu-24.04
2323
timeout-minutes:
2424
60
2525
container:
26-
image: buildpack-deps:bionic
26+
image: buildpack-deps:jammy
2727
continue-on-error: ${{ matrix.allow-failure }}
2828
strategy:
2929
matrix:
3030
include:
31+
- compiler: ghc-9.12.2
32+
compilerKind: ghc
33+
compilerVersion: 9.12.2
34+
setup-method: ghcup
35+
allow-failure: false
36+
- compiler: ghc-9.10.2
37+
compilerKind: ghc
38+
compilerVersion: 9.10.2
39+
setup-method: ghcup
40+
allow-failure: false
3141
- compiler: ghc-9.8.1
3242
compilerKind: ghc
3343
compilerVersion: 9.8.1
@@ -60,15 +70,29 @@ jobs:
6070
allow-failure: false
6171
fail-fast: false
6272
steps:
63-
- name: apt
73+
- name: apt-get install
6474
run: |
6575
apt-get update
6676
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
77+
- name: Install GHCup
78+
run: |
6779
mkdir -p "$HOME/.ghcup/bin"
68-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
80+
curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
6981
chmod a+x "$HOME/.ghcup/bin/ghcup"
82+
- name: Install cabal-install
83+
run: |
84+
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
85+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
86+
- name: Install GHC (GHCup)
87+
if: matrix.setup-method == 'ghcup'
88+
run: |
7089
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
71-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
90+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
91+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
92+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
93+
echo "HC=$HC" >> "$GITHUB_ENV"
94+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
95+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
7296
env:
7397
HCKIND: ${{ matrix.compilerKind }}
7498
HCNAME: ${{ matrix.compiler }}
@@ -79,21 +103,12 @@ jobs:
79103
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
80104
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
81105
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
82-
HCDIR=/opt/$HCKIND/$HCVER
83-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
84-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
85-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
86-
echo "HC=$HC" >> "$GITHUB_ENV"
87-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
88-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
89-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
90106
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
91107
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
92108
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
93109
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
94110
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
95111
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
96-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
97112
env:
98113
HCKIND: ${{ matrix.compilerKind }}
99114
HCNAME: ${{ matrix.compiler }}
@@ -143,7 +158,7 @@ jobs:
143158
chmod a+x $HOME/.cabal/bin/cabal-plan
144159
cabal-plan --version
145160
- name: checkout
146-
uses: actions/checkout@v3
161+
uses: actions/checkout@v4
147162
with:
148163
path: source
149164
- name: initial cabal.project for sdist
@@ -168,18 +183,22 @@ jobs:
168183
touch cabal.project.local
169184
echo "packages: ${PKGDIR_basic_sop}" >> cabal.project
170185
echo "package basic-sop" >> cabal.project
171-
echo " ghc-options: -Werror=missing-methods" >> cabal.project
186+
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
187+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package basic-sop" >> cabal.project ; fi
188+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
189+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package basic-sop" >> cabal.project ; fi
190+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
172191
cat >> cabal.project <<EOF
173192
EOF
174-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(basic-sop)$/; }' >> cabal.project.local
193+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(basic-sop)$/; }' >> cabal.project.local
175194
cat cabal.project
176195
cat cabal.project.local
177196
- name: dump install plan
178197
run: |
179198
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
180199
cabal-plan
181200
- name: restore cache
182-
uses: actions/cache/restore@v3
201+
uses: actions/cache/restore@v4
183202
with:
184203
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
185204
path: ~/.cabal/store
@@ -206,8 +225,8 @@ jobs:
206225
rm -f cabal.project.local
207226
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
208227
- name: save cache
209-
uses: actions/cache/save@v3
210228
if: always()
229+
uses: actions/cache/save@v4
211230
with:
212231
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
213232
path: ~/.cabal/store

0 commit comments

Comments
 (0)