Skip to content

ci(nix): add startup smoke test#136

Merged
eval-exec merged 1 commit into
eval-exec:mainfrom
xz-dev:xz/nix-smoke-133
Jun 25, 2026
Merged

ci(nix): add startup smoke test#136
eval-exec merged 1 commit into
eval-exec:mainfrom
xz-dev:xz/nix-smoke-133

Conversation

@xz-dev

@xz-dev xz-dev commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a nix smoke GitHub Actions workflow using cachix/install-nix-action@v31
  • build .#neomacs, assert both canonical and fingerprinted pdump files are present in the Nix result, then run a batch startup smoke test
  • install the final neomacs.pdump image into the Nix package output next to the wrapped binary so the Nix-built executable can start

Closes #133

Validation

  • git diff --check
  • python - <<'PY' ... yaml.safe_load('.github/workflows/nix-smoke.yml') ... PY
  • gh act push -W .github/workflows/nix-smoke.yml -j nix-smoke -n
  • Tried a real local gh act run 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 full nix build smoke path on GitHub-hosted runners.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread flake.nix
echo "missing final pdump image: $final_pdump" >&2
exit 1
fi
fingerprint="$($out/bin/neomacs --fingerprint | tr -d '[:space:]')"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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:]')"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@eval-exec

Copy link
Copy Markdown
Owner

Thank you!

@eval-exec eval-exec merged commit 288deb5 into eval-exec:main Jun 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Panic in NixOS

2 participants