1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-21 19:23:45 +01:00
This commit is contained in:
J. Nick Koston
2025-10-17 14:57:45 -10:00
parent e2101f5a20
commit b0ada914bc
2 changed files with 7 additions and 7 deletions

View File

@@ -466,7 +466,9 @@ def write_cpp_file() -> int:
def compile_program(args: ArgsProtocol, config: ConfigType) -> int:
from esphome import platformio_api
_LOGGER.info("Compiling app...")
# NOTE: "Build path:" format is parsed by script/ci_memory_impact_extract.py
# If you change this format, update the regex in that script as well
_LOGGER.info("Compiling app... Build path: %s", CORE.build_path)
rc = platformio_api.run_compile(config, CORE.verbose)
if rc != 0:
return rc

View File

@@ -65,13 +65,11 @@ def extract_from_compile_output(
total_ram = sum(int(match) for match in ram_matches)
total_flash = sum(int(match) for match in flash_matches)
# Extract build directory from ESPHome's delete messages
# Look for: INFO Deleting /path/to/build/.esphome/build/componenttest.../.pioenvs
# Extract build directory from ESPHome's explicit build path output
# Look for: INFO Compiling app... Build path: /path/to/build
build_dir = None
if match := re.search(
r"INFO Deleting (.+/\.esphome/build/componenttest[^/]+)/\.pioenvs", output_text
):
build_dir = match.group(1)
if match := re.search(r"Build path: (.+)", output_text):
build_dir = match.group(1).strip()
return total_ram, total_flash, build_dir