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.
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
scripts/ci-build.shclones upstream at its latest full GitHub release (pre-releases are skipped; setUPSTREAM_REF=keymindCascadefor the branch tip), appliespatches/*.patchwith 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.scripts/publish-release.pyconverts every nRF52.uf2to the.hexdelta base LoRa OTA needs, writesmanifest.json(version, upstream and source commits, OTA target id, each image'sbase_hash, and patch hashes), and creates the releasebuild-<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..gitea/workflows/build.ymlruns 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.Unever 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 andci-build.sh. Upstream commits touching only those files therefore publish nothing. (Comparing the binaries wouldn't work: the-hz.Uin 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.