Skip to content

Commit 61c6e13

Browse files
committed
Updated CI
1 parent 0cf67e9 commit 61c6e13

File tree

2 files changed

+46
-29
lines changed

2 files changed

+46
-29
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 45 additions & 28 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.19.20240708
11+
# version: 0.19.20250917
1212
#
13-
# REGENDATA ("0.19.20240708",["github","cabal.project"])
13+
# REGENDATA ("0.19.20250917",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -20,10 +20,13 @@ on:
2020
pull_request:
2121
branches:
2222
- main
23+
merge_group:
24+
branches:
25+
- main
2326
jobs:
2427
linux:
2528
name: Haskell-CI - Linux - ${{ matrix.compiler }}
26-
runs-on: ubuntu-20.04
29+
runs-on: ubuntu-24.04
2730
timeout-minutes:
2831
60
2932
container:
@@ -32,19 +35,24 @@ jobs:
3235
strategy:
3336
matrix:
3437
include:
35-
- compiler: ghc-9.10.1
38+
- compiler: ghc-9.12.2
39+
compilerKind: ghc
40+
compilerVersion: 9.12.2
41+
setup-method: ghcup
42+
allow-failure: false
43+
- compiler: ghc-9.10.3
3644
compilerKind: ghc
37-
compilerVersion: 9.10.1
45+
compilerVersion: 9.10.3
3846
setup-method: ghcup
3947
allow-failure: false
40-
- compiler: ghc-9.8.2
48+
- compiler: ghc-9.8.4
4149
compilerKind: ghc
42-
compilerVersion: 9.8.2
50+
compilerVersion: 9.8.4
4351
setup-method: ghcup
4452
allow-failure: false
45-
- compiler: ghc-9.6.6
53+
- compiler: ghc-9.6.7
4654
compilerKind: ghc
47-
compilerVersion: 9.6.6
55+
compilerVersion: 9.6.7
4856
setup-method: ghcup
4957
allow-failure: false
5058
- compiler: ghc-9.4.8
@@ -69,15 +77,29 @@ jobs:
6977
allow-failure: false
7078
fail-fast: false
7179
steps:
72-
- name: apt
80+
- name: apt-get install
7381
run: |
7482
apt-get update
7583
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
84+
- name: Install GHCup
85+
run: |
7686
mkdir -p "$HOME/.ghcup/bin"
77-
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.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"
7888
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: |
7996
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
80-
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.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"
81103
env:
82104
HCKIND: ${{ matrix.compilerKind }}
83105
HCNAME: ${{ matrix.compiler }}
@@ -88,21 +110,12 @@ jobs:
88110
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
89111
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
90112
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
91-
HCDIR=/opt/$HCKIND/$HCVER
92-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
93-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
94-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
95-
echo "HC=$HC" >> "$GITHUB_ENV"
96-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
97-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
98-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
99113
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
100114
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
101115
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
102116
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
103117
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
104118
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
105-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
106119
env:
107120
HCKIND: ${{ matrix.compilerKind }}
108121
HCNAME: ${{ matrix.compiler }}
@@ -145,7 +158,7 @@ jobs:
145158
- name: cache (tools)
146159
uses: actions/cache/restore@v4
147160
with:
148-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-655fd156
161+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-54f36d55
149162
path: ~/.haskell-ci-tools
150163
- name: install cabal-plan
151164
run: |
@@ -161,13 +174,13 @@ jobs:
161174
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then $CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.22.0' ; fi
162175
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then doctest --version ; fi
163176
- name: save cache (tools)
164-
uses: actions/cache/save@v4
165177
if: always()
178+
uses: actions/cache/save@v4
166179
with:
167-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-655fd156
180+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-54f36d55
168181
path: ~/.haskell-ci-tools
169182
- name: checkout
170-
uses: actions/checkout@v4
183+
uses: actions/checkout@v5
171184
with:
172185
path: source
173186
- name: initial cabal.project for sdist
@@ -192,7 +205,11 @@ jobs:
192205
touch cabal.project.local
193206
echo "packages: ${PKGDIR_typed_process_effectful}" >> cabal.project
194207
echo "package typed-process-effectful" >> cabal.project
195-
echo " ghc-options: -Werror=missing-methods" >> cabal.project
208+
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
209+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package typed-process-effectful" >> cabal.project ; fi
210+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
211+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package typed-process-effectful" >> cabal.project ; fi
212+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
196213
cat >> cabal.project <<EOF
197214
EOF
198215
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(typed-process-effectful)$/; }' >> cabal.project.local
@@ -224,7 +241,7 @@ jobs:
224241
- name: doctest
225242
run: |
226243
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then cd ${PKGDIR_typed_process_effectful} || false ; fi
227-
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then doctest -XHaskell2010 -XDataKinds -XFlexibleContexts -XGADTs -XKindSignatures -XTypeOperators src ; fi
244+
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then doctest -XHaskell2010 -XDataKinds -XFlexibleContexts -XGADTs -XKindSignatures -XTypeOperators src/ ; fi
228245
- name: cabal check
229246
run: |
230247
cd ${PKGDIR_typed_process_effectful} || false
@@ -237,8 +254,8 @@ jobs:
237254
rm -f cabal.project.local
238255
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
239256
- name: save cache
240-
uses: actions/cache/save@v4
241257
if: always()
258+
uses: actions/cache/save@v4
242259
with:
243260
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
244261
path: ~/.cabal/store

typed-process-effectful.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ extra-doc-files:
3232
extra-source-files:
3333
LICENSE.md
3434

35-
tested-with: ghc ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.2 || ==9.10.1
35+
tested-with: ghc ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.7 || ==9.8.4 || ==9.10.3 || ==9.12.2
3636

3737
source-repository head
3838
type: git

0 commit comments

Comments
 (0)