ci(release): build linux, macos and windows binaries #1

Merged
marti merged 5 commits from feature/release-binaries into develop 2026-11-16 15:20:26 +01:00
Owner

Summary

A v* tag now also builds binary archives for Linux, macOS and Windows on the Linux nix runner and attaches them to the Forgejo release.

 release.yml (on v* tag)
   check tag against Cargo.toml
   nix build .#quartz
+  nix develop .#release -c scripts/release-build.sh   -> dist/
   extract release notes
-  create release (exit if it exists)
+  create release if missing, read its id
+  attach each dist/ file the release does not have yet
Target Linker Archive
x86_64-unknown-linux-musl zig .tar.gz, static
aarch64-unknown-linux-musl zig .tar.gz, static
x86_64-apple-darwin zig .tar.gz, ad-hoc signed (rcodesign)
aarch64-apple-darwin zig .tar.gz, ad-hoc signed (rcodesign)
x86_64-pc-windows-gnu nixpkgs MinGW gcc .zip

Each archive holds the binary, README, LICENSE, CHANGELOG, completions and (not on Windows) man pages, plus a SHA256SUMS.

Also:

  • flake.nix: new release dev shell. A new rust-overlay input supplies a toolchain with the standard library for each target. The flake.lock change only adds that input.
  • src/util.rs: on Windows, which tries PATHEXT (claude.exe, codex.cmd), has_display is true, and the browser opens via rundll32 url.dll,FileProtocolHandler.
  • ci.yml: new step cargo check --all-targets --target x86_64-pc-windows-gnu, with warnings denied. It caught an unused import in tests/common, which is fixed.

Evidence

  • Before: cargo zigbuild --target x86_64-pc-windows-gnu fails to link: unable to find dynamic system library "synchronization". Zig's MinGW lacks it, so Windows links with MinGW gcc instead.
    After: nix develop .#release -c scripts/release-build.sh produces all 5 archives and SHA256SUMS. Run checks:
    • x86_64 musl: quartz --version prints quartz 0.1.0.
    • aarch64 musl under qemu-aarch64: quartz 0.1.0.
    • Windows exe under wine: quartz 0.1.0.
    • macOS arm64 links only /usr/lib/libSystem, libiconv and libcharset. It was not run on a real Mac.
  • cargo fmt --check, cargo clippy --all-targets -D warnings, cargo test and nix flake check all pass.

Merge Danger

Door: two-way

Only workflows, a dev shell and small Windows-only code paths change. Revert to undo.

Blast Radius: releases

The asset upload has not run against Forgejo yet. It uses the same token that already creates releases. If it fails on the next tag, the release still exists and a re-run attaches only the missing files. CI gets slower on the first run while the runner fetches the rust-overlay toolchain and MinGW gcc.

🤖 Generated with Claude Code

## Summary A `v*` tag now also builds binary archives for Linux, macOS and Windows on the Linux `nix` runner and attaches them to the Forgejo release. ```diff release.yml (on v* tag) check tag against Cargo.toml nix build .#quartz + nix develop .#release -c scripts/release-build.sh -> dist/ extract release notes - create release (exit if it exists) + create release if missing, read its id + attach each dist/ file the release does not have yet ``` | Target | Linker | Archive | | --- | --- | --- | | `x86_64-unknown-linux-musl` | zig | `.tar.gz`, static | | `aarch64-unknown-linux-musl` | zig | `.tar.gz`, static | | `x86_64-apple-darwin` | zig | `.tar.gz`, ad-hoc signed (rcodesign) | | `aarch64-apple-darwin` | zig | `.tar.gz`, ad-hoc signed (rcodesign) | | `x86_64-pc-windows-gnu` | nixpkgs MinGW gcc | `.zip` | Each archive holds the binary, README, LICENSE, CHANGELOG, completions and (not on Windows) man pages, plus a `SHA256SUMS`. Also: - `flake.nix`: new `release` dev shell. A new `rust-overlay` input supplies a toolchain with the standard library for each target. The flake.lock change only adds that input. - `src/util.rs`: on Windows, `which` tries PATHEXT (`claude.exe`, `codex.cmd`), `has_display` is true, and the browser opens via `rundll32 url.dll,FileProtocolHandler`. - `ci.yml`: new step `cargo check --all-targets --target x86_64-pc-windows-gnu`, with warnings denied. It caught an unused import in `tests/common`, which is fixed. ## Evidence - **Before:** `cargo zigbuild --target x86_64-pc-windows-gnu` fails to link: `unable to find dynamic system library "synchronization"`. Zig's MinGW lacks it, so Windows links with MinGW gcc instead. **After:** `nix develop .#release -c scripts/release-build.sh` produces all 5 archives and `SHA256SUMS`. Run checks: - x86_64 musl: `quartz --version` prints `quartz 0.1.0`. - aarch64 musl under `qemu-aarch64`: `quartz 0.1.0`. - Windows exe under wine: `quartz 0.1.0`. - macOS arm64 links only `/usr/lib/libSystem`, `libiconv` and `libcharset`. It was not run on a real Mac. - `cargo fmt --check`, `cargo clippy --all-targets -D warnings`, `cargo test` and `nix flake check` all pass. ## Merge Danger **Door:** two-way Only workflows, a dev shell and small Windows-only code paths change. Revert to undo. **Blast Radius:** releases The asset upload has not run against Forgejo yet. It uses the same token that already creates releases. If it fails on the next tag, the release still exists and a re-run attaches only the missing files. CI gets slower on the first run while the runner fetches the rust-overlay toolchain and MinGW gcc. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs: document the prebuilt binaries and how they are built
All checks were successful
ci / check (push) Successful in 9m35s
ci / check (pull_request) Successful in 4m29s
8842b52686
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
marti merged commit fe9021fc8b into develop 2026-11-16 15:20:26 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
quartz/cli!1
No description provided.