ci: add nix flake verification and build job#178
Merged
Merged
Conversation
Deploying vykar with
|
| Latest commit: |
438db70
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d5816fdb.vykar.pages.dev |
| Branch Preview URL: | https://ci-nix-build.vykar.pages.dev |
Verifies all pinned flake inputs (narHash check for every input, including the three skia-binaries tarballs), evaluates flake outputs for all systems, and builds the three packages on x86_64-linux. Paths-filtered so it only runs when the flake, nix definitions, or Cargo manifests change. Closes the gap where lock-file PRs like #171 had no machine verification.
skia-bindings' build script does not validate the archive supplied via SKIA_BINARIES_URL, so a stale flake pin silently builds against outdated skia binaries instead of failing the build.
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.
Adds a
nixworkflow that closes the verification gap seen in #171 / #170, where flake pin updates had no CI coverage and hashes had to be audited by hand.The job:
flake.nixmatches theskia-bindingsversion inCargo.lock. This is load-bearing: skia-bindings' build script does not validate the archive supplied viaSKIA_BINARIES_URL(upstream code has a literal// TODO: verify key), so a stale pin doesn't fail the build — it silently links the GUI against outdated skia binaries. A first run of this workflow on pre-fix(nix): support skia-bindings v0.99.0 #171 main built "successfully" against the 0.90.0 binaries while Cargo.lock declared 0.99.0, which is how this was discovered.nix flake archive— fetches every pinned input and verifies its narHash, including all three skia-binaries tarballs (inputs are not per-system, so this covers Linux and macOS pins in one cheap step). A tampered or stale hash fails here in minutes, with no compilation.nix flake check --all-systems --no-build— evaluates outputs for x86_64-linux, aarch64-linux, and aarch64-darwin, catching eval-level breakage on platforms we don't build.nix build .#vykar .#vykar-server .#vykar-gui— full build on x86_64-linux (~55 min uncached).Triggers are paths-filtered (
flake.nix,flake.lock,.nix/**,Cargo.toml,Cargo.lock, the workflow itself) so ordinary code PRs stay fast.Cargo.lockis included because a dependency bump is exactly what broke the flake in #170. Read-only token, no cache service dependencies — builds substitute from cache.nixos.org only.