Skip to content

Commit a971542

Browse files
committed
Use GHC 9.14 for haddocks
1 parent 8da9a7e commit a971542

6 files changed

Lines changed: 215 additions & 61 deletions

File tree

.github/workflows/github-page.yml

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: "Haddock documentation"
22

33
on:
4+
workflow_dispatch:
5+
pull_request: # TODO: remove
46
push:
57
branches:
68
- master
@@ -14,48 +16,52 @@ jobs:
1416
shell: bash
1517

1618
steps:
17-
- name: Install Nix
18-
uses: cachix/install-nix-action@v18
19+
- uses: actions/checkout@v6
20+
21+
- uses: cachix/install-nix-action@v31
1922
with:
20-
# Use last stable nixos channel and the same nix as in channel:
21-
nix_path: nixpkgs=channel:nixos-24.05
2223
github_access_token: ${{ secrets.GITHUB_TOKEN }}
2324
extra_nix_config: |
25+
accept-flake-config = true
2426
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
25-
experimental-features = nix-command flakes
26-
allow-import-from-derivation = true
27-
substituters = https://cache.nixos.org https://cache.iog.io
28-
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
2927
30-
- uses: actions/checkout@v4
28+
# GHC 9.14 avoids the tyConStupidTheta panic in GHC 9.6 haddock
29+
- uses: rrbutani/use-nix-shell-action@v1
30+
with:
31+
devShell: .#ghc914
3132

32-
- name: Fetch nix cache and update cabal indices
33+
- name: Update cabal indices
3334
run: |
34-
nix develop --command \
35-
cabal update
35+
cabal update
3636
3737
- name: Build whole project
3838
run: |
39-
nix develop --command \
40-
cabal build all
39+
cabal build all
4140
4241
- name: Build documentation
4342
run: |
44-
nix develop --command \
45-
cabal haddock-project --local --output=./haddocks --internal --foreign-libraries
43+
cabal haddock-project --local --output=./haddocks --internal --foreign-libraries
4644
4745
- name: Compress haddocks
4846
run: |
4947
tar -czf haddocks.tgz -C haddocks .
5048
5149
- name: Upload haddocks artifact
52-
uses: actions/upload-artifact@v4
50+
uses: actions/upload-artifact@v7
5351
if: ${{ always() }}
5452
continue-on-error: true
5553
with:
5654
name: haddocks
5755
path: ./haddocks.tgz
5856

57+
- name: Upload cabal logs
58+
uses: actions/upload-artifact@v7
59+
if: failure()
60+
continue-on-error: true
61+
with:
62+
name: cabal-haddock-logs
63+
path: ~/.cache/cabal/logs/
64+
5965
- name: Deploy documentation to gh-pages 🚀
6066
if: github.ref == 'refs/heads/master'
6167
uses: peaceiris/actions-gh-pages@v4

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,5 @@ cardano-tracer/cardano-tracer-test
7777
.idea/
7878

7979
.codex
80+
81+
.serena

cabal.project

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,134 @@ allow-newer:
8787
, io-sim:time
8888
, io-classes:time
8989

90+
if impl(ghc >= 9.12)
91+
allow-newer:
92+
-- we need newer io-classes: https://github.com/input-output-hk/typed-protocols/tree/coot/io-classes-1.9
93+
, io-classes:time
94+
, ouroboros-network:time
95+
, nothunks:time
96+
, network-mux:time
97+
98+
-- cabal-allow-newer
99+
if impl(ghc >= 9.14)
100+
allow-newer:
101+
, aeson:QuickCheck
102+
, aeson:containers
103+
, aeson:template-haskell
104+
, aeson:time
105+
, bin:QuickCheck
106+
, bin:base
107+
, binary:containers
108+
, binary-orphans:base
109+
, blockio:base
110+
, blockio:io-classes
111+
, boring:base
112+
, bytestring-trie:base
113+
, canonical-json:containers
114+
, cardano-addresses:containers
115+
, cardano-addresses:template-haskell
116+
, cardano-diffusion:io-classes
117+
, cardano-prelude:canonical-json
118+
, cborg:base
119+
, cborg:containers
120+
, cborg-json:base
121+
, compact:base
122+
, config-ini:containers
123+
, constraints:boring
124+
, constraints-extras:template-haskell
125+
, criterion:microstache
126+
, data-elevator:base
127+
, dec:base
128+
, dependent-map:containers
129+
, dictionary-sharing:containers
130+
, diff-containers:base
131+
, discrimination:ghc-bignum
132+
, discrimination-ieee754:base
133+
, fin:QuickCheck
134+
, fin:base
135+
, fin:universe-base
136+
, fs-sim:QuickCheck
137+
, ghc:binary
138+
, ghc:time
139+
, grapesy:base
140+
, grapesy:containers
141+
, grpc-spec:base
142+
, grpc-spec:containers
143+
, hedgehog-extras:base
144+
, hedgehog-quickcheck:QuickCheck
145+
, http-api-data:text-iso8601
146+
, indexed-traversable:base
147+
, indexed-traversable:containers
148+
, indexed-traversable-instances:base
149+
, io-classes:base
150+
, io-sim:io-classes
151+
, lens-family:base
152+
, lens-family:containers
153+
, lens-family:lens-family-core
154+
, lens-family-core:containers
155+
, lsm-tree:base
156+
, lsm-tree:cborg
157+
, lsm-tree:containers
158+
, lsm-tree:io-classes
159+
, microstache:base
160+
, microstache:containers
161+
, network-mux:io-classes
162+
, nonempty-vector:base
163+
, ordered-containers:containers
164+
, ouroboros-consensus:cborg
165+
, ouroboros-consensus:fs-sim
166+
, ouroboros-consensus:io-classes
167+
, ouroboros-consensus:quickcheck-state-machine
168+
, ouroboros-network:io-classes
169+
, parsec:base
170+
, plutus-core:dependent-map
171+
, plutus-ledger-api:plutus-core
172+
, proto-lens:base
173+
, proto-lens:lens-family
174+
, proto-lens-arbitrary:base
175+
, proto-lens-discrimination:base
176+
, proto-lens-optparse:base
177+
, proto-lens-protobuf-types:base
178+
, proto-lens-protoc:base
179+
, proto-lens-protoc:ghc
180+
, proto-lens-runtime:base
181+
, proto-lens-setup:base
182+
, quickcheck-instances:QuickCheck
183+
, quickcheck-instances:array
184+
, quickcheck-instances:base
185+
, quickcheck-instances:containers
186+
, quickcheck-instances:uuid-types
187+
, quickcheck-state-machine:QuickCheck
188+
, ral:QuickCheck
189+
, ral:base
190+
, ral:fin
191+
, ral:indexed-traversable
192+
, safe-wild-cards:template-haskell
193+
, semialign:base
194+
, semialign:containers
195+
, serdoc-core:template-haskell
196+
, serialise:base
197+
, serialise:containers
198+
, serialise:time
199+
, text:array
200+
, text:base
201+
, text:template-haskell
202+
, text-iso8601:time
203+
, these:base
204+
, time-compat:time
205+
, trace-dispatcher:aeson
206+
, tree-diff:QuickCheck
207+
, tree-diff:base
208+
, tree-diff:containers
209+
, tree-diff:semialign
210+
, tree-diff:time
211+
, typed-protocols:io-classes
212+
, universe-base:base
213+
, universe-base:containers
214+
, unix:time
215+
, uuid-types:template-haskell
216+
, with-utf8:base
217+
90218
-- IMPORTANT
91219
-- Do NOT add more source-repository-package stanzas here unless they are strictly
92220
-- temporary! Please read the section in CONTRIBUTING about updating dependencies.

0 commit comments

Comments
 (0)