Commit Graph
46 Commits
Author SHA1 Message Date
agessaman 8cec341d78 ci(mqtt): add preset name-parity check across channels
Keep observer-firmware and observer-firmware-dev from drifting on
built-in MQTT preset names while allowing config details to differ.
2026-07-21 08:54:02 -07:00
agessaman f5090667b9 build: add FILENAME_CHANNEL_TAG; dev channel tags asset filenames with -dev
Dev-channel assets are now named <env>-v1.16.0-dev-<hash>.bin so a
downloaded file identifies its channel at a glance; production names are
unchanged (tag unset). The tag sits between version and hash, lowercase
letters only — the flasher-side parsers (gen-slim ASSET_RE, /releases
Worker label+dedupe, flasher.js stale-URL recovery) were made
tag-tolerant first and are already deployed. Filename-end hash
extraction (release pruning) is position-independent and unaffected.

Pushing this intentionally triggers a beta build: that publish is what
applies the new naming. The Worker's dedupe collapses the untagged
9276b6a generation and the new tagged one to the newest per env, so the
flasher never lists both.
2026-07-19 22:37:09 -07:00
agessaman a2a7cceefb ci(beta): stop deriving config-beta.json; sync release notes to the release body
The flasher's Version dropdown is feed-driven now (/releases on the
firmware-proxy Worker lists both channels), so the beta channel needs no
config of its own: drop the config-beta.json derivation and the
update-firmware.py --config call (which would exit nonzero once
config.json's observer entries become github defs with no embedded
filenames). The flasher commit is now scoped to beta/v/ and the counter.

The release body gets the dev-channel warning + firmware-notes.html via
gh_retry'd 'gh release edit' (non-fatal), serving as this channel's
dropdown changelog.

MUST land before the flasher config.json conversion, together with the
matching production-workflow change (26db31f6 on observer-firmware).

Workflow-only commit: pushing this triggers no build.
2026-07-19 21:47:22 -07:00
agessaman 48799d5361 ci(beta): source slim manifests from build output
Flip gen-slim-manifests.py to its new --bin-dir mode (flasher repo PR #1):
beta/v manifests now come from out/ — the assets actually uploaded to the
release — instead of the derived config-beta.json, which the /releases
feed migration will retire. STATIC_PATH already exists in this workflow's
env and stays the manifest download host.

Workflow-only commit (.github/** is in paths-ignore): pushing this
triggers no build; the change is exercised by the next real push to
observer-firmware-dev.
2026-07-19 21:25:54 -07:00
agessaman 9fc90ee099 ci(beta): retry GitHub API calls in the publish step
Run 29708863985 had every build shard green and then died here:

  HTTP 503 ... (https://api.github.com/repos/agessaman/MeshCore/releases)
  Error: Process completed with exit code 1

'gh release create' hit a transient 503 during a GitHub incident and, under
'bash -e', threw away ~15 minutes of building across 14 runners. Nothing was
wrong with the code.

Add a gh_retry helper (5 attempts, exponential backoff 10/20/40/80s) around the
create and upload calls. 'until' in a condition does not trip -e, so the helper
is safe in this shell.

Deliberate choices:
- The existence check is NOT retried: 'release does not exist' is the expected
  answer on a first run and retrying would only burn backoff. A 5xx there falls
  through to create, which now tolerates an already-existing release.
- Prune failures no longer fail the job. Pruning is housekeeping that runs AFTER
  a successful upload; leaving stale assets until the next run beats reporting
  failure for a build whose binaries are already published.
- The prune's second 'gh release view' is gone — it reuses the asset list already
  fetched, removing an API call as well as an unretried failure point.

Retry helper unit-tested for the success, transient-recovery, and
exhaustion paths.

Production (build-observer-firmwares.yml) has the identical fragility and should
get the same treatment; not changed here to keep this scoped to the beta channel.
2026-07-19 17:23:10 -07:00
agessaman f1390afa71 ci(beta): drop self-referencing env redeclarations
The build step redeclared OTA_MANIFEST_BASE_URL and OTA_CHANNEL_TAG as
${{ env.X }}, referencing the very variables it was setting. Workflow-level
env: is already inherited by every step, so this was redundant; had the
self-reference resolved empty it would have silently blanked the channel and
produced firmware with no manifest base. The verify step would have caught it,
but the risk is unnecessary.
2026-07-19 15:14:26 -07:00
agessaman 8daa86096d ci(beta): trigger on push to observer-firmware-dev
Dispatch-only does not work in this repo. The fork's default branch is `dev`
(an upstream mirror carrying none of the observer workflows), and GitHub only
surfaces workflow_dispatch for workflows present on the DEFAULT branch — so the
beta workflow would never have appeared in the Actions UI and could not have
been run at all.

Adding fork-specific workflows to `dev` would pollute the upstream mirror and
conflict on every upstream sync, so the push trigger is the right mechanism: it
runs from the file on the pushed branch, which is exactly how the production
observer workflow already works.

workflow_dispatch is retained (harmless, and starts working if the default
branch ever changes). paths-ignore mirrors production so docs/CI-only commits
do not rebuild firmware.

Trade-off now explicit in the file: every push to observer-firmware-dev
publishes a dev build. Stage on a side branch and fast-forward when you intend
to release.
2026-07-19 15:07:10 -07:00
agessaman 5f027f1a9c docs: rename branch to observer-firmware-dev; document release channels
The branch was named as a one-off dated merge (merge/upstream-dev-20260719),
but it is actually the standing development line: upstream merges land here and
the dev/beta firmware channel is built from it. Rename accordingly and reframe
the handoff so future upstream merges land ON this branch rather than spawning a
new dated branch each time.

Adds a "Branch and Release Channels" section with the full production vs
dev/beta separation table (branch, workflow, release tag, manifest base,
download host, flasher config, embedded version), and restates why both channels
share FIRMWARE_VERSION: the OTA logic treats a differing base as "always an
update", so channels must separate by manifest URL, never by base version.

Also corrects the beta workflow's dispatch-only rationale, which cited a
short-lived branch name that no longer applies. Dispatch-only still stands, for
the better reason: publishing firmware that real nodes pull over the air should
be explicit, not a side effect of every commit to a dev branch.
2026-07-19 14:52:58 -07:00
agessaman c51e7ea426 ci(beta): tag version as beta-dev and publish config-beta.json
- OTA_CHANNEL_TAG is now 'beta-dev', so the embedded version carries the
  channel AND its provenance: v1.16.0.N-observer-beta-dev-<hash>. This channel
  is built from the upstream-dev-merged line, so 'dev' is visible in `ver`,
  the MQTT firmware_version, and SNMP rather than inferred from a branch name.
  Verified on a real build; OTA version parsing is unaffected.

- config-beta.json is now written into the flasher checkout and committed,
  reversing the earlier ephemeral approach: the flasher SPA loads it directly
  for ?config=config-beta, so it has to be served. It is still DERIVED from
  config.json on every beta build rather than hand-maintained, so the dev/beta
  device list cannot drift from production.
2026-07-19 14:50:23 -07:00
agessaman 5094ece3bf ci: add beta release channel workflow
Publishes a parallel observer firmware channel that cannot cross-contaminate
production. Manual dispatch only, so the branch is chosen in the Actions UI
rather than hardcoded here.

Channel separation (each of these is load-bearing, not cosmetic):
- OTA_MANIFEST_BASE_URL -> beta nodes only ever read beta manifests. This is
  the one that actually keeps devices on-channel.
- Separate RELEASE_TAG: the publish step prunes all but KEEP_BUILDS hashes
  WITHIN its tag, so a shared tag would make each channel delete the other's
  assets.
- Separate build counter: shared counters would interleave and make OTA's
  "N behind" comparison meaningless.
- Separate staticPath via a derived config-beta.json.

FIRMWARE_VERSION deliberately matches production: the OTA logic treats a
different base version as "always an update", so channels must be separated by
manifest URL, not base version. OTA_CHANNEL_TAG marks the embedded version
instead (v1.16.0.N-observer-beta-<hash>) so `ver` identifies the channel.

config-beta.json is derived per build rather than committed - a checked-in copy
would be a 56-entry duplicate of config.json that goes stale as devices are
added. Deriving keeps the beta device list identical by construction.

Two verify steps fail the build rather than publish firmware that would OTA
itself onto production: one checks the beta URL is baked into a binary (and the
production URL is not), one checks the generated manifests use the beta host.

Production's changelog and docs sync steps are omitted - those rewrite site-wide
content the production channel owns. The flasher commit is scoped to the beta
manifest dir and counter for the same reason.

Also adds OTA_CHANNEL_TAG support to build.sh. Safe for OTA version parsing:
ota_parseVersion() reads to the first '-' and ota_extractHash() takes the token
after the last, so an extra tag between them changes neither. Verified on a
real build: v1.16.0.7-observer-beta-36831271.
2026-07-19 14:41:54 -07:00
agessaman 15e3400a28 merge: upstream/dev into webconfig (v1.16.0 base -> 2026-07-19)
First upstream merge since the 2026-06-06 base (191 upstream commits). 14 files
conflicted; resolutions below.

Fleet-critical check (Constraint 1): upstream reordered NodePrefs members
(rx_boosted_gain / path_hash_mode moved to the struct tail) but did NOT change
/com_prefs. Persistence is written field-by-field at explicit offsets, so member
order is in-memory only. Verified the fork's writeCommonPrefsImage() is
byte-identical to upstream's inline writer at every offset (79 pad, 121, 122,
290-294). No migration needed.

Resolutions:
- CommonCLI.h: kept the fork's NodePrefs (superset) and adopted upstream's
  setRxBoostedGain(bool)->bool signature change, which CommonCLI.cpp now uses to
  report unsupported. Corrected a stale comment claiming rx_boosted_gain lives at
  offset 79 (it is a pad; the field is at 290).
- CommonCLI.cpp: kept the fork's legacy /com_prefs migration and the extracted
  writeCommonPrefsImage() call.
- UITask.cpp: three-way merge - upstream's drawTextCentered + powering-off
  screen, plus the fork's WITH_WEBCONFIG portal/reboot screens.
- ESP32Board.cpp, MeshCore.h, platformio.ini: kept both sides (fork OTA additions
  alongside upstream powerOff/enterDeepSleep and Packet.cpp).
- MicroNMEALocationProvider.h: took upstream's claim/release and added the
  _claims member they depend on.
- MyMesh.cpp/.h (repeater + room server): kept the fork's superset defaults.
- Removed duplicate declarations auto-merge produced: RadioLibWrapper::_cad_enabled
  and MyMesh::getCADEnabled().

Verification: native suite 15/15 (incl. upstream's new test_mesh_tables), both
MQTT smoke builds green, ArduinoJson pin check passes. Hardware validation next.
2026-07-19 12:41:29 -07:00
agessaman 7b60ee704c ci: add MQTT firmware guardrails 2026-07-18 16:39:17 -07:00
agessaman b5797da462 fix(github-actions): exclude .partsig files from release asset uploads
Updated the build-observer-firmwares workflow to exclude .partsig files
when uploading release assets. This change prevents issues with the
slim-manifest generator and ensures that only relevant firmware files
are published, improving the integrity of the release process.
2026-06-23 15:59:28 -07:00
agessaman 125ddac184 feat(ota): add partition-table signature handling for OTA updates
Implemented functionality to generate and compare partition-table
signatures during OTA updates. This enhancement ensures that the
target build's partition layout matches the device's actual layout,
improving the reliability of OTA updates and preventing issues
related to partition changes.
2026-06-23 15:38:10 -07:00
agessaman 730eb37dbd feat(ota): implement build number suffix for firmware versioning
Enhanced the firmware versioning system by appending a build number
suffix when available, allowing for better tracking of published builds.
This change improves the OTA update process by providing clearer
versioning information in the embedded firmware string.
2026-06-23 12:55:07 -07:00
Ryan Gregg a206f3e066 Merge remote-tracking branch 'upstream/dev' into rak-ethernet
# Conflicts:
#	docs/faq.md
#	examples/companion_radio/main.cpp
2026-06-20 14:39:03 -07:00
agessaman 8b084d5ac3 chore(github-actions): enhance asset pruning logic in release workflow
Updated the build-observer-firmwares.yml to improve the asset pruning
logic during the release process. The workflow now retains the most
recent build hashes to prevent 404 errors for assets that may still
be requested during build cycles. This change ensures a smoother
release experience by maintaining necessary assets while cleaning
up older ones.
2026-06-18 17:55:45 -07:00
agessaman 50154563ba chore(github-actions): refine paths-ignore and shallow clone handling in workflow 2026-06-18 12:01:32 -07:00
agessaman 71b92c830c chore(github-actions): improve changelog generation and git history fetch 2026-06-18 09:38:27 -07:00
agessaman 0844eee136 Sync documentation files for Flasher in GitHub Actions workflow 2026-06-16 14:14:33 -07:00
agessaman 8fa38707c2 Refactor GitHub Actions workflow for rolling release management
Updated the build-observer-firmwares.yml to improve the handling of rolling releases. The workflow now creates a release only if it doesn't already exist, preventing tag conflicts. Additionally, it uploads build artifacts while replacing existing assets and prunes older assets to maintain a clean release. This change enhances the reliability and efficiency of the release process.
2026-06-08 19:13:19 -07:00
agessaman c29ede054b Increase the number of shards from 4 to 14 in the GitHub Actions workflow for building observer firmwares 2026-06-06 14:44:24 -07:00
agessaman 6723776f9d Add caching for PlatformIO toolchains in GitHub Actions workflow 2026-06-06 14:20:30 -07:00
agessaman 981ed2469e automate build process with github actions 2026-06-06 14:10:53 -07:00
Scott Powell 07a3ca9e05 Merge branch 'dev'
# Conflicts:
#	docs/faq.md
2026-06-06 21:12:43 +10:00
Sefinek c67548347c ci: pin peaceiris/actions-gh-pages to v4.1.0 for Node.js 24 support 2026-05-28 16:10:46 +02:00
Sefinek bbd37f53a8 ci: update GitHub Actions and Python version, fix ruby-version typo 2026-05-28 16:01:59 +02:00
Ryan Gregg 87bed4946c Merge remote-tracking branch 'upstream/dev' into rak-ethernet
# Conflicts:
#	examples/companion_radio/main.cpp
2026-05-18 20:57:28 +00:00
Michael Lynch 5e03c00397 Add unit tests for Utils::toHex 2026-04-24 19:37:21 +00:00
Liam CottleandGitHub bdae60498c Merge pull request #2016 from weebl2000/add-lr1110-sx1276
Add sanity build for LR1110 and SX1276 too
2026-04-22 19:30:12 +12:00
Ryan Gregg 2a2c7a171d Merge remote-tracking branch 'upstream/dev' into rak-ethernet
# Conflicts:
#	docs/faq.md
2026-04-20 15:06:09 +00:00
Wessel Nieboer c0252ab82c Add sanity build for LR1110 and SX1276 too 2026-04-04 13:18:15 +02:00
liamcottle 2f6046d7ba update docs cname 2026-03-24 15:38:15 +13:00
Ryan GreggandClaude Opus 4.6 eba2446747 Merge upstream/dev into rak-ethernet
Resolve conflicts: keep both Ethernet CLI and SenseCAP power-off
button code in repeater, keep both Ethernet docs and power management
CLI docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 11:07:09 -07:00
Wessel Nieboer bcfe001370 Have our github PR sanity check also run against main and dev for every merge
This will pick up any easy to spot build failures on dev/main
2026-03-11 16:51:09 +01:00
Ryan Gregg 3e9ceba24a Updates based on PR review feedback from liamcottle 2026-03-10 22:35:31 -07:00
Ryan GreggandClaude Opus 4.6 70b51bd096 Add native Ethernet support for RAK4631 repeater, room server, and companion
Add W5100S Ethernet adapter support for RAK4631-based firmware, enabling
TCP CLI access on port 23 as an alternative to BLE/Serial connections.

- New SerialEthernetInterface for nRF52 with DHCP, reconnection handling,
  and shared WB_IO2 power pin management with GPS module
- Ethernet build targets for repeater, room server, and companion firmware
- Prevent GPS from toggling WB_IO2 when Ethernet module is active
- CI build check for all three ETH firmware targets

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 20:43:59 -07:00
Scott Powell 9f1a3eafcc Merge branch 'dev'
# Conflicts:
#	docs/cli_commands.md
2026-03-06 12:21:52 +11:00
Wessel Nieboer 15cce12efd Add basic sanity test github PR workflow
Build a few generic variants to verify at least those compile. Can't
hurt.
2026-02-25 02:43:48 +01:00
liamcottle 85aa052e1f only deploy docs from main branch 2026-02-08 13:01:13 +13:00
liamcottle 6564bbd58e migrate docs build script so cname survives 2026-02-08 13:00:59 +13:00
liamcottle 706b5a39c6 allow manual deploy 2026-01-28 21:48:39 +13:00
liamcottle c35c1961de add docs branch for testing 2026-01-28 21:48:39 +13:00
liamcottle 132c8961e8 add workflow to build and deploy docs to github pages 2026-01-28 21:48:39 +13:00
Scott Powell 45a88dca3d * .yml files, permissions: write 2025-03-05 19:48:52 +11:00
liamcottle 13bc6e4178 setup automated firmware builds with github actions 2025-03-03 17:58:15 +13:00