Skip to content

Commit 06868a4

Browse files
authored
Merge pull request #10 from gtk2hs/hkm/update-ci
Update CI
2 parents 434e90e + 52c7d6c commit 06868a4

File tree

4 files changed

+110
-251
lines changed

4 files changed

+110
-251
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 32 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# This GitHub workflow config has been generated by a script via
22
#
3-
# haskell-ci 'github' 'cabal.project' '--apt' 'libwebkit2gtk-4.0-dev' '--jobs-selection' 'any' '--error-missing-methods' 'none' '--no-install-dependencies' '--installed' '-Cabal'
3+
# haskell-ci 'github' 'cabal.project' '--apt' 'libwebkit2gtk-4.0-dev' '--jobs-selection' 'any' '--error-missing-methods' 'none' '--no-install-dependencies' '--installed' '-Cabal' '--installed' '-Cabal-syntax' '--cabal-install-version' '3.14.1.1'
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.20250315
1212
#
13-
# REGENDATA ("0.19.20240708",["github","cabal.project","--apt","libwebkit2gtk-4.0-dev","--jobs-selection","any","--error-missing-methods","none","--no-install-dependencies","--installed","-Cabal"])
13+
# REGENDATA ("0.19.20250315",["github","cabal.project","--apt","libwebkit2gtk-4.0-dev","--jobs-selection","any","--error-missing-methods","none","--no-install-dependencies","--installed","-Cabal","--installed","-Cabal-syntax","--cabal-install-version","3.14.1.1"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -19,7 +19,7 @@ on:
1919
jobs:
2020
linux:
2121
name: Haskell-CI - Linux - ${{ matrix.compiler }}
22-
runs-on: ubuntu-20.04
22+
runs-on: ubuntu-24.04
2323
timeout-minutes:
2424
60
2525
container:
@@ -28,14 +28,19 @@ jobs:
2828
strategy:
2929
matrix:
3030
include:
31+
- compiler: ghc-9.12.2
32+
compilerKind: ghc
33+
compilerVersion: 9.12.2
34+
setup-method: ghcup
35+
allow-failure: false
3136
- compiler: ghc-9.10.1
3237
compilerKind: ghc
3338
compilerVersion: 9.10.1
3439
setup-method: ghcup
3540
allow-failure: false
36-
- compiler: ghc-9.8.2
41+
- compiler: ghc-9.8.4
3742
compilerKind: ghc
38-
compilerVersion: 9.8.2
43+
compilerVersion: 9.8.4
3944
setup-method: ghcup
4045
allow-failure: false
4146
- compiler: ghc-9.6.6
@@ -63,44 +68,32 @@ jobs:
6368
compilerVersion: 8.10.7
6469
setup-method: ghcup
6570
allow-failure: false
66-
- compiler: ghc-8.8.4
67-
compilerKind: ghc
68-
compilerVersion: 8.8.4
69-
setup-method: ghcup
70-
allow-failure: false
71-
- compiler: ghc-8.6.5
72-
compilerKind: ghc
73-
compilerVersion: 8.6.5
74-
setup-method: ghcup
75-
allow-failure: false
76-
- compiler: ghc-8.4.4
77-
compilerKind: ghc
78-
compilerVersion: 8.4.4
79-
setup-method: ghcup
80-
allow-failure: false
81-
- compiler: ghc-8.2.2
82-
compilerKind: ghc
83-
compilerVersion: 8.2.2
84-
setup-method: ghcup
85-
allow-failure: false
86-
- compiler: ghc-8.0.2
87-
compilerKind: ghc
88-
compilerVersion: 8.0.2
89-
setup-method: ghcup
90-
allow-failure: false
9171
fail-fast: false
9272
steps:
93-
- name: apt
73+
- name: apt-get install
9474
run: |
9575
apt-get update
96-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
76+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
77+
apt-get install -y libwebkit2gtk-4.0-dev
78+
- name: Install GHCup
79+
run: |
9780
mkdir -p "$HOME/.ghcup/bin"
98-
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
81+
curl -sL https://downloads.haskell.org/ghcup/0.1.40.0/x86_64-linux-ghcup-0.1.40.0 > "$HOME/.ghcup/bin/ghcup"
9982
chmod a+x "$HOME/.ghcup/bin/ghcup"
83+
- name: Install cabal-install
84+
run: |
85+
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.1 || (cat "$HOME"/.ghcup/logs/*.* && false)
86+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.1 -vnormal+nowrap" >> "$GITHUB_ENV"
87+
- name: Install GHC (GHCup)
88+
if: matrix.setup-method == 'ghcup'
89+
run: |
10090
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
101-
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
102-
apt-get update
103-
apt-get install -y libwebkit2gtk-4.0-dev
91+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
92+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
93+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
94+
echo "HC=$HC" >> "$GITHUB_ENV"
95+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
96+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
10497
env:
10598
HCKIND: ${{ matrix.compilerKind }}
10699
HCNAME: ${{ matrix.compiler }}
@@ -111,21 +104,12 @@ jobs:
111104
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
112105
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
113106
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
114-
HCDIR=/opt/$HCKIND/$HCVER
115-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
116-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
117-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
118-
echo "HC=$HC" >> "$GITHUB_ENV"
119-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
120-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
121-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
122107
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
123108
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
124109
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
125110
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
126111
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
127112
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
128-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
129113
env:
130114
HCKIND: ${{ matrix.compilerKind }}
131115
HCNAME: ${{ matrix.compiler }}
@@ -201,7 +185,7 @@ jobs:
201185
echo "packages: ${PKGDIR_webkit2gtk3_javascriptcore}" >> cabal.project
202186
cat >> cabal.project <<EOF
203187
EOF
204-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(Cabal|webkit2gtk3-javascriptcore)$/; }' >> cabal.project.local
188+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(Cabal|Cabal-syntax|webkit2gtk3-javascriptcore)$/; }' >> cabal.project.local
205189
cat cabal.project
206190
cat cabal.project.local
207191
- name: dump install plan
@@ -232,8 +216,8 @@ jobs:
232216
rm -f cabal.project.local
233217
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
234218
- name: save cache
235-
uses: actions/cache/save@v4
236219
if: always()
220+
uses: actions/cache/save@v4
237221
with:
238222
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
239223
path: ~/.cabal/store

0 commit comments

Comments
 (0)