mirror of
https://github.com/esphome/esphome.git
synced 2025-10-21 11:13:46 +01:00
tweak
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user