ci(github): publish releases

The Komorebi License lets anyone distribute the source code but not binaries, so
the flake has no public binary cache and the binaries of komorebi come only from
this repository. The `build` job builds `komorebi` and `komorebic` with nix on
every run, on ubuntu-24.04 and on ubuntu-24.04-arm, and keeps them as an
artifact for 14 days; the arm64 job is `continue-on-error`.

As nix builds them, the binaries load libc, libm and libgcc_s through the
dynamic loader of the store and an RPATH into it, which only a machine with the
same nixpkgs revision in its store has. The job points them at the system's
loader at its standard path and drops the RPATH, with patchelf from the nixpkgs
flake.lock pins, then runs `--version` on the Ubuntu runner to check that they
start. Built from the locked nixpkgs (d3b13ad), the newest glibc symbol version
they need is 2.39, the glibc of Ubuntu 24.04.

The `publish` job runs on a `v*` tag, and on a scheduled or manual run on
master, once lint, vm-fast and build have passed. It zips the two binaries of
each architecture as `komorebi-<version>-<target>.zip` (an architecture whose
build failed is left out with a warning), adds schema.json, the schema of
komorebi.json, when the repository has one (it does), and writes checksums.txt
with sha256sum. The release notes are kokai's, from the commit messages since
the previous version tag, as komorebi for Mac writes them; kokai is not in
nixpkgs, so cargo installs it, pinned at 0.3.1. A tag becomes a release. master
replaces the rolling `nightly` prerelease and its tag; the old nightly tag is
moved to the commit first, so that the notes list the commits since the last
version and not since the last nightly. There is no Homebrew, winget or second
repository.

The cache key of the composite action gets the runner's architecture: the arm64
runner has the same `runner.os` as the x86_64 one, and would restore and save
the other's store.

The steps were run as written on aarch64 and x86_64 machines: the builds, whose
binaries then started in Ubuntu 24.04 root filesystems of both architectures,
and a first nightly, a later nightly and a tag release against a fake gh. GitHub
Actions has not run them yet. CONTRIBUTING.md says how a release is made, the
README where binaries come from and what the license allows, and DESIGN.md why.
The pages that said there were no prebuilt binaries (README, installation.md and
the entry on the binary cache in DESIGN.md) now say that the releases are the
only ones.
This commit is contained in:
LGUG2Z committed 2026-10-28 07:39:49 -07:00
1 parent 70c2affa9d
commit 01179af18d
6 files changed
+190 -11

No files matched your search

+14 -1
View File
@@ -203,7 +203,9 @@ again.
## Why is there no binary cache?
The Komorebi license does not allow third parties to redistribute binaries. There is no public
binary cache for komorebi, and every installation builds it from source.
binary cache for komorebi, so the flake builds it from source on each machine that installs it.
The releases of this repository are the only binaries
([why](#why-are-binaries-published-only-by-this-repository)).
## Why do the VM tests run on machines built with the module?
@@ -829,3 +831,14 @@ builders: those boot a virtual machine as part of the build, so they need a buil
a Linux builder that is itself a virtual machine on the Mac, as `darwin.linux-builder` is, has no
nested KVM. `nixos-install` is a plain program, in a guest that runs at the speed of the Mac's own
virtualization.
## Why are binaries published only by this repository?
The Komorebi License allows anyone to distribute the source code, with changes, but not
binaries built from it. So the releases of this repository, which CI builds, are the only
binaries, and the flake has no public binary cache: nix builds komorebi from source.
The release binaries are built by nix like every other output of the flake, then pointed at
the system's dynamic loader with no library path. As nix builds it, a binary loads glibc from
the store paths of the nixpkgs revision it was built with, which a machine without that
revision in its store does not have.