|
| 1 | +Cabal maintainer documentation |
| 2 | +--- |
| 3 | + |
| 4 | +This document outlines some of the things that cabal maintainers should know. Contributors shouldn't need anything in here, unless they're working on the CI system. (If you find that you do, please open an issue pointing out what needs to be moved to the contributor documentation.) |
| 5 | + |
| 6 | +This is a first draft; many things are as yet missing. Open an issue if you need something added here. |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +Workflows |
| 11 | +--- |
| 12 | + |
| 13 | +The standard workflows are: |
| 14 | + |
| 15 | +- `bootstrap.yml`: bootstrap a cabal from prepared JSONs (see `make bootstrap-jsons`) |
| 16 | +- `validate.yml`: build a cabal with extra assertions and run the full test suite on it |
| 17 | +- `changelogs.yml`: validate `changelog.d` files using [`changelog-d`] |
| 18 | +- `dependabot.yml`: check `dependabot` configuration (sadly, not automatic; we lifted this from Ubuntu's CI) |
| 19 | +- `lint.yml`: run `hlint` on cabal sources |
| 20 | +- `format.yml`: check source formatting using Fourmolu v0.12 |
| 21 | +- `quick-jobs.yml`: various (formerly) quick checks |
| 22 | +- `typos.yml`: look for typos in documentation |
| 23 | +- `users-guide.yml`: generate the users guide, creating an artifact |
| 24 | +- `whitespace.yml`: check for extraneous whitespace in various files |
| 25 | +- `check-sdist.yml`: make sure cabal can be built against the `Cabal` bootlib (see e.g. #10931, #9863) |
| 26 | +- `release.yml`: build release binaries, either as part of a release or for testing |
| 27 | + |
| 28 | +The validate workflow performs a number of tests on tier-1 platforms: |
| 29 | + |
| 30 | +- on current GHCs (see `GHC_FOR_VALIDATE` and `GHC_FOR_VALIDATE_ONLY` in `config.yml`) it runs through the full suite of tests (`lib-tests`, `lib-suite`, `cli-tests`, and `cli-suite`) |
| 31 | +- on older GHCs (see `GHC_FOR_VALIDATE_OLD`) it only runs `lib-suite-extras`, which is a cut-down test suite ("extras" refers to the fact that `validate.yml` historically referred to the old GHCs as `extra-ghc`) |
| 32 | +- it builds but doesn't validate (for some reason) a static `cabal` on Alpine with MUSL |
| 33 | +- it dogfoods `cabal` by having it build itself |
| 34 | + |
| 35 | +You can use a manual dispatch on the validate workflow. It has two optional parameters: |
| 36 | +- `allow-newer line` will add an `allow-newer:` entry to the project file. Don't include the prefix. |
| 37 | +- `constraints line` will similarly add a `comnstraints:` entry. |
| 38 | + |
| 39 | +The bootstrap workflow verifies that cabal can be built from pregenerated JSONs, for use in bootstrapping cabal on a new platform (since cabal is self-hosted). Note that, while we test this on release branches currently, bootstrapping is only supported from `master`. |
| 40 | + |
| 41 | +--- |
| 42 | + |
| 43 | +Support tiers |
| 44 | +--- |
| 45 | + |
| 46 | +Currently we support the following platforms as Tier 1: |
| 47 | + |
| 48 | +- MacOS on AArch64 |
| 49 | +- X86-64 (aka AMD64) |
| 50 | +- Windows (10 and 11) |
| 51 | + |
| 52 | +Tier 2 platforms are: |
| 53 | + |
| 54 | +- FreeBSD (AMD64 only) |
| 55 | +- Alpine/MUSL static build |
| 56 | +- MacOS on Intel |
| 57 | +- X86 (deprecated) |
| 58 | + |
| 59 | +We do not currently test on tier 2 platforms, but support for that is coming. |
| 60 | + |
| 61 | +--- |
| 62 | + |
| 63 | +CI |
| 64 | +--- |
| 65 | + |
| 66 | +Mergify requires 2 approvals and a 2-day cooldown period before merging on `master`. Release branches are different, because we don't normally commit directly to them except during a release. |
| 67 | + |
| 68 | +The rules for PRs on release branches are: |
| 69 | + |
| 70 | +- only 1 approval needed for backports via Mergify (`@mergifyio backport branch`), otherwise 2 as usual |
| 71 | +- no cooldown period, since either it's a backport of a PR that already received scrutiny or we're in the middle of a release and need things to move along |
| 72 | + |
| 73 | +Note that you should not make (or approve) a PR directly to a release branch, unless it's necessary for release (usually this would be changelogs, but occasionally is needed for manual backports with conflicts). |
| 74 | + |
| 75 | +--- |
| 76 | + |
| 77 | +GPG keys |
| 78 | +--- |
| 79 | + |
| 80 | +All maintainers who are authorized to make release binaries should have GPG keys cross-signed with other maintainers' keys. @f-a and @geekosaur can help with this if a new maintainer is onboarded. |
0 commit comments