build: release script + Woodpecker CI for cross-compiled binary distribution #3

Merged
hugooconnor merged 0 commits from refs/pull/3/head into main 2026-07-15 05:57:14 +00:00
hugooconnor commented 2026-07-15 05:47:35 +00:00 (Migrated from codeberg.org)

Adds the release + distribution tooling for the elephant CLI, modelled on the
sibling hark pipeline (Woodpecker on Codeberg → Cloudflare R2, served at
files.anuna.io), adapted for elephant's specifics.

What's here

  • release.sh — version bump → gate (cargo test + clippy) → commit → tag → push. Pushing the tag drives the pipeline. Checks all three sibling path-dep checkouts are present before gating.
  • .woodpecker/release.yaml — cross-compiles the four prebuilt binaries (darwin/linux × arm64/x64) from Linux rust:1-bookworm containers (darwin via osxcross), each with a .sha256, then publishes them plus install.sh to R2 at files.anuna.io/elephant/ (flat "latest" + immutable <tag>/ archive).
  • scripts/install.shcurl … | sh installer: platform detect → download → SHA-256 verify → install to ~/.local/bin (ELEPHANT_INSTALL_DIR override). No Rust toolchain, no sibling checkouts.
  • scripts/install_test.sh — unit tests for platform/artifact resolution (all passing).
  • Makefile dist target — hand-stage a single-platform artifact.
  • README Install section — the curl one-liner.

Elephant-specific adaptations (not a blind copy of hark)

  • Three sibling path deps, not one: clones cbcl-rs, spindle-rust, and did-crdt at pinned commits (--locked cannot pin path-dependency contents). All three pins verified present in their public Codeberg repos.
  • LTO/OOM softening: elephant has a heavy [profile.release] (lto = true, codegen-units = 1) over a large tree (iroh, openmls, loro). The three cross-links soften to thin LTO + 16 codegen-units (the same mitigation the zetl pipeline uses); native linux-x64 keeps full LTO.
  • No openssl fight: the lock resolves to ring/rustls only, so cross-builds need just the target C toolchain — no libssl-dev:arm64, unlike zetl.

Prereq before the first release

The three R2 secrets (cf_r2_access_key_id, cf_r2_secret_access_key, cf_account_id) must exist in the Woodpecker repo config — the same ones the hark/zetl pipelines use. Then cut a release with ./release.sh 0.1.0 from main.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UwjhsndS6KeqbBbgXgnAYm

Adds the release + distribution tooling for the elephant CLI, modelled on the sibling **hark** pipeline (Woodpecker on Codeberg → Cloudflare R2, served at `files.anuna.io`), adapted for elephant's specifics. ## What's here - **`release.sh`** — version bump → gate (`cargo test` + `clippy`) → commit → tag → push. Pushing the tag drives the pipeline. Checks all three sibling path-dep checkouts are present before gating. - **`.woodpecker/release.yaml`** — cross-compiles the four prebuilt binaries (`darwin`/`linux` × `arm64`/`x64`) from Linux `rust:1-bookworm` containers (darwin via osxcross), each with a `.sha256`, then publishes them plus `install.sh` to R2 at `files.anuna.io/elephant/` (flat "latest" + immutable `<tag>/` archive). - **`scripts/install.sh`** — `curl … | sh` installer: platform detect → download → SHA-256 verify → install to `~/.local/bin` (`ELEPHANT_INSTALL_DIR` override). No Rust toolchain, no sibling checkouts. - **`scripts/install_test.sh`** — unit tests for platform/artifact resolution (all passing). - **Makefile `dist` target** — hand-stage a single-platform artifact. - **README Install section** — the curl one-liner. ## Elephant-specific adaptations (not a blind copy of hark) - **Three sibling path deps**, not one: clones `cbcl-rs`, `spindle-rust`, and `did-crdt` at **pinned commits** (`--locked` cannot pin path-dependency *contents*). All three pins verified present in their public Codeberg repos. - **LTO/OOM softening**: elephant has a heavy `[profile.release]` (`lto = true`, `codegen-units = 1`) over a large tree (iroh, openmls, loro). The three cross-links soften to thin LTO + 16 codegen-units (the same mitigation the zetl pipeline uses); native `linux-x64` keeps full LTO. - **No openssl fight**: the lock resolves to ring/rustls only, so cross-builds need just the target C toolchain — no `libssl-dev:arm64`, unlike zetl. ## Prereq before the first release The three R2 secrets (`cf_r2_access_key_id`, `cf_r2_secret_access_key`, `cf_account_id`) must exist in the Woodpecker repo config — the same ones the hark/zetl pipelines use. Then cut a release with `./release.sh 0.1.0` from `main`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01UwjhsndS6KeqbBbgXgnAYm
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
anuna-research/elephant!3
No description provided.