Skip to content

Commit a23e5c6

Browse files
committed
Updated CI
1 parent 1b64a48 commit a23e5c6

File tree

4 files changed

+66
-37
lines changed

4 files changed

+66
-37
lines changed

Diff for: .github/workflows/haskell-ci.yml

+32-32
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.20231004
11+
# version: 0.19.20240708
1212
#
13-
# REGENDATA ("0.17.20231004",["github","cabal.project"])
13+
# REGENDATA ("0.19.20240708",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -27,19 +27,29 @@ 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.6.3
35+
- compiler: ghc-9.10.1
3636
compilerKind: ghc
37-
compilerVersion: 9.6.3
37+
compilerVersion: 9.10.1
3838
setup-method: ghcup
3939
allow-failure: false
40-
- compiler: ghc-9.4.7
40+
- compiler: ghc-9.8.2
4141
compilerKind: ghc
42-
compilerVersion: 9.4.7
42+
compilerVersion: 9.8.2
43+
setup-method: ghcup
44+
allow-failure: false
45+
- compiler: ghc-9.6.6
46+
compilerKind: ghc
47+
compilerVersion: 9.6.6
48+
setup-method: ghcup
49+
allow-failure: false
50+
- compiler: ghc-9.4.8
51+
compilerKind: ghc
52+
compilerVersion: 9.4.8
4353
setup-method: ghcup
4454
allow-failure: false
4555
- compiler: ghc-9.2.8
@@ -64,11 +74,10 @@ jobs:
6474
apt-get update
6575
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
6676
mkdir -p "$HOME/.ghcup/bin"
67-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
77+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
6878
chmod a+x "$HOME/.ghcup/bin/ghcup"
69-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
7079
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
71-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
80+
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
7281
env:
7382
HCKIND: ${{ matrix.compilerKind }}
7483
HCNAME: ${{ matrix.compiler }}
@@ -86,7 +95,7 @@ jobs:
8695
echo "HC=$HC" >> "$GITHUB_ENV"
8796
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
8897
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
89-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
98+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
9099
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
91100
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
92101
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -134,9 +143,9 @@ jobs:
134143
run: |
135144
$CABAL v2-update -v
136145
- name: cache (tools)
137-
uses: actions/cache/restore@v3
146+
uses: actions/cache/restore@v4
138147
with:
139-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-2bcd4d44
148+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-655fd156
140149
path: ~/.haskell-ci-tools
141150
- name: install cabal-plan
142151
run: |
@@ -149,22 +158,16 @@ jobs:
149158
cabal-plan --version
150159
- name: install doctest
151160
run: |
152-
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then $CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.20' ; fi
153-
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then doctest --version ; fi
154-
- name: install hlint
155-
run: |
156-
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then HLINTVER=$(cd /tmp && (${CABAL} v2-install -v $ARG_COMPILER --dry-run hlint --constraint='hlint >=3.3 && <3.6' | perl -ne 'if (/\bhlint-(\d+(\.\d+)*)\b/) { print "$1"; last; }')); echo "HLint version $HLINTVER" ; fi
157-
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then if [ ! -e $HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint ]; then echo "Downloading HLint version $HLINTVER"; mkdir -p $HOME/.haskell-ci-tools; curl --write-out 'Status Code: %{http_code} Redirects: %{num_redirects} Total time: %{time_total} Total Dsize: %{size_download}\n' --silent --location --output $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz "https://github.com/ndmitchell/hlint/releases/download/v$HLINTVER/hlint-$HLINTVER-x86_64-linux.tar.gz"; tar -xzv -f $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz -C $HOME/.haskell-ci-tools; fi ; fi
158-
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then mkdir -p $CABAL_DIR/bin && ln -sf "$HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint" $CABAL_DIR/bin/hlint ; fi
159-
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then hlint --version ; fi
161+
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
162+
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then doctest --version ; fi
160163
- name: save cache (tools)
161-
uses: actions/cache/save@v3
164+
uses: actions/cache/save@v4
162165
if: always()
163166
with:
164-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-2bcd4d44
167+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-655fd156
165168
path: ~/.haskell-ci-tools
166169
- name: checkout
167-
uses: actions/checkout@v3
170+
uses: actions/checkout@v4
168171
with:
169172
path: source
170173
- name: initial cabal.project for sdist
@@ -192,15 +195,15 @@ jobs:
192195
echo " ghc-options: -Werror=missing-methods" >> cabal.project
193196
cat >> cabal.project <<EOF
194197
EOF
195-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(typed-process-effectful)$/; }' >> cabal.project.local
198+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(typed-process-effectful)$/; }' >> cabal.project.local
196199
cat cabal.project
197200
cat cabal.project.local
198201
- name: dump install plan
199202
run: |
200203
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
201204
cabal-plan
202205
- name: restore cache
203-
uses: actions/cache/restore@v3
206+
uses: actions/cache/restore@v4
204207
with:
205208
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
206209
path: ~/.cabal/store
@@ -220,11 +223,8 @@ jobs:
220223
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
221224
- name: doctest
222225
run: |
223-
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then cd ${PKGDIR_typed_process_effectful} || false ; fi
224-
if [ $((HCNUMVER < 90400)) -ne 0 ] ; then doctest -XHaskell2010 -XDataKinds -XFlexibleContexts -XGADTs -XKindSignatures -XTypeOperators src ; fi
225-
- name: hlint
226-
run: |
227-
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_typed_process_effectful} && hlint -XHaskell2010 -XDataKinds -XFlexibleContexts -XGADTs -XKindSignatures -XTypeOperators src) ; fi
226+
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
228228
- name: cabal check
229229
run: |
230230
cd ${PKGDIR_typed_process_effectful} || false
@@ -237,7 +237,7 @@ jobs:
237237
rm -f cabal.project.local
238238
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
239239
- name: save cache
240-
uses: actions/cache/save@v3
240+
uses: actions/cache/save@v4
241241
if: always()
242242
with:
243243
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}

Diff for: .github/workflows/linters.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Linters
2+
on:
3+
- push
4+
- pull_request
5+
jobs:
6+
hlint:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: 'Checkout repository'
11+
uses: actions/checkout@v4
12+
13+
- name: 'Set up cabal-gild'
14+
uses: tfausak/cabal-gild-setup-action@v2
15+
16+
- name: 'Set up hlint'
17+
uses: haskell-actions/hlint-setup@v2
18+
19+
- name: 'Run cabal-gild'
20+
run: cabal-gild --mode check --input typed-process-effectful.cabal
21+
22+
- name: 'Run fourmolu'
23+
uses: haskell-actions/run-fourmolu@v10
24+
25+
- name: 'Run hlint'
26+
uses: haskell-actions/hlint-run@v2
27+
with:
28+
path:
29+
- src/
30+
- example/
31+
- test/
32+
fail-on: suggestion

Diff for: cabal.haskell-ci

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
branches: main
22

3-
doctest: <9.3
4-
hlint: True
5-
hlint-job: 9.4.7
6-
hlint-version: >=3.3 && <3.6
3+
doctest: <9.9
74
tests: True
85
benchmarks: True
96

Diff for: typed-process-effectful.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extra-doc-files:
2929
LICENSE.md
3030
README.md
3131

32-
tested-with: ghc ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.7 || ==9.6.3
32+
tested-with: ghc ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.2 || ==9.10.1
3333

3434
source-repository head
3535
type: git

0 commit comments

Comments
 (0)