Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 23 additions & 17 deletions .github/workflows/github-page.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: "Haddock documentation"

on:
workflow_dispatch:
pull_request: # TODO: remove
push:
branches:
- master
Expand All @@ -14,48 +16,52 @@ jobs:
shell: bash

steps:
- name: Install Nix
uses: cachix/install-nix-action@v18
- uses: actions/checkout@v6

- uses: cachix/install-nix-action@v31
with:
# Use last stable nixos channel and the same nix as in channel:
nix_path: nixpkgs=channel:nixos-24.05
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: |
accept-flake-config = true
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
experimental-features = nix-command flakes
allow-import-from-derivation = true
substituters = https://cache.nixos.org https://cache.iog.io
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=

- uses: actions/checkout@v4
# GHC 9.14 avoids the tyConStupidTheta panic in GHC 9.6 haddock
- uses: rrbutani/use-nix-shell-action@v1
with:
devShell: .#ghc914

- name: Fetch nix cache and update cabal indices
- name: Update cabal indices
run: |
nix develop --command \
cabal update
cabal update

- name: Build whole project
run: |
nix develop --command \
cabal build all
cabal build all

- name: Build documentation
run: |
nix develop --command \
cabal haddock-project --local --output=./haddocks --internal --foreign-libraries
cabal haddock-project --local --output=./haddocks --internal --foreign-libraries

- name: Compress haddocks
run: |
tar -czf haddocks.tgz -C haddocks .

- name: Upload haddocks artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
if: ${{ always() }}
continue-on-error: true
with:
name: haddocks
path: ./haddocks.tgz

- name: Upload cabal logs
uses: actions/upload-artifact@v7
if: failure()
continue-on-error: true
with:
name: cabal-haddock-logs
path: ~/.cache/cabal/logs/

- name: Deploy documentation to gh-pages 🚀
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v4
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,5 @@ cardano-tracer/cardano-tracer-test
.idea/

.codex

.serena
128 changes: 128 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,134 @@ allow-newer:
, io-sim:time
, io-classes:time

if impl(ghc >= 9.12)
allow-newer:
-- we need newer io-classes: https://github.com/input-output-hk/typed-protocols/tree/coot/io-classes-1.9
, io-classes:time
, ouroboros-network:time
, nothunks:time
, network-mux:time

-- cabal-allow-newer
if impl(ghc >= 9.14)
allow-newer:
, aeson:QuickCheck
, aeson:containers
, aeson:template-haskell
, aeson:time
, bin:QuickCheck
, bin:base
, binary:containers
, binary-orphans:base
, blockio:base
, blockio:io-classes
, boring:base
, bytestring-trie:base
, canonical-json:containers
, cardano-addresses:containers
, cardano-addresses:template-haskell
, cardano-diffusion:io-classes
, cardano-prelude:canonical-json
, cborg:base
, cborg:containers
, cborg-json:base
, compact:base
, config-ini:containers
, constraints:boring
, constraints-extras:template-haskell
, criterion:microstache
, data-elevator:base
, dec:base
, dependent-map:containers
, dictionary-sharing:containers
, diff-containers:base
, discrimination:ghc-bignum
, discrimination-ieee754:base
, fin:QuickCheck
, fin:base
, fin:universe-base
, fs-sim:QuickCheck
, ghc:binary
, ghc:time
, grapesy:base
, grapesy:containers
, grpc-spec:base
, grpc-spec:containers
, hedgehog-extras:base
, hedgehog-quickcheck:QuickCheck
, http-api-data:text-iso8601
, indexed-traversable:base
, indexed-traversable:containers
, indexed-traversable-instances:base
, io-classes:base
, io-sim:io-classes
, lens-family:base
, lens-family:containers
, lens-family:lens-family-core
, lens-family-core:containers
, lsm-tree:base
, lsm-tree:cborg
, lsm-tree:containers
, lsm-tree:io-classes
, microstache:base
, microstache:containers
, network-mux:io-classes
, nonempty-vector:base
, ordered-containers:containers
, ouroboros-consensus:cborg
, ouroboros-consensus:fs-sim
, ouroboros-consensus:io-classes
, ouroboros-consensus:quickcheck-state-machine
, ouroboros-network:io-classes
, parsec:base
, plutus-core:dependent-map
, plutus-ledger-api:plutus-core
, proto-lens:base
, proto-lens:lens-family
, proto-lens-arbitrary:base
, proto-lens-discrimination:base
, proto-lens-optparse:base
, proto-lens-protobuf-types:base
, proto-lens-protoc:base
, proto-lens-protoc:ghc
, proto-lens-runtime:base
, proto-lens-setup:base
, quickcheck-instances:QuickCheck
, quickcheck-instances:array
, quickcheck-instances:base
, quickcheck-instances:containers
, quickcheck-instances:uuid-types
, quickcheck-state-machine:QuickCheck
, ral:QuickCheck
, ral:base
, ral:fin
, ral:indexed-traversable
, safe-wild-cards:template-haskell
, semialign:base
, semialign:containers
, serdoc-core:template-haskell
, serialise:base
, serialise:containers
, serialise:time
, text:array
, text:base
, text:template-haskell
, text-iso8601:time
, these:base
, time-compat:time
, trace-dispatcher:aeson
, tree-diff:QuickCheck
, tree-diff:base
, tree-diff:containers
, tree-diff:semialign
, tree-diff:time
, typed-protocols:io-classes
, universe-base:base
, universe-base:containers
, unix:time
, uuid-types:template-haskell
, with-utf8:base

-- IMPORTANT
-- Do NOT add more source-repository-package stanzas here unless they are strictly
-- temporary! Please read the section in CONTRIBUTING about updating dependencies.
Expand Down
Loading
Loading