1# CI support files 2 3This directory contains files to support CI, such as [GitHub Actions](https://github.com/NixOS/nixpkgs/tree/master/.github/workflows) and [Ofborg](https://github.com/nixos/ofborg). 4This is in contrast with [`maintainers/scripts`](../maintainers/scripts) which is for human use instead. 5 6## Pinned Nixpkgs 7 8CI may need certain packages from Nixpkgs. 9In order to ensure that the needed packages are generally available without building, [`pinned.json`](./pinned.json) contains a pinned Nixpkgs version tested by Hydra. 10 11Run [`update-pinned.sh`](./update-pinned.sh) to update it. 12 13## `ci/nixpkgs-vet.sh BASE_BRANCH [REPOSITORY]` 14 15Runs the [`nixpkgs-vet` tool](https://github.com/NixOS/nixpkgs-vet) on the HEAD commit, closely matching what CI does. 16This can't do exactly the same as CI, because CI needs to rely on GitHub's server-side Git history to compute the mergeability of PRs before the check can be started. 17In turn, when contributors are running this tool locally, we don't want to have to push commits to test them, and we can also rely on the local Git history to do the mergeability check. 18 19Arguments: 20 21- `BASE_BRANCH`: The base branch to use, e.g. master or release-24.05 22- `REPOSITORY`: The repository from which to fetch the base branch. 23 Defaults to <https://github.com/NixOS/nixpkgs.git>. 24 25# Branch classification 26 27For the purposes of CI, branches in the NixOS/nixpkgs repository are classified as follows: 28 29- **Channel** branches 30 - `nixos-` or `nixpkgs-` prefix 31 - Are only updated from `master` or `release-` branches, when hydra passes. 32 - Otherwise not worked on, Pull Requests are not allowed. 33 - Long-lived, no deletion, no force push. 34- **Primary development** branches 35 - `release-` prefix and `master` 36 - Pull Requests required. 37 - Long-lived, no deletion, no force push. 38- **Secondary development** branches 39 - `staging-` prefix and `haskell-updates` 40 - Pull Requests normally required, except when merging development branches into each other. 41 - Long-lived, no deletion, no force push. 42- **Work-In-Progress** branches 43 - `backport-`, `revert-` and `wip-` prefixes. 44 - Deprecated: All other branches, not matched by channel/development. 45 - Pull Requests are optional. 46 - Short-lived, force push allowed, deleted after merge. 47 48Some branches also have a version component, which is either `unstable` or `YY.MM`. 49 50`ci/supportedBranches.js` is a script imported by CI to classify the base and head branches of a Pull Request. 51This classification will then be used to skip certain jobs. 52This script can also be run locally to print basic test cases.