ci: add Nix build workflow to catch flake breakage on PR#3264
Merged
Conversation
Catches NixOS build breakage on flake.nix or workspace changes before they reach main. Past incidents (#2937, #2974, #3052, #3156, #3197, #3263) all slipped through because regular CI doesn't exercise the Nix path. Triggers only on flake.nix / flake.lock / Cargo.lock / per-crate Cargo.toml changes so Rust-only PRs aren't slowed down. Matrix builds both packages in parallel with fail-fast disabled so each break is visible independently.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Apr 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a dedicated CI workflow that runs
nix build .#librefang-cliandnix build .#librefang-desktopso flake breakage is caught on PR review instead of after merge.Why
The Nix build path has broken at least six times — #2937, #2974, #3052, #3156, #3197, #3263 — and every one shipped to
mainbecause no CI job exercisesflake.nix. NixOS users have to wait for a follow-up fix PR each time.Design
flake.nix,flake.lock, rootCargo.lock, rootCargo.toml, any per-crateCargo.toml, or the workflow file itself. Rust-only PRs don't pay the cost.librefang-cliandlibrefang-desktopin parallel withfail-fast: false— historically both paths have broken independently (CLI in LibreFang is failing to build on NixOS #2937, desktop tray icon in Librefang-desktop creates empty window (AppImage and NixOS) #3052/fix(desktop): wrap with wrapGAppsHook3 so tray icon resolves on NixOS #3197).nix-community/cache-nix-action@v7keyed onflake.lock+Cargo.lock; cold build ~30–40 min, warm hit much faster.actions/checkout@v6,cachix/install-nix-action@v31,nix-community/cache-nix-action@v7— all current major versions as of opening this PR.Not making this a required check yet — let it bake on a few PRs first to confirm the cache behaviour and runtime are sane.
Test plan