ci: apply idf-ci 1.x

(cherry picked from commit 21d772a24da646bfb672418cf056199cad9b17e4)
This commit is contained in:
Fu Hanxi
2026-07-27 10:52:35 +02:00
parent 6a46ffa617
commit d359f42f6d
44 changed files with 614 additions and 352 deletions
+10 -2
View File
@@ -2,7 +2,7 @@
#
# Checks all public headers in IDF in the ci
#
# SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2020-2026 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
#
import argparse
@@ -309,6 +309,10 @@ class PublicHeaderChecker:
idf_path = os.getenv('IDF_PATH')
if idf_path is None:
raise RuntimeError("Environment variable 'IDF_PATH' wasn't set.")
idf_tools_path = os.getenv('IDF_TOOLS_PATH') or os.path.expanduser(os.path.join('~', '.espressif'))
idf_root_dep_path = os.path.join(idf_tools_path, 'root_managed_components')
project_dir = os.path.join(idf_path, 'examples', 'get-started', 'blink')
sdkconfig = os.path.join(self.build_dir, 'sdkconfig')
if self.libc_type == 'picolibc':
@@ -371,7 +375,11 @@ class PublicHeaderChecker:
if os.path.relpath(d, idf_path).startswith(tuple(ignore_dirs)):
self.log('{} - directory ignored'.format(d))
continue
for root, dirnames, filenames in os.walk(d):
for root, _, filenames in os.walk(d):
if root.startswith(idf_root_dep_path):
self.log(f'{root} - directory ignored (inside IDF_TOOLS_PATH/root_managed_components)')
continue
for filename in fnmatch.filter(filenames, '*.h'):
all_include_files.append(os.path.join(root, filename))
self.main_c = main_c