Skip to content

Commit e9bf926

Browse files
committed
Support GHC-9.14
1 parent a214d05 commit e9bf926

2 files changed

Lines changed: 281 additions & 7 deletions

File tree

.github/workflows/haskell-ci.yml

Lines changed: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
# This GitHub workflow config has been generated by a script via
2+
#
3+
# haskell-ci 'github' 'threadscope.cabal'
4+
#
5+
# To regenerate the script (for example after adjusting tested-with) run
6+
#
7+
# haskell-ci regenerate
8+
#
9+
# For more information, see https://github.com/haskell-CI/haskell-ci
10+
#
11+
# version: 0.19.20251118
12+
#
13+
# REGENDATA ("0.19.20251118",["github","threadscope.cabal"])
14+
#
15+
name: Haskell-CI
16+
on:
17+
- push
18+
- pull_request
19+
- merge_group
20+
jobs:
21+
linux:
22+
name: Haskell-CI - Linux - ${{ matrix.compiler }}
23+
runs-on: ubuntu-24.04
24+
timeout-minutes:
25+
60
26+
container:
27+
image: buildpack-deps:jammy
28+
continue-on-error: ${{ matrix.allow-failure }}
29+
strategy:
30+
matrix:
31+
include:
32+
- compiler: ghc-9.14.0.20251104
33+
compilerKind: ghc
34+
compilerVersion: 9.14.0.20251104
35+
setup-method: ghcup-prerelease
36+
allow-failure: false
37+
- compiler: ghc-9.12.2
38+
compilerKind: ghc
39+
compilerVersion: 9.12.2
40+
setup-method: ghcup
41+
allow-failure: false
42+
- compiler: ghc-9.10.3
43+
compilerKind: ghc
44+
compilerVersion: 9.10.3
45+
setup-method: ghcup
46+
allow-failure: false
47+
- compiler: ghc-9.8.4
48+
compilerKind: ghc
49+
compilerVersion: 9.8.4
50+
setup-method: ghcup
51+
allow-failure: false
52+
- compiler: ghc-9.6.7
53+
compilerKind: ghc
54+
compilerVersion: 9.6.7
55+
setup-method: ghcup
56+
allow-failure: false
57+
- compiler: ghc-9.4.8
58+
compilerKind: ghc
59+
compilerVersion: 9.4.8
60+
setup-method: ghcup
61+
allow-failure: false
62+
- compiler: ghc-9.2.8
63+
compilerKind: ghc
64+
compilerVersion: 9.2.8
65+
setup-method: ghcup
66+
allow-failure: false
67+
- compiler: ghc-9.0.2
68+
compilerKind: ghc
69+
compilerVersion: 9.0.2
70+
setup-method: ghcup
71+
allow-failure: false
72+
- compiler: ghc-8.10.7
73+
compilerKind: ghc
74+
compilerVersion: 8.10.7
75+
setup-method: ghcup
76+
allow-failure: false
77+
- compiler: ghc-8.8.4
78+
compilerKind: ghc
79+
compilerVersion: 8.8.4
80+
setup-method: ghcup
81+
allow-failure: false
82+
fail-fast: false
83+
steps:
84+
- name: apt-get install
85+
run: |
86+
apt-get update
87+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
88+
- name: Install GHCup
89+
run: |
90+
mkdir -p "$HOME/.ghcup/bin"
91+
curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
92+
chmod a+x "$HOME/.ghcup/bin/ghcup"
93+
- name: Install cabal-install
94+
run: |
95+
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
96+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
97+
- name: Install GHC (GHCup)
98+
if: matrix.setup-method == 'ghcup'
99+
run: |
100+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (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"
107+
env:
108+
HCKIND: ${{ matrix.compilerKind }}
109+
HCNAME: ${{ matrix.compiler }}
110+
HCVER: ${{ matrix.compilerVersion }}
111+
- name: Install GHC (GHCup prerelease)
112+
if: matrix.setup-method == 'ghcup-prerelease'
113+
run: |
114+
"$HOME/.ghcup/bin/ghcup" config add-release-channel prereleases
115+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
116+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
117+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
118+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
119+
echo "HC=$HC" >> "$GITHUB_ENV"
120+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
121+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
122+
env:
123+
HCKIND: ${{ matrix.compilerKind }}
124+
HCNAME: ${{ matrix.compiler }}
125+
HCVER: ${{ matrix.compilerVersion }}
126+
- name: Set PATH and environment variables
127+
run: |
128+
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
129+
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
130+
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
131+
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
132+
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
133+
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
134+
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
135+
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
136+
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
137+
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
138+
env:
139+
HCKIND: ${{ matrix.compilerKind }}
140+
HCNAME: ${{ matrix.compiler }}
141+
HCVER: ${{ matrix.compilerVersion }}
142+
- name: env
143+
run: |
144+
env
145+
- name: write cabal config
146+
run: |
147+
mkdir -p $CABAL_DIR
148+
cat >> $CABAL_CONFIG <<EOF
149+
remote-build-reporting: anonymous
150+
write-ghc-environment-files: never
151+
remote-repo-cache: $CABAL_DIR/packages
152+
logs-dir: $CABAL_DIR/logs
153+
world-file: $CABAL_DIR/world
154+
extra-prog-path: $CABAL_DIR/bin
155+
symlink-bindir: $CABAL_DIR/bin
156+
installdir: $CABAL_DIR/bin
157+
build-summary: $CABAL_DIR/logs/build.log
158+
store-dir: $CABAL_DIR/store
159+
install-dirs user
160+
prefix: $CABAL_DIR
161+
repository hackage.haskell.org
162+
url: http://hackage.haskell.org/
163+
EOF
164+
if $HEADHACKAGE; then
165+
cat >> $CABAL_CONFIG <<EOF
166+
repository head.hackage.ghc.haskell.org
167+
url: https://ghc.gitlab.haskell.org/head.hackage/
168+
secure: True
169+
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
170+
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
171+
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
172+
key-threshold: 3
173+
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
174+
EOF
175+
fi
176+
cat >> $CABAL_CONFIG <<EOF
177+
program-default-options
178+
ghc-options: $GHCJOBS +RTS -M3G -RTS
179+
EOF
180+
cat $CABAL_CONFIG
181+
- name: versions
182+
run: |
183+
$HC --version || true
184+
$HC --print-project-git-commit-id || true
185+
$CABAL --version || true
186+
- name: update cabal index
187+
run: |
188+
$CABAL v2-update -v
189+
- name: install cabal-plan
190+
run: |
191+
mkdir -p $HOME/.cabal/bin
192+
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.7.3.0/cabal-plan-0.7.3.0-x86_64-linux.xz > cabal-plan.xz
193+
echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
194+
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
195+
rm -f cabal-plan.xz
196+
chmod a+x $HOME/.cabal/bin/cabal-plan
197+
cabal-plan --version
198+
- name: checkout
199+
uses: actions/checkout@v5
200+
with:
201+
path: source
202+
- name: initial cabal.project for sdist
203+
run: |
204+
touch cabal.project
205+
echo "packages: $GITHUB_WORKSPACE/source/." >> cabal.project
206+
cat cabal.project
207+
- name: sdist
208+
run: |
209+
mkdir -p sdist
210+
$CABAL sdist all --output-dir $GITHUB_WORKSPACE/sdist
211+
- name: unpack
212+
run: |
213+
mkdir -p unpacked
214+
find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \;
215+
- name: generate cabal.project
216+
run: |
217+
PKGDIR_threadscope="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/threadscope-[0-9.]*')"
218+
echo "PKGDIR_threadscope=${PKGDIR_threadscope}" >> "$GITHUB_ENV"
219+
rm -f cabal.project cabal.project.local
220+
touch cabal.project
221+
touch cabal.project.local
222+
echo "packages: ${PKGDIR_threadscope}" >> cabal.project
223+
echo "package threadscope" >> cabal.project
224+
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
225+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package threadscope" >> cabal.project ; fi
226+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
227+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package threadscope" >> cabal.project ; fi
228+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
229+
cat >> cabal.project <<EOF
230+
EOF
231+
if $HEADHACKAGE; then
232+
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
233+
fi
234+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(threadscope)$/; }' >> cabal.project.local
235+
cat cabal.project
236+
cat cabal.project.local
237+
- name: dump install plan
238+
run: |
239+
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
240+
cabal-plan
241+
- name: restore cache
242+
uses: actions/cache/restore@v4
243+
with:
244+
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
245+
path: ~/.cabal/store
246+
restore-keys: ${{ runner.os }}-${{ matrix.compiler }}-
247+
- name: install dependencies
248+
run: |
249+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all
250+
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all
251+
- name: build w/o tests
252+
run: |
253+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
254+
- name: build
255+
run: |
256+
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
257+
- name: cabal check
258+
run: |
259+
cd ${PKGDIR_threadscope} || false
260+
${CABAL} -vnormal check
261+
- name: haddock
262+
run: |
263+
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
264+
- name: unconstrained build
265+
run: |
266+
rm -f cabal.project.local
267+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
268+
- name: save cache
269+
if: always()
270+
uses: actions/cache/save@v4
271+
with:
272+
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
273+
path: ~/.cabal/store

threadscope.cabal

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ Tested-with: GHC == 8.8.4
4242
GHC == 9.0.2
4343
GHC == 9.2.8
4444
GHC == 9.4.8
45-
GHC == 9.6.6
45+
GHC == 9.6.7
4646
GHC == 9.8.4
47-
GHC == 9.10.1
48-
GHC == 9.12.1
47+
GHC == 9.10.3
48+
GHC == 9.12.2
49+
GHC == 9.14.1
4950

5051
source-repository head
5152
type: git
@@ -62,14 +63,14 @@ Executable threadscope
6263
array < 0.6,
6364
mtl < 2.4,
6465
filepath < 1.6,
65-
ghc-events >= 0.13 && < 0.21,
66-
containers >= 0.2 && < 0.8,
66+
ghc-events >= 0.13 && < 0.22,
67+
containers >= 0.2 && < 0.9,
6768
deepseq >= 1.1 && <1.7.0,
6869
text < 2.2,
69-
time >= 1.1 && < 1.15,
70+
time >= 1.1 && < 1.16,
7071
bytestring < 0.13,
7172
file-embed < 0.1,
72-
template-haskell < 2.24,
73+
template-haskell < 2.25,
7374
temporary >= 1.1 && < 1.4,
7475
transformers <0.6.3
7576

0 commit comments

Comments
 (0)