You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(release): single nix-backed build per target (#18)
* feat(release): single nix-backed build per target
Follow-up to #17: every target now builds once. The build-twice
bit-identical gate is replaced by nix for the linux legs - hermetic builds
from the committed flake.lock, reproducible locally by anyone with
nix build, a stronger guarantee than re-running the build in CI ever was.
Mac and windows legs keep the pinned rustup toolchain, single build.
Linux archives bundle the dynamic loader + libraries behind an abgen entry
script, so they run on any distro (glibc, musl, nixos) with zero host
requirements - the old glibc>=2.35 floor is gone. Layout is unchanged for
consumers: ./abgen is still the entry point next to template/ and shader/.
Flake: version and ABGEN_GIT_COMMIT now come from crate/Cargo.toml and
self.rev instead of being hardcoded; flake.lock bumped (rustc 1.96.1).
PROVENANCE.md and the DEVELOPMENT.md runbook updated to match.
* feat(release): magic nix cache on the linux legs
DetSys nix-installer + magic-nix-cache (sha-pinned) replace the official
installer script: store paths land in the repo's Actions cache, so re-runs
and warm branches skip the toolchain closure and vendored-deps fetch.
* refactor(flake): drop flake-utils for plain genAttrs
Same outputs for the same four systems, one fewer external input.
* feat(release): warm cargo caches on the mac legs
actions/cache (first-party, sha-pinned) on registry+git+target for the two
darwin legs, keyed by target, toolchain, and Cargo.lock. The windows legs
stay uncached to keep the repo inside the 10GB Actions-cache LRU budget.
* feat(release): drop magic nix cache, keep the mac cargo caches
Measured across three dispatch runs: the nix legs were flat with and
without it (777s/771s vs 778s cold - the whole build is one derivation, so
a store cache replays nothing), while its ~9GB of nar entries filled the
repo's 10GB Actions-cache budget and would evict the two 450MB mac cargo
caches that actually cut those legs 2-4x (285s/150s warm vs 1030s/272s
cold). DetSys nix-installer stays.
* feat(flake): crane dep-split so releases recompile only the abgen crate
Dependency crates now build in their own derivation keyed on the
manifests/lockfile (verified drv-stable across source edits), which is
what makes the magic nix cache pay: warm linux legs replay the deps
derivation and compile just the abgen crate (132s local vs 13min full).
crane is pinned to the v0.23.4 release tag + narHash; audited 2026-07-22:
pure-nix lib (~3k lines, no binaries), network access only through
fixed-output fetches pinned by our own Cargo.lock checksums. Magic nix
cache returns to the linux legs alongside it.
* feat(release): extend the cargo cache to the windows legs
With linux and mac warm, the uncached windows cross-builds become the
critical path (~450s). Same target-scoped cache; fits the budget now that
the useless store-nar entries are gone.
* fix(release): carry the crane deps closure via actions/cache + nix copy
magic-nix-cache never substituted in practice (nix marked its local daemon
'disabled' after failed fetches; warm linux legs stayed at cold timings).
Replace it with the primitive already proven on the rustup legs: a
first-party actions/cache entry holding a nix file store of the deps
closure, keyed on the manifests and pins, imported/exported with nix copy.
* style: drop comments from the release workflow and flake
* chore(release): latest pins across the board
rust 1.97.1, actions/cache v6.1.0, llvm-mingw 20260721, ubuntu-24.04 +
macos-15 runners (runner glibc no longer reaches any artifact: linux ships
the nix closure, windows is mingw-static). nix-deps cache key gains
rust-toolchain.toml so toolchain bumps rotate it.
* fix(release): restore the nix-deps cache after checkout
hashFiles evaluates against the workspace when the step runs; before the
checkout it matched nothing and produced a degenerate constant key.
* chore: release 0.11.3
Reproducible builds: the linux and macOS binaries were each built from a clean tree in two independent CI jobs (separate runners) and required bit-identical before publishing; the windows binary is built once (mingw's linker has a residual link-order non-determinism). Toolchain: rust 1.97.0 (pinned), `--locked` against the committed Cargo.lock, `SOURCE_DATE_EPOCH` from the tagged commit. Each archive is self-contained: the `abgen` server binary plus the `template/` and `shader/` assets it needs, resolved from the binary's own directory (`ABGEN_ROOT`/`ABGEN_SHADER_BUNDLE` override). Runtime requirements - Linux (x64 and arm64): glibc >= 2.35 and libstdc++6/libgcc_s (present on any mainstream distro). Windows x64: none, the mingw runtime DLLs ship in the archive next to the exe. Windows arm64: none, a single static exe (llvm-mingw/libc++). macOS (Apple Silicon and Intel): system libraries only. Optional everywhere: libturbojpeg (bit-parity JPEG decode with the upstream ab-cdn pipeline; without it JPEG textures decode through a pure-Rust fallback - valid output, not guaranteed byte-identical to upstream bundles). The same binaries publish to npm as `@dcl/abgen` (per-platform packages as optionalDependencies; `npx @dcl/abgen` runs the server).
1
+
Single-build releases with pinned provenance. Linux (x64 and arm64): built by Nix from the committed flake.lock — hermetic, locally reproducible with `nix build`; the archive bundles the dynamic loader and libraries behind the `abgen` entry script, so it runs on any Linux (glibc, musl, NixOS) with no host requirements. Windows and macOS: rust 1.97.0 (pinned), `--locked` against the committed Cargo.lock, `SOURCE_DATE_EPOCH` from the tagged commit; windows-x64 ships the mingw runtime DLLs next to the exe, windows-arm64 is a single static exe (llvm-mingw/libc++), macOS needs system libraries only. Each archive is self-contained: the `abgen` server entry point plus the `template/` and `shader/` assets it needs, resolved from its own directory (`ABGEN_ROOT`/`ABGEN_SHADER_BUNDLE` override). Optional everywhere: libturbojpeg (bit-parity JPEG decode with the upstream ab-cdn pipeline; without it JPEG textures decode through a pure-Rust fallback - valid output, not guaranteed byte-identical to upstream bundles). The same binaries publish to npm as `@dcl/abgen` (per-platform packages as optionalDependencies; `npx @dcl/abgen` runs the server).
0 commit comments