mirror of
https://github.com/Colorado-Mesh/meshcore-bot-firmware.git
synced 2026-08-11 16:20:29 +00:00
Adds the project metadata and CI/release workflow needed to publish this repo under Colorado-Mesh/meshcore-bot-firmware. - LICENSE: MIT with attribution to upstream MeshCore (also MIT) - README: rewritten with badges, supported boards, install paths (web flasher / PlatformIO / esptool), bot command table, layout map, development quickstart - CONTRIBUTING: submodule + patch-queue workflow, what-goes-where, patch hygiene rules, PR expectations - RELEASE: cmesh-bot-vX.Y.Z tag scheme + procedure - CHANGELOG: Keep-a-Changelog format, seeded with the hop-coordination fix and patch-5 utility commands - Issue templates: bug_report (with bot stats prompt), feature_request, config.yml (no blank issues, link to upstream + community) - Pull request template: layer checklist, verification gates, prefs-schema impact prompt - .github/workflows/firmware-build.yml: keep PR check on representative envs (Heltec V3, RAK 4631 USB+BLE), add concurrency cancellation for PRs, scope cache key to PIO config hash - .github/workflows/release.yml: NEW; triggers on cmesh-bot-v* tag or manual dispatch, enumerates all 133 *_companion_radio_(usb|ble) envs from vendor/MeshCore/variants/, shards across 8 parallel matrix jobs, aggregates artifacts into a single draft release - scripts/verify.sh: respect MESHCORE_SKIP_APPLY_PATCHES like build-representative.sh does, so verify works when vendor already has patches applied as commits - .gitignore: add .forge.bak.*/ for forge backup directories
64 lines
1.8 KiB
Bash
64 lines
1.8 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/meshcore-env.sh"
|
|
|
|
usage() {
|
|
cat <<'EOF'
|
|
Usage: scripts/verify.sh [--no-build|--build]
|
|
|
|
Runs local pre-review checks. By default, this applies the MeshCore patch queue
|
|
when needed, runs host tests, runs firmware bot safety checks, and compiles
|
|
Python helper scripts. Use --build to also run representative firmware builds.
|
|
EOF
|
|
}
|
|
|
|
run_build=0
|
|
while [ "$#" -gt 0 ]; do
|
|
case "$1" in
|
|
--help|-h)
|
|
usage
|
|
exit 0
|
|
;;
|
|
--no-build)
|
|
run_build=0
|
|
shift
|
|
;;
|
|
--build)
|
|
run_build=1
|
|
shift
|
|
;;
|
|
*)
|
|
echo "Unknown argument: $1" >&2
|
|
usage >&2
|
|
exit 2
|
|
;;
|
|
esac
|
|
done
|
|
|
|
if [ ! -d "${MESHCORE_DIR}/.git" ] && [ ! -f "${MESHCORE_DIR}/.git" ]; then
|
|
echo "MeshCore submodule is missing at ${MESHCORE_DIR}" >&2
|
|
echo "Run: git submodule update --init --recursive" >&2
|
|
exit 1
|
|
fi
|
|
|
|
if [ "${MESHCORE_SKIP_APPLY_PATCHES:-0}" = "1" ]; then
|
|
echo "Skipping MeshCore patch application; using current vendor/MeshCore tree."
|
|
elif ! git -C "${MESHCORE_DIR}" diff --quiet --cached || ! git -C "${MESHCORE_DIR}" diff --quiet || [ -n "$(git -C "${MESHCORE_DIR}" ls-files --others --exclude-standard)" ]; then
|
|
echo "MeshCore submodule is dirty; verify existing patched tree without applying patches."
|
|
else
|
|
"${MESHCORE_FW_ROOT}/scripts/apply-patches.sh"
|
|
fi
|
|
|
|
python3 "${MESHCORE_FW_ROOT}/tests/firmware_bot/run_tests.py"
|
|
bash "${MESHCORE_FW_ROOT}/scripts/check-bot-safety.sh"
|
|
python3 -m py_compile \
|
|
"${MESHCORE_FW_ROOT}/scripts/parse-size-report.py" \
|
|
"${MESHCORE_FW_ROOT}/tests/firmware_bot/run_tests.py"
|
|
|
|
if [ "$run_build" -eq 1 ]; then
|
|
MESHCORE_SKIP_APPLY_PATCHES=1 bash "${MESHCORE_FW_ROOT}/scripts/build-representative.sh" --baseline
|
|
fi
|
|
|
|
echo "Verification complete."
|