feat: the builder: layout JSON in, firmware and its source out #1

Merged
jwarykowski merged 3 commits from feat/builder into main 2026-10-31 13:58:34 +00:00
Owner

The builder: a Studio layout as JSON in, firmware and a zip of its source out.

  • build: writes the layout's keymap folder into a QMK checkout, compiles it with qmk compile (3 minute limit, one build at a time), and hands back the firmware with a source zip (layout, keymap folder, BUILDING.md with the exact commits) for the GPL. Layouts with ZSA's modules build on ZSA's fork, both Moonlander revisions unless one is asked for. Nothing is left in the checkout.
  • build.Handler: POST /build and GET /health for keybars.app's Worker. 422 with the reason for a layout that can't be built, 422 with the end of QMK's output for a failed compile, 503 while a build runs; unknown fields are refused.
  • cmd/builder: builder serve in the container, builder build layout.json here.
  • qmk.Fetcher.Dir reads qmk generate-api's output from disk, so builds need no network.

Tests stand the test binary in for qmk. Real builds of an Oryx Voyager and Moonlander pass in the image (next PR).

The builder: a Studio layout as JSON in, firmware and a zip of its source out. - `build`: writes the layout's keymap folder into a QMK checkout, compiles it with `qmk compile` (3 minute limit, one build at a time), and hands back the firmware with a source zip (layout, keymap folder, `BUILDING.md` with the exact commits) for the GPL. Layouts with ZSA's modules build on ZSA's fork, both Moonlander revisions unless one is asked for. Nothing is left in the checkout. - `build.Handler`: `POST /build` and `GET /health` for keybars.app's Worker. 422 with the reason for a layout that can't be built, 422 with the end of QMK's output for a failed compile, 503 while a build runs; unknown fields are refused. - `cmd/builder`: `builder serve` in the container, `builder build layout.json` here. - `qmk.Fetcher.Dir` reads `qmk generate-api`'s output from disk, so builds need no network. Tests stand the test binary in for qmk. Real builds of an Oryx Voyager and Moonlander pass in the image (next PR).
feat: the builder: layout JSON in, firmware and its source out
Some checks failed
CI / go (pull_request) Failing after 24s
f041156121
build.Builder writes a layout's keymap folder into a QMK checkout (ZSA's
fork for layouts with ZSA's modules, each Moonlander revision there),
runs qmk compile with a time limit, one build at a time, and returns the
firmware with a source zip. build.Handler is the HTTP side the Worker
calls; cmd/builder serves it or builds one layout here. qmk.Fetcher reads
QMK's API from disk (qmk generate-api), so the builder needs no network.
fix: what CI's linter found: an unclosed body, append to a copy, errors.AsType
All checks were successful
CI / go (pull_request) Successful in 58s
42da456861
feat: the builder's image, QMK and ZSA's fork pinned, with no network to build (#2)
All checks were successful
CI / go (pull_request) Successful in 53s
e0be225124
Reviewed-on: #2
jwarykowski deleted branch feat/builder 2026-10-31 13:58:34 +00: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
jwarykowski/keybars-build!1
No description provided.