Skip to content

Commit 441fb4a

Browse files
committed
Update CI
1 parent 4c29aa0 commit 441fb4a

File tree

3 files changed

+53
-25
lines changed

3 files changed

+53
-25
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 52 additions & 22 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.18.1
11+
# version: 0.19.20241219
1212
#
13-
# REGENDATA ("0.18.1",["github","--config=cabal.haskell-ci","cabal.project"])
13+
# REGENDATA ("0.19.20241219",["github","--config=cabal.haskell-ci","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -27,7 +27,7 @@ jobs:
2727
timeout-minutes:
2828
60
2929
container:
30-
image: buildpack-deps:bionic
30+
image: buildpack-deps:jammy
3131
services:
3232
postgres:
3333
image: postgres:14
@@ -38,14 +38,24 @@ jobs:
3838
strategy:
3939
matrix:
4040
include:
41-
- compiler: ghc-9.8.2
41+
- compiler: ghc-9.12.1
4242
compilerKind: ghc
43-
compilerVersion: 9.8.2
43+
compilerVersion: 9.12.1
4444
setup-method: ghcup
4545
allow-failure: false
46-
- compiler: ghc-9.6.4
46+
- compiler: ghc-9.10.1
4747
compilerKind: ghc
48-
compilerVersion: 9.6.4
48+
compilerVersion: 9.10.1
49+
setup-method: ghcup
50+
allow-failure: false
51+
- compiler: ghc-9.8.3
52+
compilerKind: ghc
53+
compilerVersion: 9.8.3
54+
setup-method: ghcup-vanilla
55+
allow-failure: false
56+
- compiler: ghc-9.6.6
57+
compilerKind: ghc
58+
compilerVersion: 9.6.6
4959
setup-method: ghcup
5060
allow-failure: false
5161
- compiler: ghc-9.4.8
@@ -70,40 +80,60 @@ jobs:
7080
allow-failure: false
7181
fail-fast: false
7282
steps:
73-
- name: apt
83+
- name: apt-get install
7484
run: |
7585
apt-get update
7686
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
87+
- name: Install GHCup
88+
run: |
7789
mkdir -p "$HOME/.ghcup/bin"
78-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
90+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
7991
chmod a+x "$HOME/.ghcup/bin/ghcup"
92+
- name: Install cabal-install (prerelease)
93+
run: |
94+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
95+
"$HOME/.ghcup/bin/ghcup" install cabal 3.15.0.0.2024.10.3 || (cat "$HOME"/.ghcup/logs/*.* && false)
96+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.15.0.0.2024.10.3 -vnormal+nowrap" >> "$GITHUB_ENV"
97+
- name: Install GHC (GHCup)
98+
if: matrix.setup-method == 'ghcup'
99+
run: |
80100
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
81-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
101+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
102+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
103+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
104+
echo "HC=$HC" >> "$GITHUB_ENV"
105+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
106+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
82107
env:
83108
HCKIND: ${{ matrix.compilerKind }}
84109
HCNAME: ${{ matrix.compiler }}
85110
HCVER: ${{ matrix.compilerVersion }}
86-
- name: Set PATH and environment variables
111+
- name: Install GHC (GHCup vanilla)
112+
if: matrix.setup-method == 'ghcup-vanilla'
87113
run: |
88-
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
89-
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
90-
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
91-
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
92-
HCDIR=/opt/$HCKIND/$HCVER
114+
"$HOME/.ghcup/bin/ghcup" -s https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-vanilla-0.0.8.yaml install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
93115
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
94116
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
95117
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
96118
echo "HC=$HC" >> "$GITHUB_ENV"
97119
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
98120
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
99-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
121+
env:
122+
HCKIND: ${{ matrix.compilerKind }}
123+
HCNAME: ${{ matrix.compiler }}
124+
HCVER: ${{ matrix.compilerVersion }}
125+
- name: Set PATH and environment variables
126+
run: |
127+
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
128+
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
129+
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
130+
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
100131
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
101132
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
102133
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
103134
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
104135
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
105136
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
106-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
107137
env:
108138
HCKIND: ${{ matrix.compilerKind }}
109139
HCNAME: ${{ matrix.compiler }}
@@ -153,7 +183,7 @@ jobs:
153183
chmod a+x $HOME/.cabal/bin/cabal-plan
154184
cabal-plan --version
155185
- name: checkout
156-
uses: actions/checkout@v3
186+
uses: actions/checkout@v4
157187
with:
158188
path: source
159189
- name: initial cabal.project for sdist
@@ -184,15 +214,15 @@ jobs:
184214
allow-newer: *:ghc-prim
185215
allow-newer: *:template-haskell
186216
EOF
187-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(hpqtypes)$/; }' >> cabal.project.local
217+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(hpqtypes)$/; }' >> cabal.project.local
188218
cat cabal.project
189219
cat cabal.project.local
190220
- name: dump install plan
191221
run: |
192222
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
193223
cabal-plan
194224
- name: restore cache
195-
uses: actions/cache/restore@v3
225+
uses: actions/cache/restore@v4
196226
with:
197227
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
198228
path: ~/.cabal/store
@@ -222,8 +252,8 @@ jobs:
222252
rm -f cabal.project.local
223253
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
224254
- name: save cache
225-
uses: actions/cache/save@v3
226255
if: always()
256+
uses: actions/cache/save@v4
227257
with:
228258
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
229259
path: ~/.cabal/store

cabal.haskell-ci

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@ branches: master
22
doctest: False
33
tests: True
44
postgresql: True
5-
6-
ghcup-jobs: True

hpqtypes.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ author: Scrive AB
2121
maintainer: Andrzej Rybczak <[email protected]>
2222
copyright: Scrive AB
2323
category: Database
24-
tested-with: GHC == { 8.10.7, 9.0.2, 9.2.8, 9.4.8, 9.6.4, 9.8.2 }
24+
tested-with: GHC == { 8.10.7, 9.0.2, 9.2.8, 9.4.8, 9.6.6, 9.8.3, 9.10.1, 9.12.1 }
2525

2626
extra-source-files: README.md
2727
, CHANGELOG.md

0 commit comments

Comments
 (0)