Fail fast on empty compile databases and unsupported analyze-memory toolchains; degrade a missing size tool

ninja -t compdb exits 0 with an empty list when the rule names drift, so
the compile database is now parsed and an empty result fails the build
and drops the stale file. analyze-memory refuses an unsupported
toolchain before paying for the compile. A missing size binary warns
instead of discarding an already-linked build, _parse_app_size returns
explicitly from its not-found branch, and the CI cache action asserts
the caller's install prefix matches the cached path. The esp8266
run_compile dispatch hook and copy_files early-return gain direct
tests.
This commit is contained in:
J. Nick Koston
2026-08-22 12:06:38 -05:00
parent 583f47034f
commit b002a37987
5 changed files with 104 additions and 19 deletions
@@ -16,6 +16,12 @@ runs:
id: version
shell: bash
run: |
# The caller's install prefix must match the cached path below, or
# the cache silently stores/restores an empty directory
[ "$ESPHOME_ARDUINO8266_PREFIX" = "$HOME/.esphome-arduino8266" ] || {
echo "ESPHOME_ARDUINO8266_PREFIX is '$ESPHOME_ARDUINO8266_PREFIX', expected '$HOME/.esphome-arduino8266'" >&2
exit 1
}
. venv/bin/activate
key=$(python -c 'from esphome.components.esp8266 import RECOMMENDED_ARDUINO_FRAMEWORK_VERSION as f; from esphome.arduino8266.framework import TOOLCHAIN_VERSION as t; print(f"{f}-{t}")')
[ -n "$key" ] || exit 1