rich 172c53f46d
build / build (push) Successful in 20s
Build from upstream's latest full release instead of the branch tip
ci-build.sh now defaults to UPSTREAM_REF=latest-release, resolved through
GitHub's releases/latest (which skips pre-releases and drafts); the
keymindCascade tip was 693 commits and 13 pre-releases past
v1.18.0.1-halo-keymind-cascade-dev-03214a16. A branch, tag or commit still
works, and build.env records UPSTREAM_TAG.

The workflow skips the build when the newest release's upstream commit isn't
an ancestor of the new one (publish-release.py --behind), so going from the
pre-release-based builds back to 03214a16 doesn't make -hz.U go backwards.
Builds resume once upstream publishes a full release past c12050f.
2026-11-05 21:18:11 -05:00

Hazelwood firmware builds

CI builds of mikecarper/MeshCore keymindCascade with the Hazelwood local changes applied, published as Gitea releases. The Hazelwood mesh collector deploys them to the nodes.

How it works

  1. scripts/ci-build.sh clones upstream at its latest full GitHub release (pre-releases are skipped; set UPSTREAM_REF=keymindCascade for the branch tip), applies patches/*.patch with fixed committer data (so the same upstream commit and patches always give the same source commit), and runs ./local_build.sh build-firmware <env> for each target.
  2. scripts/publish-release.py converts every nRF52 .uf2 to the .hex delta base LoRa OTA needs, writes manifest.json (version, upstream and source commits, OTA target id, each image's base_hash, and patch hashes), and creates the release build-<source commit 8> with all artifacts. The release notes list the upstream commits since the previous release, linked to GitHub and split into code and build files versus docs/tests/CI only (the fingerprint's rule below), plus a full-diff link and which Hazelwood patches were added, changed or removed.
  3. .gitea/workflows/build.yml runs daily, on manual dispatch and on pushes that change patches or scripts. It skips the build when the release for that source commit already exists, when the newest release's upstream commit isn't an ancestor of this one (so -hz.U never goes backwards, e.g. when the newest release was built from a pre-release), or when the code fingerprint matches the newest release's: a hash of the patched source tree without *.md, docs/, test/, .github/ and other files no build reads, plus the targets and ci-build.sh. Upstream commits touching only those files therefore publish nothing. (Comparing the binaries wouldn't work: the -hz.U in the version label counts every upstream commit.)

Targets: RAK_4631_repeater_unified_lora_ota (trimmed, see patch 0004) and Heltec_v3_companion_radio_full_nomqtt. Override with TARGETS=....

Changing the local patches

The patches are the Hazelwood commits on top of upstream. To change them, edit the commits in a MeshCore checkout and re-export:

cd ~/Code_Repo/MeshCore
git fetch upstream
# rebase or cherry-pick the local commits onto upstream/keymindCascade, then:
git format-patch --no-signature --zero-commit -o ~/Code_Repo/meshcore-hazelwood-firmware/patches \
  upstream/keymindCascade..HEAD

When upstream changes break a patch, the "Apply patches to upstream" step fails and no release is published. scripts/check_firmware_capabilities.py (patch 0004) is the most likely to conflict.

Runner

vm-gitrunner-p01 (Debian 13 VM, gitea-runner, Docker). One job at a time. PlatformIO toolchains persist in /var/lib/gitea-runner/platformio on the VM, mounted into every job as /root/.platformio. A manual run with force rebuilds an already released or unchanged source (useful after runner changes); it never replaces the existing release.

S
Description
No description provided
Readme
94 KiB
0 Stars 1 Watchers 0 Forks
2026-11-14 07:35:28 +00:00
Languages
Python 76.3%
Shell 23.7%