ci(nix): add startup smoke test#136
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the Nix flake to verify and install the final neomacs.pdump image, extracting its fingerprint by executing the compiled binary. The review feedback correctly points out that executing the target binary directly during the build phase breaks cross-compilation, and suggests using an emulator prefix to resolve this issue.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| echo "missing final pdump image: $final_pdump" >&2 | ||
| exit 1 | ||
| fi | ||
| fingerprint="$($out/bin/neomacs --fingerprint | tr -d '[:space:]')" |
There was a problem hiding this comment.
Executing the target binary directly ($out/bin/neomacs) during the build phase breaks cross-compilation, as the build host cannot execute binaries compiled for a different target architecture (e.g., building aarch64-linux on x86_64-linux).
To support cross-compilation, we should prefix the execution with the appropriate emulator for the target platform using ${pkgs.stdenv.hostPlatform.emulator pkgs}.
fingerprint="$(${pkgs.stdenv.hostPlatform.emulator pkgs} $out/bin/neomacs --fingerprint | tr -d '[:space:]')"
There was a problem hiding this comment.
Thanks, fixed in the latest push. I used ${pkgs.stdenv.hostPlatform.emulator pkgs.buildPackages} when invoking the just-built $out/bin/neomacs --fingerprint, matching the nixpkgs cross-compilation pattern for executing host-platform binaries from a build.
|
Thank you! |
Summary
nix smokeGitHub Actions workflow usingcachix/install-nix-action@v31.#neomacs, assert both canonical and fingerprinted pdump files are present in the Nix result, then run a batch startup smoke testneomacs.pdumpimage into the Nix package output next to the wrapped binary so the Nix-built executable can startCloses #133
Validation
git diff --checkpython - <<'PY' ... yaml.safe_load('.github/workflows/nix-smoke.yml') ... PYgh act push -W .github/workflows/nix-smoke.yml -j nix-smoke -ngh actrun with--privileged; Nix installed and started the build, but the local container build was stopped after several minutes because it was rebuilding/downloading the full dependency graph. The dry-run validates the workflow wiring; the PR workflow should exercise the fullnix buildsmoke path on GitHub-hosted runners.