Skip to content

Commit e786371

Browse files
authored
Merge pull request #54 from erikd/erikd/ghc-9.12
Make it build with ghc-9.12
2 parents 0e7e648 + 0b42589 commit e786371

File tree

2 files changed

+31
-20
lines changed

2 files changed

+31
-20
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 27 additions & 17 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.20250216
1212
#
13-
# REGENDATA ("0.19.20240708",["github","ekg-core.cabal"])
13+
# REGENDATA ("0.19.20250216",["github","ekg-core.cabal"])
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.1
32+
compilerKind: ghc
33+
compilerVersion: 9.12.1
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
@@ -95,15 +100,29 @@ jobs:
95100
allow-failure: false
96101
fail-fast: false
97102
steps:
98-
- name: apt
103+
- name: apt-get install
99104
run: |
100105
apt-get update
101106
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
107+
- name: Install GHCup
108+
run: |
102109
mkdir -p "$HOME/.ghcup/bin"
103110
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
104111
chmod a+x "$HOME/.ghcup/bin/ghcup"
105-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
112+
- name: Install cabal-install
113+
run: |
106114
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
115+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
116+
- name: Install GHC (GHCup)
117+
if: matrix.setup-method == 'ghcup'
118+
run: |
119+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
120+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
121+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
122+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
123+
echo "HC=$HC" >> "$GITHUB_ENV"
124+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
125+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
107126
env:
108127
HCKIND: ${{ matrix.compilerKind }}
109128
HCNAME: ${{ matrix.compiler }}
@@ -114,21 +133,12 @@ jobs:
114133
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
115134
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
116135
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
117-
HCDIR=/opt/$HCKIND/$HCVER
118-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
119-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
120-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
121-
echo "HC=$HC" >> "$GITHUB_ENV"
122-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
123-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
124-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
125136
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
126137
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
127138
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
128139
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
129140
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
130141
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
131-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
132142
env:
133143
HCKIND: ${{ matrix.compilerKind }}
134144
HCNAME: ${{ matrix.compiler }}
@@ -241,8 +251,8 @@ jobs:
241251
rm -f cabal.project.local
242252
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
243253
- name: save cache
244-
uses: actions/cache/save@v4
245254
if: always()
255+
uses: actions/cache/save@v4
246256
with:
247257
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
248258
path: ~/.cabal/store

ekg-core.cabal

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ tested-with:
2727
|| ==9.4.8
2828
|| ==9.6.4
2929
|| ==9.6.6
30-
|| ==9.8.2
30+
|| ==9.8.4
3131
|| ==9.10.1
32+
|| ==9.12.1
3233

3334
library
3435
exposed-modules:
@@ -45,8 +46,8 @@ library
4546
System.Metrics.ThreadId
4647

4748
build-depends:
48-
base >=4.6 && <4.21
49-
, containers >=0.5 && <0.8
49+
base >=4.6 && <4.22
50+
, containers >=0.5 && <0.9
5051
, text <2.2
5152
, unordered-containers <0.3
5253

0 commit comments

Comments
 (0)