depot/third_party/nixpkgs/pkgs/test/check-by-name
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00
..
pinned-version.txt Project import generated by Copybara. 2024-04-21 17:54:59 +02:00
README.md Project import generated by Copybara. 2024-06-05 17:53:02 +02:00
run-local.sh Project import generated by Copybara. 2024-04-21 17:54:59 +02:00
update-pinned-tool.sh Project import generated by Copybara. 2024-04-21 17:54:59 +02:00

pkgs/by-name check CI scripts

This directory contains scripts and files used and related to the CI running the pkgs/by-name checks in Nixpkgs. See also the CI GitHub Action.

./run-local.sh BASE_BRANCH [REPOSITORY]

Runs the pkgs/by-name check on the HEAD commit, closely matching what CI does.

Note that 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 running 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:

./update-pinned-tool.sh

Updates the pinned nixpkgs-check-by-name tool in ./pinned-version.txt to the latest release. Each release contains a pre-built x86_64-linux version of the tool which is used by CI.

This script currently needs to be called manually when the CI tooling needs to be updated.

Why not just build the tooling right from the PRs Nixpkgs version?

  • Because it allows CI to check all PRs, even if they would break the CI tooling.
  • Because it makes the CI check very fast, since no Nix builds need to be done, even for mass rebuilds.
  • Because it improves security, since we don't have to build potentially untrusted code from PRs. The tool only needs a very minimal Nix evaluation at runtime, which can work with readonly-mode and restrict-eval.