Skip to content

Commit 2bf817a

Browse files
authored
Merge pull request #89 from iconnect/wip/fix-ci
Update CI
2 parents 051d6f2 + d8c4fd1 commit 2bf817a

File tree

2 files changed

+37
-41
lines changed

2 files changed

+37
-41
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
# This GitHub workflow config has been generated by a script via
22
#
3-
# haskell-ci 'github' 'api-tools.cabal'
3+
# haskell-ci 'github' 'api-tools.cabal' '--no-error-unused-packages' '--no-error-incomplete-patterns'
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.19.20240708
11+
# version: 0.19.20251019
1212
#
13-
# REGENDATA ("0.19.20240708",["github","api-tools.cabal"])
13+
# REGENDATA ("0.19.20251019",["github","api-tools.cabal","--no-error-unused-packages","--no-error-incomplete-patterns"])
1414
#
1515
name: Haskell-CI
1616
on:
1717
- push
1818
- pull_request
19+
- merge_group
1920
jobs:
2021
linux:
2122
name: Haskell-CI - Linux - ${{ matrix.compiler }}
22-
runs-on: ubuntu-20.04
23+
runs-on: ubuntu-24.04
2324
timeout-minutes:
2425
60
2526
container:
@@ -28,37 +29,46 @@ jobs:
2829
strategy:
2930
matrix:
3031
include:
31-
- compiler: ghc-9.10.1
32+
- compiler: ghc-9.10.3
3233
compilerKind: ghc
33-
compilerVersion: 9.10.1
34+
compilerVersion: 9.10.3
3435
setup-method: ghcup
3536
allow-failure: false
36-
- compiler: ghc-9.8.2
37+
- compiler: ghc-9.8.4
3738
compilerKind: ghc
38-
compilerVersion: 9.8.2
39+
compilerVersion: 9.8.4
3940
setup-method: ghcup
4041
allow-failure: false
41-
- compiler: ghc-9.6.6
42+
- compiler: ghc-9.6.7
4243
compilerKind: ghc
43-
compilerVersion: 9.6.6
44-
setup-method: ghcup
45-
allow-failure: false
46-
- compiler: ghc-9.4.8
47-
compilerKind: ghc
48-
compilerVersion: 9.4.8
44+
compilerVersion: 9.6.7
4945
setup-method: ghcup
5046
allow-failure: false
5147
fail-fast: false
5248
steps:
53-
- name: apt
49+
- name: apt-get install
5450
run: |
5551
apt-get update
5652
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
53+
- name: Install GHCup
54+
run: |
5755
mkdir -p "$HOME/.ghcup/bin"
58-
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
56+
curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
5957
chmod a+x "$HOME/.ghcup/bin/ghcup"
58+
- name: Install cabal-install
59+
run: |
60+
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
61+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
62+
- name: Install GHC (GHCup)
63+
if: matrix.setup-method == 'ghcup'
64+
run: |
6065
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
61-
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
66+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
67+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
68+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
69+
echo "HC=$HC" >> "$GITHUB_ENV"
70+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
71+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
6272
env:
6373
HCKIND: ${{ matrix.compilerKind }}
6474
HCNAME: ${{ matrix.compiler }}
@@ -69,21 +79,12 @@ jobs:
6979
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
7080
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
7181
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
72-
HCDIR=/opt/$HCKIND/$HCVER
73-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
74-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
75-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
76-
echo "HC=$HC" >> "$GITHUB_ENV"
77-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
78-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
79-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
8082
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
8183
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
8284
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
8385
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
8486
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
8587
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
86-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
8788
env:
8889
HCKIND: ${{ matrix.compilerKind }}
8990
HCNAME: ${{ matrix.compiler }}
@@ -133,7 +134,7 @@ jobs:
133134
chmod a+x $HOME/.cabal/bin/cabal-plan
134135
cabal-plan --version
135136
- name: checkout
136-
uses: actions/checkout@v4
137+
uses: actions/checkout@v5
137138
with:
138139
path: source
139140
- name: initial cabal.project for sdist
@@ -158,7 +159,7 @@ jobs:
158159
touch cabal.project.local
159160
echo "packages: ${PKGDIR_api_tools}" >> cabal.project
160161
echo "package api-tools" >> cabal.project
161-
echo " ghc-options: -Werror=missing-methods" >> cabal.project
162+
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
162163
cat >> cabal.project <<EOF
163164
EOF
164165
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(api-tools)$/; }' >> cabal.project.local
@@ -199,8 +200,8 @@ jobs:
199200
rm -f cabal.project.local
200201
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
201202
- name: save cache
202-
uses: actions/cache/save@v4
203203
if: always()
204+
uses: actions/cache/save@v4
204205
with:
205206
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
206207
path: ~/.cabal/store

api-tools.cabal

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,16 @@ License: BSD3
1212
License-file: LICENSE
1313
Author: Chris Dornan <chrisd@irisconnect.co.uk> and Adam Gundry <adam@well-typed.com>
1414
Maintainer: Adam Gundry <adam@well-typed.com>
15-
Copyright: (c) Iris Connect 2013-2024
15+
Copyright: (c) Iris Connect 2013-2025
1616
Category: Network, Web, Cloud, Distributed Computing
1717
Build-type: Simple
1818
Extra-source-files: changelog
1919
Cabal-version: >=1.10
20-
Tested-with: GHC == 9.4.8, GHC == 9.6.6, GHC == 9.8.2, GHC == 9.10.1
20+
Tested-with: GHC == 9.6.7, GHC == 9.8.4, GHC == 9.10.3
2121

2222
Source-Repository head
2323
Type: git
24-
Location: git://github.com/iconnect/api-tools.git
25-
26-
Source-Repository this
27-
Type: git
28-
Location: git://github.com/iconnect/api-tools.git
29-
Tag: 0.10.1.0
24+
Location: https://github.com/iconnect/api-tools.git
3025

3126
flag use-attoparsec-aeson
3227
description: Depend on Data.Aeson.Parser from attoparsec-aeson
@@ -194,9 +189,9 @@ Test-Suite test-api-tools
194189
containers,
195190
safecopy,
196191
serialise,
197-
tasty >= 0.10.1 && < 1.5 ,
198-
tasty-hunit >= 0.2 && < 10.0,
199-
tasty-quickcheck >= 0.3 && < 0.11,
192+
tasty >= 0.10.1 && < 1.6 ,
193+
tasty-hunit >= 0.2 && < 0.11,
194+
tasty-quickcheck >= 0.3 && < 0.12,
200195
time,
201196
template-haskell,
202197
text,

0 commit comments

Comments
 (0)