File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 112112# A list of files that are used by the CI and build system.
113113# If any of these files change, the preset sketches should be recompiled.
114114build_files = [
115- "package/package_esp32_index.template.json" ,
116115 "package.json" ,
117116 "tools/get.py" ,
118117 "tools/get.exe" ,
@@ -547,6 +546,17 @@ def preprocess_changed_files(changed_files: list[str]) -> None:
547546 """
548547 Preprocess the changed files to detect build system changes.
549548 """
549+ # Special case: if the Arduino libs or tools changes, rebuild all sketches on PRs
550+ if is_pr and not component_mode :
551+ for changed in changed_files :
552+ if changed == "package/package_esp32_index.template.json" :
553+ print ("Package index changed - all sketches affected" , file = sys .stderr )
554+ all_sketches = list_ino_files ()
555+ for sketch in all_sketches :
556+ if sketch not in affected_sketches :
557+ affected_sketches .append (sketch )
558+ # No need to continue preprocessing; dependency walk will still run afterwards
559+ break
550560 # If not a PR, skip preprocessing as we'll recompile everything anyway
551561 if not is_pr :
552562 return
You can’t perform that action at this time.
0 commit comments