Skip to content

Commit 0d78e6f

Browse files
committed
Modernized Haskell CI toolchain
1 parent 0ef3d0f commit 0d78e6f

1 file changed

Lines changed: 21 additions & 14 deletions

File tree

.github/workflows/haskell-ci.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
#
1313
# REGENDATA ("0.19.20260624",["github","--distribution","jammy","direct-sqlite.cabal"])
1414
#
15+
# Manually updated to:
16+
# - use Ubuntu 26.04 (Resolute)
17+
# - use GHCup 0.2.6.2
18+
# - use cabal-install 3.16.1.0
19+
# - use unprefixed Cabal commands without 'v2-' prefix
20+
# - exclude libtinfo5, which is unavailable on Resolute
21+
#
1522
name: Haskell-CI
1623
on:
1724
- push
@@ -21,11 +28,11 @@ on:
2128
jobs:
2229
linux:
2330
name: Haskell-CI - Linux - ${{ matrix.compiler }}
24-
runs-on: ubuntu-24.04
31+
runs-on: ubuntu-26.04
2532
timeout-minutes:
2633
60
2734
container:
28-
image: buildpack-deps:noble
35+
image: buildpack-deps:resolute
2936
continue-on-error: ${{ matrix.allow-failure }}
3037
strategy:
3138
matrix:
@@ -84,12 +91,12 @@ jobs:
8491
- name: Install GHCup
8592
run: |
8693
mkdir -p "$HOME/.ghcup/bin"
87-
curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
94+
curl -sL https://downloads.haskell.org/ghcup/0.2.6.2/x86_64-linux-ghcup-0.2.6.2 > "$HOME/.ghcup/bin/ghcup"
8895
chmod a+x "$HOME/.ghcup/bin/ghcup"
8996
- name: Install cabal-install
9097
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"
98+
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
99+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
93100
- name: Install GHC (GHCup)
94101
if: matrix.setup-method == 'ghcup'
95102
run: |
@@ -154,7 +161,7 @@ jobs:
154161
$CABAL --version || true
155162
- name: update cabal index
156163
run: |
157-
$CABAL v2-update -v
164+
$CABAL update -v
158165
- name: install cabal-plan
159166
run: |
160167
mkdir -p $HOME/.cabal/bin
@@ -202,7 +209,7 @@ jobs:
202209
cat cabal.project.local
203210
- name: dump install plan
204211
run: |
205-
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
212+
$CABAL build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
206213
cabal-plan
207214
- name: restore cache
208215
uses: actions/cache/restore@v6
@@ -212,28 +219,28 @@ jobs:
212219
restore-keys: ${{ runner.os }}-${{ matrix.compiler }}-
213220
- name: install dependencies
214221
run: |
215-
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all
216-
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all
222+
$CABAL build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all
223+
$CABAL build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all
217224
- name: build w/o tests
218225
run: |
219-
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
226+
$CABAL build $ARG_COMPILER --disable-tests --disable-benchmarks all
220227
- name: build
221228
run: |
222-
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
229+
$CABAL build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
223230
- name: tests
224231
run: |
225-
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
232+
$CABAL test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
226233
- name: cabal check
227234
run: |
228235
cd ${PKGDIR_direct_sqlite} || false
229236
${CABAL} -vnormal check
230237
- name: haddock
231238
run: |
232-
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
239+
$CABAL haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
233240
- name: unconstrained build
234241
run: |
235242
rm -f cabal.project.local
236-
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
243+
$CABAL build $ARG_COMPILER --disable-tests --disable-benchmarks all
237244
- name: save cache
238245
if: always()
239246
uses: actions/cache/save@v6

0 commit comments

Comments
 (0)