From a2f7e898a9b380f9833c0b908290748fa3f92d4d Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 10 Oct 2025 08:52:52 -1000 Subject: [PATCH] limit 8266 to 10 --- script/test_build_components.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/script/test_build_components.py b/script/test_build_components.py index c6045f2a3e..bc4affc171 100755 --- a/script/test_build_components.py +++ b/script/test_build_components.py @@ -38,6 +38,14 @@ from script.analyze_component_buses import ( ) from script.merge_component_configs import merge_component_configs +# Platform-specific maximum group sizes +# ESP8266 has limited IRAM and can't handle large component groups +PLATFORM_MAX_GROUP_SIZE = { + "esp8266-ard": 10, # ESP8266 Arduino has limited IRAM + "esp8266-idf": 10, # ESP8266 IDF also has limited IRAM + # Other platforms can handle larger groups +} + def show_disk_space_if_ci(esphome_command: str) -> None: """Show disk space usage if running in CI during compile. @@ -525,6 +533,28 @@ def run_grouped_component_tests( # No other groups for this platform - keep no_buses components together grouped_components[(platform, NO_BUSES_SIGNATURE)] = no_buses_comps + # Split groups that exceed platform-specific maximum sizes + # ESP8266 has limited IRAM and can't handle large component groups + split_groups = {} + for (platform, signature), components in list(grouped_components.items()): + max_size = PLATFORM_MAX_GROUP_SIZE.get(platform) + if max_size and len(components) > max_size: + # Split this group into smaller groups + print( + f"\n ℹ️ Splitting {platform} group (signature: {signature}) " + f"from {len(components)} to max {max_size} components per group" + ) + # Remove original group + del grouped_components[(platform, signature)] + # Create split groups + for i in range(0, len(components), max_size): + split_components = components[i : i + max_size] + # Create unique signature for each split group + split_signature = f"{signature}_split{i // max_size + 1}" + split_groups[(platform, split_signature)] = split_components + # Add split groups back + grouped_components.update(split_groups) + groups_to_test = [] individual_tests = set() # Use set to avoid duplicates