ci: add build-linux.yaml + bundled fmt/clippy/musl-fix debt #24

Merged
mik-tf merged 1 commit from development_mik_build_linux into development 2026-05-06 22:39:00 +00:00
Owner

Closes home#212 for hero_logic (Bucket C item 6, 23/29 → 24/29).

What this changes

  • .forgejo/workflows/build-linux.yaml — verbatim port of hero_planner's pure-musl template (canonical for the home#212 cohort). Builds --workspace --release --target x86_64-unknown-linux-musl, uploads <bin>-x86_64-unknown-linux-musl assets to Releases + Package Registry on tag push.
  • buildenv.sh: BINARIES was missing hero_logic_server; the workspace ships 3 binaries (hero_logic crate has two [[bin]] blocks). Same defect class as session 63's missing hero_embedderd. Fixed.

Bundled debt cleanup

  • cargo fmt --all on hand-written files (autogen left alone per D-03 — fix at generator layer if needed).
  • cargo clippy --workspace --all-targets -- -D warnings:
    • drop unused CommandExt import in python_executor.rs
    • module-scope #![allow(dead_code, clippy::manual_strip)] on routes.rs (in-progress UI module).
  • musl portability fix: set_rlimit in python_executor.rs used libc::__rlimit_resource_t (glibc-only alias). Switched to plain libc::c_int with cast at call sites — unbreaks pure-musl builds (latent bug surfaced by the new CI lane).

Test

  • cargo build --workspace --release --target x86_64-unknown-linux-musl → 3 ELF static-pie binaries (3.5 / 5.0 / 5.3 MB stripped).
  • cargo clippy --workspace --all-targets --release -- -D warnings → clean.
  • cargo fmt --all -- --check → clean on hand-written files.

Out of scope

  • Generator-layer fix for autogen fmt drift (types_wasm_generated.rs, osis_server_generated.rs, rpc_generated.rs). Per D-03 the fix belongs in hero_rpc_osis::build codegen template, not here.
  • PR-time fmt/clippy CI (no ci.yml on this repo). Separate follow-up if desired.
Closes [home#212](https://forge.ourworld.tf/lhumina_code/home/issues/212) for hero_logic (Bucket C item 6, 23/29 → 24/29). ## What this changes * `.forgejo/workflows/build-linux.yaml` — verbatim port of `hero_planner`'s pure-musl template (canonical for the home#212 cohort). Builds `--workspace --release --target x86_64-unknown-linux-musl`, uploads `<bin>-x86_64-unknown-linux-musl` assets to Releases + Package Registry on tag push. * `buildenv.sh`: `BINARIES` was missing `hero_logic_server`; the workspace ships 3 binaries (`hero_logic` crate has two `[[bin]]` blocks). Same defect class as session 63's missing `hero_embedderd`. Fixed. ## Bundled debt cleanup * `cargo fmt --all` on hand-written files (autogen left alone per [D-03](https://forge.ourworld.tf/lhumina_code/hero_demo/src/branch/development/decisions/D-03-no-manual-edits-to-autogen.md) — fix at generator layer if needed). * `cargo clippy --workspace --all-targets -- -D warnings`: * drop unused `CommandExt` import in `python_executor.rs` * module-scope `#![allow(dead_code, clippy::manual_strip)]` on `routes.rs` (in-progress UI module). * **musl portability fix**: `set_rlimit` in `python_executor.rs` used `libc::__rlimit_resource_t` (glibc-only alias). Switched to plain `libc::c_int` with cast at call sites — unbreaks pure-musl builds (latent bug surfaced by the new CI lane). ## Test * `cargo build --workspace --release --target x86_64-unknown-linux-musl` → 3 ELF static-pie binaries (3.5 / 5.0 / 5.3 MB stripped). * `cargo clippy --workspace --all-targets --release -- -D warnings` → clean. * `cargo fmt --all -- --check` → clean on hand-written files. ## Out of scope * Generator-layer fix for autogen fmt drift (`types_wasm_generated.rs`, `osis_server_generated.rs`, `rpc_generated.rs`). Per D-03 the fix belongs in `hero_rpc_osis::build` codegen template, not here. * PR-time fmt/clippy CI (no `ci.yml` on this repo). Separate follow-up if desired.
Closes the home#212 binary-release rollout for hero_logic (Bucket C
item 6, 23/29 → 24/29).

Workflow ports the canonical pure-musl template byte-for-byte from
lhumina_code/hero_planner — `cargo build --workspace --release
--target x86_64-unknown-linux-musl`, asset naming `<bin>-x86_64-
unknown-linux-musl`, dual upload to Releases + Package Registry,
mirrors the convention adopted across the home#212 cohort.

buildenv.sh BINARIES was missing `hero_logic_server` (only listed
`hero_logic` and `hero_logic_ui`); the workspace ships 3 binaries
(`hero_logic` crate has two `[[bin]]` blocks). Same class of defect
as session 63's missing `hero_embedderd`. Fixed.

Pre-flight cleanup bundled into the same commit:
  * cargo fmt --all on hand-written files (autogen left alone per
    decisions/D-03 — fix at generator layer if needed).
  * cargo clippy --workspace --all-targets -- -D warnings:
    - python_executor.rs: drop unused `CommandExt` import.
    - routes.rs: module-scope `#![allow(dead_code,
      clippy::manual_strip)]` for in-progress UI code (entire
      module's class issue, not per-item).
  * python_executor.rs `set_rlimit`: musl exposes
    `__rlimit_resource_t` as `c_int` while glibc has its own type
    alias; switching to plain `libc::c_int` with a cast at the call
    sites unbreaks pure-musl builds (latent bug surfaced by the new
    musl CI lane).

Tested: cargo build --workspace --release --target
x86_64-unknown-linux-musl produces 3 static-pie ELF binaries
(3.5 / 5.0 / 5.3 MB stripped). cargo clippy clean. cargo fmt clean
on hand-written files.

Refs: lhumina_code/home#212

Signed-off-by: mik-tf
mik-tf merged commit 10197f8bda into development 2026-05-06 22:39:00 +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
lhumina_code/hero_logic!24
No description provided.