diff --git a/.gitlab/ci/docs.yml b/.gitlab/ci/docs.yml index b15b6880df..886dab06dd 100644 --- a/.gitlab/ci/docs.yml +++ b/.gitlab/ci/docs.yml @@ -8,7 +8,7 @@ .patterns-docs-partial: &patterns-docs-partial - "components/**/*.h" - - "components/**/CMakeList.txt" + - "components/**/CMakeLists.txt" - "components/**/sdkconfig*" - "tools/tools.json" - "tools/idf_tools.py" diff --git a/.gitlab/ci/rules.yml b/.gitlab/ci/rules.yml index f1077b89e7..b2f0e384bd 100644 --- a/.gitlab/ci/rules.yml +++ b/.gitlab/ci/rules.yml @@ -10,7 +10,7 @@ - "**/*.{c,C,cpp}" - "**/*.{h,H,hpp}" - "components/**/Kconfig" - - "components/**/CMakeList.txt" + - "components/**/CMakeLists.txt" .patterns-python-cache: &patterns-python-cache - "tools/requirements.json" diff --git a/.idf_ci.toml b/.idf_ci.toml index cc97333f84..81fc795c1a 100644 --- a/.idf_ci.toml +++ b/.idf_ci.toml @@ -1,4 +1,13 @@ preserve_non_test_related_apps = false +exclude_dirs = [ + 'tools/test_mkdfu', + 'tools/test_idf_size', + 'tools/test_idf_py', + 'tools/test_idf_diag', + 'tools/test_bsasm', + 'tools/ci/test_autocomplete', + 'tools/test_build_system', +] [local_runtime_envs] EXTRA_CFLAGS = "-Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function -Wstrict-prototypes" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9c7ed43ee0..901d50d37d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -143,7 +143,7 @@ repos: require_serial: true additional_dependencies: - PyYAML == 5.3.1 - - idf-build-apps~=2.11 + - idf-build-apps~=2.12 - id: sort-yaml-files name: sort yaml files entry: tools/ci/sort_yaml.py diff --git a/examples/wifi/.build-test-rules.yml b/examples/wifi/.build-test-rules.yml index b9e96c2313..05b637362a 100644 --- a/examples/wifi/.build-test-rules.yml +++ b/examples/wifi/.build-test-rules.yml @@ -36,15 +36,19 @@ examples/wifi/ftm: examples/wifi/getting_started: <<: *wifi_depends_default enable: - - if: IDF_TARGET == "esp32h2" + - if: INCLUDE_DEFAULT == 1 || IDF_TARGET == "esp32h2" disable: - if: (SOC_WIFI_SUPPORTED != 1) and (SOC_WIRELESS_HOST_SUPPORTED != 1) + disable_test: + - if: IDF_TARGET == "esp32p4" + temporary: true + reason: lack of runners depends_filepatterns: - examples/wifi/getting_started/**/* examples/wifi/iperf: enable: - - if: IDF_TARGET == "esp32h2" + - if: INCLUDE_DEFAULT == 1 || IDF_TARGET == "esp32h2" disable: - if: (SOC_WIFI_SUPPORTED != 1) and (SOC_WIRELESS_HOST_SUPPORTED != 1) - if: (IDF_TARGET == "esp32p4") and CONFIG_NAME in ["defaults", "99"] diff --git a/examples/wifi/getting_started/softAP/README.md b/examples/wifi/getting_started/softAP/README.md index 8eaac1ddbb..4f90182c11 100644 --- a/examples/wifi/getting_started/softAP/README.md +++ b/examples/wifi/getting_started/softAP/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 | ESP32-P4 | ESP32-H2 | -| ----------------- | ----- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-P4 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | # Wi-Fi SoftAP Example diff --git a/examples/wifi/getting_started/station/README.md b/examples/wifi/getting_started/station/README.md index 8c855c54ed..0b267d859e 100644 --- a/examples/wifi/getting_started/station/README.md +++ b/examples/wifi/getting_started/station/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 | ESP32-P4 | ESP32-H2 | -| ----------------- | ----- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-P4 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | # Wi-Fi Station Example diff --git a/examples/wifi/iperf/README.md b/examples/wifi/iperf/README.md index baa19da317..47e96ee823 100644 --- a/examples/wifi/iperf/README.md +++ b/examples/wifi/iperf/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-P4 | ESP32-S2 | ESP32-S3 | ESP32-H2 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-P4 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | # Iperf Example diff --git a/tools/ci/check_build_test_rules.py b/tools/ci/check_build_test_rules.py index 83e9de6730..37cac3a9c0 100755 --- a/tools/ci/check_build_test_rules.py +++ b/tools/ci/check_build_test_rules.py @@ -5,7 +5,6 @@ import argparse import os import re import sys -import typing as t from collections import defaultdict from pathlib import Path @@ -42,7 +41,7 @@ FORMAL_TO_USUAL = {v: k for k, v in USUAL_TO_FORMAL.items()} def print_diff_table( - list1: list[str], list2: list[str], title1: str, title2: str, excluded: t.Optional[list[str]] = None + list1: list[str], list2: list[str], title1: str, title2: str, excluded: list[str] | None = None ) -> None: left_set = set(list1) right_set = set(list2) @@ -82,7 +81,7 @@ def print_diff_table( console.print(table) -def get_readme_path(app_dir: str) -> t.Optional[str]: +def get_readme_path(app_dir: str) -> str | None: readme_path = os.path.join(app_dir, 'README.md') if not os.path.isfile(readme_path): @@ -105,7 +104,7 @@ def generate_new_support_table(targets: list[str]) -> str: return res -def parse_existing_table(app_dir: str) -> t.Tuple[t.Optional[str], list[str]]: +def parse_existing_table(app_dir: str) -> tuple[str | None, list[str]]: readme_path = get_readme_path(app_dir) if not readme_path: return None, SUPPORTED_TARGETS @@ -124,9 +123,9 @@ def parse_existing_table(app_dir: str) -> t.Tuple[t.Optional[str], list[str]]: def get_grouped_apps( paths: list[str], - exclude_dirs: t.Optional[list[str]] = None, - extra_targets: t.Optional[list[str]] = None, -) -> t.Dict[str, t.List[App]]: + exclude_dirs: list[str] | None = None, + extra_targets: list[str] | None = None, +) -> dict[str, list[App]]: apps = sorted( find_apps( paths, @@ -136,7 +135,7 @@ def get_grouped_apps( ) ) - grouped_apps: t.Dict[str, t.List[App]] = defaultdict(list) + grouped_apps: dict[str, list[App]] = defaultdict(list) for app in apps: grouped_apps[app.app_dir].append(app) @@ -145,9 +144,9 @@ def get_grouped_apps( def check_readme( paths: list[str], - exclude_dirs: t.Optional[list[str]] = None, + exclude_dirs: list[str] | None = None, *, - extra_targets: t.Optional[list[str]] = None, + extra_targets: list[str] | None = None, ) -> None: grouped_apps = get_grouped_apps(paths, exclude_dirs, extra_targets) exit_code = 0 @@ -198,10 +197,8 @@ def check_readme( print(f'Auto-fixing: Modified README: {readme_path}') exit_code = 1 - if exit_code != 0: - print('') # extra new line for readability - if exit_code != 0: + print('') # extra new line for readability print('Related documentation:') print( '\t- https://docs.espressif.com/projects/idf-build-apps/en/latest/references/manifest.html#enable-disable-rules' @@ -209,7 +206,7 @@ def check_readme( sys.exit(exit_code) -def get_grouped_cases(paths: list[str]) -> t.Dict[str, t.Dict[str, t.Set[str]]]: +def get_grouped_cases(paths: list[str]) -> dict[str, dict[str, set[str]]]: """ return something like this: { @@ -244,10 +241,10 @@ def get_grouped_cases(paths: list[str]) -> t.Dict[str, t.Dict[str, t.Set[str]]]: def check_test_scripts( paths: list[str], - exclude_dirs: t.Optional[list[str]] = None, + exclude_dirs: list[str] | None = None, *, - extra_targets: t.Optional[list[str]] = None, - bypass_targets: t.Optional[list[str]] = None, + extra_targets: list[str] | None = None, + bypass_targets: list[str] | None = None, ) -> None: # takes long time, run only in CI grouped_apps = get_grouped_apps(paths, exclude_dirs, extra_targets) @@ -283,9 +280,9 @@ def check_test_scripts( for script_path in grouped_cases[app_dir]['script_paths']: print(' - ' + script_path) exit_code = 1 - print('') # extra new line for readability if exit_code != 0: + print('') # extra new line for readability print('Related documentation:') print( '\t- https://docs.espressif.com/projects/idf-build-apps/en/latest/references/manifest.html#enable-disable-rules' diff --git a/tools/requirements/requirements.ci.txt b/tools/requirements/requirements.ci.txt index f5a2e4c3a7..2865254683 100644 --- a/tools/requirements/requirements.ci.txt +++ b/tools/requirements/requirements.ci.txt @@ -6,7 +6,7 @@ # https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/tools/idf-tools.html # ci -idf-ci>=0.2.3,<1 +idf-ci>=0.3,<1 coverage jsonschema diff --git a/tools/test_apps/configs/README.md b/tools/test_apps/configs/README.md index 3e3c63e97b..b6eada6541 100644 --- a/tools/test_apps/configs/README.md +++ b/tools/test_apps/configs/README.md @@ -2,7 +2,7 @@ Certain combinations of configs, e.g. stack and heap debug configs, are useful to set in most test apps. -To facilitiate re-use, this folder contains some of the most common ones. +To facilitate reuse, this folder contains some of the most common ones. These can then be added to the list of default configs in test apps: @@ -10,6 +10,6 @@ These can then be added to the list of default configs in test apps: list(PREPEND SDKCONFIG_DEFAULTS "$ENV{IDF_PATH}/tools/test_apps/configs/sdkconfig.debug_helpers" "sdkconfig.defaults") ``` -Note that this must be set in the top-level project `CMakelist.txt`. +Note that this must be set in the top-level project `CMakelists.txt`. These files should not be considered stable, and are thus not recommended for use outside of IDF.