Skip to content

Commit 966f410

Browse files
committed
Updated tested-with and haskell-ci.yml
1 parent 1552850 commit 966f410

2 files changed

Lines changed: 49 additions & 28 deletions

File tree

.github/workflows/haskell-ci.yml

Lines changed: 48 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,53 @@
11
# This GitHub workflow config has been generated by a script via
22
#
3-
# haskell-ci 'github' 'direct-sqlite.cabal'
3+
# haskell-ci 'github' '--distribution' 'jammy' 'direct-sqlite.cabal'
44
#
55
# To regenerate the script (for example after adjusting tested-with) run
66
#
77
# haskell-ci regenerate
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.17.20240109
11+
# version: 0.19.20260624
1212
#
13-
# REGENDATA ("0.17.20240109",["github","direct-sqlite.cabal"])
13+
# REGENDATA ("0.19.20260624",["github","--distribution","jammy","direct-sqlite.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
1717
- push
1818
- pull_request
19+
- merge_group
20+
- workflow_dispatch
1921
jobs:
2022
linux:
2123
name: Haskell-CI - Linux - ${{ matrix.compiler }}
22-
runs-on: ubuntu-20.04
24+
runs-on: ubuntu-24.04
2325
timeout-minutes:
2426
60
2527
container:
26-
image: buildpack-deps:jammy
28+
image: buildpack-deps:noble
2729
continue-on-error: ${{ matrix.allow-failure }}
2830
strategy:
2931
matrix:
3032
include:
31-
- compiler: ghc-9.8.1
33+
- compiler: ghc-9.12.4
3234
compilerKind: ghc
33-
compilerVersion: 9.8.1
35+
compilerVersion: 9.12.4
3436
setup-method: ghcup
3537
allow-failure: false
36-
- compiler: ghc-9.6.4
38+
- compiler: ghc-9.10.3
3739
compilerKind: ghc
38-
compilerVersion: 9.6.4
40+
compilerVersion: 9.10.3
41+
setup-method: ghcup
42+
allow-failure: false
43+
- compiler: ghc-9.8.4
44+
compilerKind: ghc
45+
compilerVersion: 9.8.4
46+
setup-method: ghcup
47+
allow-failure: false
48+
- compiler: ghc-9.6.7
49+
compilerKind: ghc
50+
compilerVersion: 9.6.7
3951
setup-method: ghcup
4052
allow-failure: false
4153
- compiler: ghc-9.4.8
@@ -65,15 +77,29 @@ jobs:
6577
allow-failure: false
6678
fail-fast: false
6779
steps:
68-
- name: apt
80+
- name: apt-get install
6981
run: |
7082
apt-get update
71-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
83+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common
84+
- name: Install GHCup
85+
run: |
7286
mkdir -p "$HOME/.ghcup/bin"
73-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
87+
curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
7488
chmod a+x "$HOME/.ghcup/bin/ghcup"
89+
- name: Install cabal-install
90+
run: |
91+
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
92+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
93+
- name: Install GHC (GHCup)
94+
if: matrix.setup-method == 'ghcup'
95+
run: |
7596
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
76-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
97+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
98+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
99+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
100+
echo "HC=$HC" >> "$GITHUB_ENV"
101+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
102+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
77103
env:
78104
HCKIND: ${{ matrix.compilerKind }}
79105
HCNAME: ${{ matrix.compiler }}
@@ -84,21 +110,12 @@ jobs:
84110
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
85111
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
86112
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
87-
HCDIR=/opt/$HCKIND/$HCVER
88-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
89-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
90-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
91-
echo "HC=$HC" >> "$GITHUB_ENV"
92-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
93-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
94-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
95113
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
96114
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
97115
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
98116
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
99117
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
100118
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
101-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
102119
env:
103120
HCKIND: ${{ matrix.compilerKind }}
104121
HCNAME: ${{ matrix.compiler }}
@@ -148,7 +165,7 @@ jobs:
148165
chmod a+x $HOME/.cabal/bin/cabal-plan
149166
cabal-plan --version
150167
- name: checkout
151-
uses: actions/checkout@v3
168+
uses: actions/checkout@v7
152169
with:
153170
path: source
154171
- name: initial cabal.project for sdist
@@ -173,18 +190,22 @@ jobs:
173190
touch cabal.project.local
174191
echo "packages: ${PKGDIR_direct_sqlite}" >> cabal.project
175192
echo "package direct-sqlite" >> cabal.project
176-
echo " ghc-options: -Werror=missing-methods" >> cabal.project
193+
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
194+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package direct-sqlite" >> cabal.project ; fi
195+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
196+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package direct-sqlite" >> cabal.project ; fi
197+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
177198
cat >> cabal.project <<EOF
178199
EOF
179-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(direct-sqlite)$/; }' >> cabal.project.local
200+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(direct-sqlite)$/; }' >> cabal.project.local
180201
cat cabal.project
181202
cat cabal.project.local
182203
- name: dump install plan
183204
run: |
184205
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
185206
cabal-plan
186207
- name: restore cache
187-
uses: actions/cache/restore@v3
208+
uses: actions/cache/restore@v6
188209
with:
189210
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
190211
path: ~/.cabal/store
@@ -214,8 +235,8 @@ jobs:
214235
rm -f cabal.project.local
215236
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
216237
- name: save cache
217-
uses: actions/cache/save@v3
218238
if: always()
239+
uses: actions/cache/save@v6
219240
with:
220241
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
221242
path: ~/.cabal/store

direct-sqlite.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ extra-source-files: cbits/sqlite3.c
2525
changelog
2626
README.md
2727
cabal-version: >= 1.10
28-
tested-with: GHC == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.4 || == 9.8.1
28+
tested-with: GHC == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.7 || == 9.8.4 || == 9.10.3 || == 9.12.4
2929

3030
source-repository head
3131
type: git

0 commit comments

Comments
 (0)