Skip to content

CI: build nixos manual also on PRs targeting secondary branches#509875

Open
m1-s wants to merge 1 commit intoNixOS:masterfrom
m1-s:buildManualOnStaging
Open

CI: build nixos manual also on PRs targeting secondary branches#509875
m1-s wants to merge 1 commit intoNixOS:masterfrom
m1-s:buildManualOnStaging

Conversation

@m1-s
Copy link
Copy Markdown
Contributor

@m1-s m1-s commented Apr 14, 2026

In #491742 we discovered that the nixos manual is not built on PRs targeting staging-nixos branch. This is because the nixos manual is only built on PRs that target primary branches and staging-nixos is a secondary branch. The nixpkgs manual in contrast is being built on secondary branches so it seems that this is an inconsistency. This PR fixes this by adjusting the nixos manual build conditions to match the ones from the nixpkgs manual.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@m1-s m1-s mentioned this pull request Apr 14, 2026
13 tasks
@nixpkgs-ci nixpkgs-ci bot requested a review from a team April 14, 2026 09:54
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion Discuss policies to work in and around Nixpkgs backport release-25.11 Backport PR automatically labels Apr 14, 2026
@m1-s m1-s changed the title CI: build nixos manual on PRs targeting staging-nixos CI: build nixos manual also on PRs targetting secondary branches Apr 14, 2026
@m1-s m1-s changed the title CI: build nixos manual also on PRs targetting secondary branches CI: build nixos manual also on PRs targeting secondary branches Apr 14, 2026
if: |
contains(matrix.builds, 'manual-nixos') && !cancelled() &&
contains(fromJSON(inputs.baseBranch).type, 'primary')
if: contains(matrix.builds, 'manual-nixos') && !cancelled()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @NixOS/nixpkgs-ci

Doesn't that mean we try to schedule manual builds for staging which will timeout anyways after consuming a whole lot of resources?

Perhaps we should explicitly allow staging-nixos here as well?
(Mostly a question to the CI team, not a proposal since I'm not sure I understand it correctly)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It certainly seems an overkill to build the manual when targeting staging or staging-25.11.

Copy link
Copy Markdown
Contributor

@MattSturgeon MattSturgeon Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going of memory here, so I could be wrong. But I believe the manual is built using packages from the ci-pinned nixpkgs. Only the markdown sources come from the PR branch.

Copy link
Copy Markdown
Contributor Author

@m1-s m1-s Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think thats true for the nixpkgs manual but not for the nixos manual.

manual-nixos = (import ../nixos/release.nix { }).manual.${system} or null;
manual-nixpkgs = (import ../doc { inherit pkgs; });

In the nixos/release.nix nixpkgs is declared as:

  nixpkgs ? {
    outPath = cleanSource ./..;
    revCount = 708350;
    shortRev = "gfedcba";
  },

So I assume the nixos manual uses the current state that is in the PR. Is rebuilding the nixos manual feasible in PRs to staging-nixos or does it cost too much resources? Do we only want to allow staging-nixos or all secondary branches?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion Discuss policies to work in and around Nixpkgs 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. backport release-25.11 Backport PR automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants