nixpkgs/ci
Wolfgang Walther 3df31aa255
ci/github-script/teams: use consistent style
These are style-only changes, that are not enforced via tooling - but
used mostly consistently in the other github-script files.
2025-10-28 11:56:25 +01:00
..
codeowners-validator ci/codeowners-validator: fix typo in comment 2025-06-02 16:06:16 +02:00
eval Revert "First-class GitHub team reviews" 2025-10-28 07:38:20 +00:00
github-script ci/github-script/teams: use consistent style 2025-10-28 11:56:25 +01:00
request-reviews Revert "First-class GitHub team reviews" 2025-10-28 07:38:20 +00:00
default.nix ci: add zizmor check and configuration 2025-10-26 22:03:12 +01:00
nixpkgs-vet.nix ci/nixpkgs-vet: try to fix race 2025-10-18 14:12:05 +02:00
nixpkgs-vet.sh ci/nixpkgs-vet.sh: fix passing arguments 2025-06-12 20:30:36 +02:00
OWNERS lib.teams: Populate fields from synced GitHub state 2025-10-27 19:36:57 +01:00
parse.nix ci/parse: fix potential race condition 2025-10-18 19:37:49 +02:00
pinned.json ci/pinned: update 2025-10-24 10:40:42 +02:00
README.md ci/README: add github-script policy 2025-10-22 12:59:20 +02:00
supportedBranches.js linux: new workflow for kernel changes 2025-10-05 22:59:25 +02:00
supportedSystems.json
supportedVersions.nix workflows/eval: test all available versions 2025-08-12 10:14:01 +02:00
update-pinned.sh

CI support files

This directory contains files to support CI, such as GitHub Actions and Ofborg. This is in contrast with maintainers/scripts which is for human use instead.

Pinned Nixpkgs

CI may need certain packages from Nixpkgs. In order to ensure that the needed packages are generally available without building, pinned.json contains a pinned Nixpkgs version tested by Hydra.

Run update-pinned.sh to update it.

GitHub specific code

Some of the code is specific to GitHub. This code is currently spread out over multiple places and written in both Bash and JavaScript. The goal is to eventually have all GitHub specific code in ci/github-script and written in JavaScript via actions/github-script. A lot of code has already been migrated, but some Bash code still remains. New CI features need to be introduced in JavaScript, not Bash.

ci/nixpkgs-vet.sh BASE_BRANCH [REPOSITORY]

Runs the nixpkgs-vet tool on the HEAD commit, closely matching what CI does. This 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. In 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.

Arguments:

  • BASE_BRANCH: The base branch to use, e.g. master or release-24.05
  • REPOSITORY: The repository from which to fetch the base branch. Defaults to https://github.com/NixOS/nixpkgs.git.

Branch classification

For the purposes of CI, branches in the NixOS/nixpkgs repository are classified as follows:

  • Channel branches
    • nixos- or nixpkgs- prefix
    • Are only updated from master or release- branches, when hydra passes.
    • Otherwise not worked on, Pull Requests are not allowed.
    • Long-lived, no deletion, no force push.
  • Primary development branches
    • release- prefix and master
    • Pull Requests required.
    • Long-lived, no deletion, no force push.
  • Secondary development branches
    • staging- prefix and haskell-updates
    • Pull Requests normally required, except when merging development branches into each other.
    • Long-lived, no deletion, no force push.
  • Work-In-Progress branches
    • backport-, revert- and wip- prefixes.
    • Deprecated: All other branches, not matched by channel/development.
    • Pull Requests are optional.
    • Short-lived, force push allowed, deleted after merge.

Some branches also have a version component, which is either unstable or YY.MM.

ci/supportedBranches.js is a script imported by CI to classify the base and head branches of a Pull Request. This classification will then be used to skip certain jobs. This script can also be run locally to print basic test cases.