ci: install bun + call cargo_env so make build finds both toolchains #4

Merged
mik-tf merged 8 commits from development_mik into development 2026-04-28 03:34:06 +00:00
Owner

CI on development was failing at make build -> make bundle-web with:

/bin/bash: line 1: bun: command not found
make: *** [Makefile:54: bundle-web] Error 127

Two fixes:

  1. Install bun — the ghcr.io/despiegk/builder image doesn't pre-install bun. Add a Setup bun step that runs the canonical curl bun.sh/install | bash and exports $HOME/.bun/bin to $GITHUB_PATH for subsequent steps. Idempotent (skips if bun is already on PATH).

  2. Call cargo_env after sourcing build_lib.sh — sourcing only defines the helpers; you still need to call cargo_env to put cargo on PATH. Same minimal fix used by hero_archipelagos and other green-CI repos.

Signed-off-by: mik-tf

CI on `development` was failing at `make build` -> `make bundle-web` with: ``` /bin/bash: line 1: bun: command not found make: *** [Makefile:54: bundle-web] Error 127 ``` Two fixes: 1. **Install bun** — the ghcr.io/despiegk/builder image doesn't pre-install bun. Add a `Setup bun` step that runs the canonical `curl bun.sh/install | bash` and exports `$HOME/.bun/bin` to `$GITHUB_PATH` for subsequent steps. Idempotent (skips if bun is already on PATH). 2. **Call `cargo_env` after sourcing build_lib.sh** — sourcing only defines the helpers; you still need to call `cargo_env` to put cargo on PATH. Same minimal fix used by hero_archipelagos and other green-CI repos. Signed-off-by: mik-tf
ci: install bun + call cargo_env so make build finds both toolchains
Some checks failed
Build and Test / build (pull_request) Failing after 0s
d5e80e9b57
Two missing pieces in the workflow:

* `make bundle-web` (which `make build` depends on) calls `bun
  install`, `bun run scripts/bundle.js`, and `bun run scripts/minify.js`.
  The ghcr.io/despiegk/builder image doesn't ship bun, so CI was
  bailing with `bun: command not found` at build time.

* Sourcing `scripts/build_lib.sh` only defines the helpers — the
  workflow still needs to call `cargo_env` to put cargo on PATH for
  the steps before make starts dispatching its CARGO_ENV-prefixed
  recipes. (Same fix already applied to hero_cluster, hero_web_template,
  hero_coordinator.)

Adds a `Setup bun` step that runs the canonical curl installer and
persists `$HOME/.bun/bin` on `$GITHUB_PATH` so subsequent steps see
it. Idempotent — skips reinstall if bun is already present.

Signed-off-by: mik-tf
ci: retrigger after runner Docker pool exhaustion
Some checks failed
Build and Test / build (pull_request) Failing after 38s
63bf0179f8
Signed-off-by: mik-tf
ci: retrigger after 30-min runner pool recovery wait
Some checks failed
Build and Test / build (pull_request) Failing after 36s
7810179c53
Signed-off-by: mik-tf
ci: bypass actions/checkout@v4 (Forgejo auth bug) with manual clone
Some checks failed
Build and Test / build (pull_request) Failing after 2s
de3d44ad49
Same fix as hero_cluster — actions/checkout@v4 has an intermittent
auth bug against forge.ourworld.tf that fails to use the
FORGEJO_TOKEN secret even when it's clearly accessible. Manual git
clone with the token in the URL works reliably.

Signed-off-by: mik-tf
ci: install unzip before bun installer (bun.sh installer needs it)
Some checks failed
Build and Test / build (pull_request) Failing after 7s
3d654eeca2
Signed-off-by: mik-tf
deps: migrate to hero_rpc 0.5 (split into hero_rpc_openrpc)
Some checks failed
Build and Test / build (pull_request) Failing after 0s
99e094fa13
hero_rpc 0.5 split the runtime types out of hero_rpc_derive into a
new hero_rpc_openrpc crate. Consumers of the openrpc_client! macro
must now depend on hero_rpc_openrpc directly so the macro-emitted
code can find OpenRpcError / OpenRpcTransport at the
hero_rpc_openrpc::* path.

Workspace Cargo.toml:
  + hero_rpc_openrpc git dep, version 0.5.0, features = ["transport"]
  + explicit version = "0.5.0" pin on hero_rpc_derive, herolib_core,
    herolib_derive, herolib_ai (was implicit *).

crates/hero_editor_sdk/Cargo.toml:
  + hero_rpc_openrpc = { workspace = true }

crates/hero_editor_sdk/src/lib.rs:
  - pub use herolib_core::openrpc::{OpenRpcError, OpenRpcTransport};
  + pub use hero_rpc_openrpc::{OpenRpcError, OpenRpcTransport};

Without the path swap rustc reports E0308 because the macro emits
hero_rpc_openrpc::OpenRpcError while the SDK was re-exporting the
distinct herolib_core::openrpc::OpenRpcError.

Cargo.lock regenerated to refresh the stale hero_rpc commit pin
(was 3d0251da, no longer reachable on hero_rpc development).

Verified: `cargo check --workspace` clean (only pre-existing style
warnings). Same shape as hero_books_sdk, hero_db_sdk, hero_aibroker,
hero_browser, hero_indexer.

Signed-off-by: mik-tf
ci: retrigger after Docker network pool exhaustion
Some checks failed
Build and Test / build (pull_request) Failing after 10s
a3a371d6a5
Signed-off-by: mik-tf
ci: clone PR source branch (was cloning default branch instead)
All checks were successful
Build and Test / build (pull_request) Successful in 3m25s
96cfc46c85
The previous manual checkout cloned the default branch (development)
and only re-fetched a specific SHA if it wasn't reachable. That if-
block didn't fire because ${{ github.event.pull_request.head.sha }}
appears to be empty under Forgejo's runner — so CI ended up running
on the OLD development HEAD instead of the PR's branch tip.

Fix: clone with --branch $BRANCH where BRANCH = $GITHUB_HEAD_REF
(set on PR runs to the source branch name) or $GITHUB_REF_NAME (set
on push runs). Same shape hero_voice's CI uses successfully.

Signed-off-by: mik-tf
mik-tf merged commit db5cdca8bb into development 2026-04-28 03:34:06 +00:00
mik-tf deleted branch development_mik 2026-04-28 03:34:06 +00:00
Sign in to join this conversation.
No reviewers
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_editor!4
No description provided.