From a635162c2d5a100c63d39ab115197b3e2be6dadf Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Thu, 26 Mar 2026 14:55:08 +0530 Subject: [PATCH 1/2] ESP-IDF v4.4 is EOL, remove it from ci --- .gitlab-ci.yml | 37 ------------------- CMakeLists.txt | 9 +---- components/esp_matter/CMakeLists.txt | 6 --- .../cmake_common/components_include.cmake | 5 --- examples/light/README.md | 4 +- examples/light/sdkconfig.defaults.shell.v4.4 | 1 - examples/light_switch/README.md | 6 +-- .../multiple_on_off_plugin_units/README.md | 4 +- examples/zap_light/README.md | 6 +-- install.sh | 10 +---- requirements_idf_v4.4.txt | 16 -------- tools/docker/chip_idf/Dockerfile | 5 --- 12 files changed, 13 insertions(+), 96 deletions(-) delete mode 100644 examples/light/sdkconfig.defaults.shell.v4.4 delete mode 100644 requirements_idf_v4.4.txt diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b160749a3..f32bf2dd1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -238,7 +238,6 @@ build_image: matrix: # Change the idf version here in case of idf version change MR. - IDF_VERSION: - - "v4.4.3" - "v5.4.1" .build_examples_template: @@ -470,42 +469,6 @@ build_nopytest_remaining_examples_manual: parallel: 2 -build_esp_matter_examples_idf_v4_4: - resource_group: build_esp_matter_examples_idf_v4_4 - extends: - - .build_examples_template - image: ${DOCKER_IMAGE_NAME}:chip_${CHIP_SHORT_HASH}_idf_${IDF_CHECKOUT_REF} - allow_failure: true - artifacts: - paths: - - "examples/**/build*/size.json" - - "examples/**/build*/build_log.txt" - - "examples/**/build*/*.map" - - "examples/**/build*/*.bin" - - "examples/**/build*/flasher_args.json" - - "examples/**/build*/config/sdkconfig.json" - - "examples/**/build*/bootloader/*.bin" - - "examples/**/build*/partition_table/*.bin" - when: always - expire_in: 4 days - script: - - cd ${ESP_MATTER_PATH} - # idf v4.4 requires jinja < 3.1 so lets install the dependencies for idf v4.4 - - pip install -r requirements_idf_v4.4.txt - # hack the construct==2.10.54 to make it work with idf-v4.4, Python3.12 - # imp is not present in Python3.12 so remove it - - wget https://files.pythonhosted.org/packages/30/2f/e2e6bad1b80f744cf5c2a6d622e3dee698b43e6c040f980ae0ac0edd5e54/construct-2.10.54.tar.gz - - tar -xvzf construct-2.10.54.tar.gz - - sed -i 's/, imp$//g' construct-2.10.54/construct/core.py - - python3 -m pip install ./construct-2.10.54 - - rm -rf construct-2.10.54* - - cd ${ESP_MATTER_PATH}/examples/light - - idf.py set-target esp32c3 - - idf.py build - variables: - IDF_CHECKOUT_REF: "v4.4.3" - - build_esp_matter_examples_pytest_C3: resource_group: build_esp_matter_examples_pytest_C3 extends: diff --git a/CMakeLists.txt b/CMakeLists.txt index 37e48af0f..c63b2ba6b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -392,13 +392,6 @@ idf_build_set_property(COMPILE_OPTIONS "-Wno-error=uninitialized;-Wno-error=mayb idf_build_set_property(COMPILE_OPTIONS "-Wno-error=array-bounds" APPEND) idf_build_set_property(COMPILE_OPTIONS "-Wno-write-strings" APPEND) -# For Xtensa chips, uint32_t was defined as 'unsigned' before v5.0, and after IDF v5.0 it is defined -# as 'unsigned long', same as RISC-V. add this compile option to avoid format errors. -# https://github.com/espressif/esp-idf/issues/6906#issuecomment-1207373706 -if (CONFIG_IDF_TARGET_ARCH_XTENSA AND (${IDF_VERSION_MAJOR} LESS 5)) - idf_build_set_property(COMPILE_OPTIONS "-Wno-format" APPEND) -endif() - # Time sync client feature depends on read client, disable it when read client is disabled. if (CONFIG_DISABLE_READ_CLIENT) target_compile_options(${COMPONENT_LIB} PUBLIC "-DTIME_SYNC_ENABLE_TSC_FEATURE=0") @@ -445,6 +438,6 @@ if (false AND CONFIG_CHIP_OTA_IMAGE_BUILD) INPUT_FILES ${BUILD_DIR}/${CMAKE_PROJECT_NAME}.bin OUTPUT_FILE ${BUILD_DIR}/${CMAKE_PROJECT_NAME}-ota.bin ) - # Adding dependecy as app target so that this runs after images are ready + # Adding dependency as app target so that this runs after images are ready add_dependencies(chip-ota-image app) endif() diff --git a/components/esp_matter/CMakeLists.txt b/components/esp_matter/CMakeLists.txt index b237f795b..199303492 100644 --- a/components/esp_matter/CMakeLists.txt +++ b/components/esp_matter/CMakeLists.txt @@ -80,12 +80,6 @@ endif(CONFIG_ESP_MATTER_ENABLE_MATTER_SERVER) target_sources(${COMPONENT_LIB} PRIVATE ${MATTER_SDK_PATH}/src/app/StorageDelegateWrapper.cpp ${MATTER_SDK_PATH}/src/app/SafeAttributePersistenceProvider.cpp) -# For Xtensa chips, uint32_t was defined as 'unsigned' before v5.0, and after IDF v5.0 it is defined -# as 'unsigned long', same as RISC-V. add this compile option to avoid format errors. -# https://github.com/espressif/esp-idf/issues/6906#issuecomment-1207373706 -if (CONFIG_IDF_TARGET_ARCH_XTENSA AND (${IDF_VERSION_MAJOR} LESS 5)) - idf_build_set_property(COMPILE_OPTIONS "-Wno-format" APPEND) -endif() target_compile_options(${COMPONENT_LIB} PUBLIC "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=") diff --git a/examples/common/cmake_common/components_include.cmake b/examples/common/cmake_common/components_include.cmake index af8c9bf1b..13256ae2d 100644 --- a/examples/common/cmake_common/components_include.cmake +++ b/examples/common/cmake_common/components_include.cmake @@ -30,11 +30,6 @@ if(IDF_TARGET STREQUAL "esp32c2") endif() endif() -get_filename_component(SDKCONFIG_SHELL_IDF_VER "${SDKCONFIG_COMMON_DIR}.shell.v4.4" ABSOLUTE) -if(EXISTS ${SDKCONFIG_SHELL_IDF_VER} AND ${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}.${IDF_VERSION_PATCH} STRLESS "5.0.0") - list(APPEND SDKCONFIG_FILES "${SDKCONFIG_SHELL_IDF_VER}") -endif() - # setting the final sdkconfig files list to SDKCONFIG_DEFAULTS set(SDKCONFIG_DEFAULTS ${SDKCONFIG_FILES}) diff --git a/examples/light/README.md b/examples/light/README.md index ce4bc491d..30d251777 100644 --- a/examples/light/README.md +++ b/examples/light/README.md @@ -21,7 +21,7 @@ The following is the Memory and Flash Usage. - `Bootup` == Device just finished booting up. Device is not commissionined or connected to wifi yet. -- `After Commissioning` == Device is conneted to wifi and is also +- `After Commissioning` == Device is connected to wifi and is also commissioned and is rebooted. - device used: esp32c3_devkit_m - tested on: @@ -37,4 +37,4 @@ The following is the Memory and Flash Usage. This should give you a good idea about the amount of free memory that is available for you to run your application's code. -Applications that do not require BLE post commissioning, can disable it using app_ble_disable() once commissioning is complete. It is not done explicitly because of a known issue with esp32c3 and will be fixed with the next IDF release (v4.4.2). +Applications that do not require BLE post commissioning, can disable it using app_ble_disable() once commissioning is complete. diff --git a/examples/light/sdkconfig.defaults.shell.v4.4 b/examples/light/sdkconfig.defaults.shell.v4.4 deleted file mode 100644 index e54ac03b6..000000000 --- a/examples/light/sdkconfig.defaults.shell.v4.4 +++ /dev/null @@ -1 +0,0 @@ -CONFIG_ENABLE_CHIP_SHELL=n diff --git a/examples/light_switch/README.md b/examples/light_switch/README.md index 0cd34a172..63a9b09d6 100644 --- a/examples/light_switch/README.md +++ b/examples/light_switch/README.md @@ -11,7 +11,7 @@ See the [docs](https://docs.espressif.com/projects/esp-matter/en/latest/esp32/de This example demonstrates auto subscription to only one remote on/off server from on/off client after binding of light to switch. For example, switch that have a led indicator which indicates the on-off state of the bound light. The subscription can keep the indicator on the switch sync with the light node. -- Enable SUBSCRIBE_TO_ON_OFF_SERVER_AFTER_BINDING to enable this funcationality. +- Enable SUBSCRIBE_TO_ON_OFF_SERVER_AFTER_BINDING to enable this functionality. Please check [Bind light to switch](#21-bind-light-to-switch) for more details. ## 2. Post Commissioning Setup @@ -186,7 +186,7 @@ The following is the Memory and Flash Usage. - `Bootup` == Device just finished booting up. Device is not commissionined or connected to wifi yet. -- `After Commissioning` == Device is conneted to wifi and is also +- `After Commissioning` == Device is connected to wifi and is also commissioned and is rebooted. - device used: esp32c3_devkit_m - tested on: @@ -202,7 +202,7 @@ The following is the Memory and Flash Usage. This should give you a good idea about the amount of free memory that is available for you to run your application's code. -Applications that do not require BLE post commissioning, can disable it using app_ble_disable() once commissioning is complete. It is not done explicitly because of a known issue with esp32c3 and will be fixed with the next IDF release (v4.4.2). +Applications that do not require BLE post commissioning, can disable it using app_ble_disable() once commissioning is complete. ## 4. Dynamic Passcode diff --git a/examples/multiple_on_off_plugin_units/README.md b/examples/multiple_on_off_plugin_units/README.md index 306c2f8df..c0512b8be 100644 --- a/examples/multiple_on_off_plugin_units/README.md +++ b/examples/multiple_on_off_plugin_units/README.md @@ -57,7 +57,7 @@ The following is the Memory and Flash Usage. - `Bootup` == Device just finished booting up. Device is not commissionined or connected to wifi yet. -- `After Commissioning` == Device is conneted to wifi and is also +- `After Commissioning` == Device is connected to wifi and is also commissioned and is rebooted. - device used: esp32c3_devkit_m - tested on: @@ -73,4 +73,4 @@ The following is the Memory and Flash Usage. This should give you a good idea about the amount of free memory that is available for you to run your application's code. -Applications that do not require BLE post commissioning, can disable it using app_ble_disable() once commissioning is complete. It is not done explicitly because of a known issue with esp32c3 and will be fixed with the next IDF release (v4.4.2). +Applications that do not require BLE post commissioning, can disable it using app_ble_disable() once commissioning is complete. diff --git a/examples/zap_light/README.md b/examples/zap_light/README.md index 10fb014a0..d88527935 100644 --- a/examples/zap_light/README.md +++ b/examples/zap_light/README.md @@ -44,7 +44,7 @@ The following is the Memory and Flash Usage. - `Bootup` == Device just finished booting up. Device is not commissionined or connected to wifi yet. -- `After Commissioning` == Device is conneted to wifi and is also +- `After Commissioning` == Device is connected to wifi and is also commissioned and is rebooted. - device used: esp32c3_devkit_m - tested on: @@ -60,7 +60,7 @@ The following is the Memory and Flash Usage. This should give you a good idea about the amount of free memory that is available for you to run your application's code. -Applications that do not require BLE post commissioning, can disable it using app_ble_disable() once commissioning is complete. It is not done explicitly because of a known issue with esp32c3 and will be fixed with the next IDF release (v4.4.2). +Applications that do not require BLE post commissioning, can disable it using app_ble_disable() once commissioning is complete. ## A2 Appendix FAQs @@ -69,7 +69,7 @@ Applications that do not require BLE post commissioning, can disable it using ap The run_zaptool.py command is failing: - Check that the connectedhomeip submodule is updated. -- Revert any modifications in any of te files in the connectedhomeip +- Revert any modifications in any of the files in the connectedhomeip submodule, or any submodules in connectedhomeip, and try again. - If you are still facing issues, reproduce the issue on the default example for the device and then raise an [issue](https://github.com/espressif/esp-matter/issues). diff --git a/install.sh b/install.sh index d85595d1d..610579c43 100755 --- a/install.sh +++ b/install.sh @@ -95,14 +95,8 @@ fi echo_log "Installing python dependencies for Matter" -# Install python dependencies based on idf version -if [[ $(git -C $IDF_PATH describe) == v4.4* ]]; then - echo_log "Installing requirements from requirements_idf_v4.4.txt" - python3 -m pip install -r ${ESP_MATTER_PATH}/requirements_idf_v4.4.txt >/dev/null -else - echo_log "Installing requirements from requirements.txt" - python3 -m pip install -r ${ESP_MATTER_PATH}/requirements.txt > /dev/null -fi +echo_log "Installing requirements from requirements.txt" +python3 -m pip install -r ${ESP_MATTER_PATH}/requirements.txt > /dev/null if [ $BUILD_PYTHON = true ]; then echo_log "Building Python testing environment" diff --git a/requirements_idf_v4.4.txt b/requirements_idf_v4.4.txt deleted file mode 100644 index c33a1805a..000000000 --- a/requirements_idf_v4.4.txt +++ /dev/null @@ -1,16 +0,0 @@ -# matter idl -lark==1.1.2 -stringcase==1.2.0 - -# esp-idf v4.4 is not compatible with newer version of jinja2, -# so pinning it to 3.0.1 -jinja2==3.0.1 - -# https://github.com/psf/requests/blob/main/HISTORY.md#2300-2023-05-03 -# idf-component-manager from v4.4 is not compatible with newer version of urllib3 -urllib3<2 - -# mfg_tool - DISABLED for ESP-IDF v4.4 due to construct version conflict -# esp-secure-cert-tool (dependency of esp-matter-mfg-tool) requires construct>=2.10.70 -# but ESP-IDF v4.4 hard pins construct==2.10.54, creating an unsolvable conflict -# esp-matter-mfg-tool>=1.0.4 diff --git a/tools/docker/chip_idf/Dockerfile b/tools/docker/chip_idf/Dockerfile index fdc3341df..d2e9acc60 100644 --- a/tools/docker/chip_idf/Dockerfile +++ b/tools/docker/chip_idf/Dockerfile @@ -31,11 +31,6 @@ ENV IDF_TOOLS_PATH=/opt/espressif/tools COPY --from=build /tmp/esp-idf /opt/espressif/esp-idf -ARG IDF_CHECKOUT_REF -RUN if [ "$IDF_CHECKOUT_REF" = "v4.4.3" ]; then \ - sed -i 's/^gdbgui==/# gdbgui ==/' /opt/espressif/esp-idf/requirements.txt; \ - fi - RUN apt-get update && apt-get install -y python3-virtualenv # Setup the ESP-IDF From fe39d7229b6247cdc8cf792c33f3be9263cd8e53 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Tue, 31 Mar 2026 09:28:36 +0530 Subject: [PATCH 2/2] ci: remove redundant check_typos job, superseded by pre_commit_check --- .github/workflows/check_typos.yml | 49 -------------- .gitlab-ci.yml | 20 +----- tools/check_typos.sh | 104 ------------------------------ 3 files changed, 1 insertion(+), 172 deletions(-) delete mode 100644 .github/workflows/check_typos.yml delete mode 100755 tools/check_typos.sh diff --git a/.github/workflows/check_typos.yml b/.github/workflows/check_typos.yml deleted file mode 100644 index 787538523..000000000 --- a/.github/workflows/check_typos.yml +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 2025 Espressif Systems (Shanghai) PTE LTD -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: Check Typos -permissions: - contents: read - -on: - pull_request: - branches: - - main - - 'release/**' - -jobs: - check_typos: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - name: Install codespell - run: pip install codespell - - name: Fetch main branch - run: git fetch origin main - - name: Check typos in changed files - run: | - FILES=$(git diff --name-only origin/main...HEAD) - echo "Changed files: $FILES" - if [ -n "$FILES" ]; then - ./tools/check_typos.sh $FILES - else - echo "No files changed, skipping typo check" - fi \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f32bf2dd1..1800ab1ac 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -248,7 +248,6 @@ build_image: needs: - job: build_image optional: true - - job: check_typos - job: pre_commit_check tags: - build @@ -645,7 +644,6 @@ build_managed_component_light: needs: - job: build_image optional: true - - job: check_typos - job: pre_commit_check script: - cd ${ESP_MATTER_PATH}/examples/managed_component_light @@ -681,7 +679,6 @@ build_esp_rainmaker_apps: needs: - job: build_image optional: true - - job: check_typos - job: pre_commit_check artifacts: @@ -723,7 +720,7 @@ build_docs: tags: - build needs: - - job: check_typos + - job: pre_commit_check variables: ESP_DOCS_LATEST_BRANCH_NAME: "main" artifacts: @@ -786,21 +783,6 @@ deploy_docs_production: DOCS_DEPLOY_PATH: "$DOCS_PROD_PATH" DOCS_DEPLOY_URL_BASE: "https://$DOCS_PROD_SERVER/$DOCS_PROD_PATH" -check_typos: - image: $CI_DOCKER_REGISTRY/esp-env-v6.0:1 - stage: pre_check - script: - - pip install codespell - - git fetch origin main - - | - FILES=$(git diff --name-only origin/main...HEAD) - echo "change files: $FILES" - if [ -n "$FILES" ]; then - ./tools/check_typos.sh $FILES - fi - tags: - - build - pre_commit_check: image: $CI_DOCKER_REGISTRY/esp-env-v6.0:1 stage: pre_check diff --git a/tools/check_typos.sh b/tools/check_typos.sh deleted file mode 100755 index 2c2e6aaca..000000000 --- a/tools/check_typos.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/bash - -# Usage: tools/check_typos.sh [source_file_or_directory] ... - -CODESPELL_SKIP_LIST=() -ERROR_FOUND=0 - -parse_codespellrc_skips() { - if [ -f .codespellrc ]; then - local skip_files - skip_files=$(grep -E "^skip\s*=" .codespellrc | cut -d '=' -f2 | tr -d ' ') - IFS=',' read -ra CODESPELL_SKIP_LIST <<< "$skip_files" - fi -} - -should_skip_file() { - local file_path="$1" - for pattern in "${CODESPELL_SKIP_LIST[@]}"; do - if [[ "$file_path" == $pattern* ]]; then - return 0 - fi - done - return 1 -} - -process_file() { - local SRC_FILE="$1" - cat "$SRC_FILE" | \ - python3 -c " -import sys, re -ignore_directive = re.compile(r\"[^\w\s]\s*codespell:ignore\b\") -def split_line(line): - if ignore_directive.search(line): - return line.rstrip() - tokens = re.findall(r\"\b[\w']+\b\", line) - result = [] - for token in tokens: - if \"'\" in token: - result.append(token) - else: - result.extend(re.findall(r\"\d+[a-zA-Z]+|[A-Z]+(?=[A-Z][a-z])|[A-Z]?[a-z]+|[A-Z]+\", token)) - return \" \".join(result) -for line in sys.stdin: - print(split_line(line)) -" | codespell --check-hidden --stdin-single-line -q 32 - 2>&1 | sed "s|^|$SRC_FILE: |" - if [ "${PIPESTATUS[2]}" -ne 0 ]; then - ERROR_FOUND=1 - fi -} - -is_valid_file() { - local file="$1" - - case "$file" in - *.c|*.h|*.cpp|*.py|*.txt|*.md|*.yml|*.ini|*.json|*.sh|*.cmake) ;; - *) return 1 ;; - esac - - if should_skip_file "$file"; then - return 1 - fi - - return 0 -} - -process_directory() { - local DIR="$1" - local file - - find "$DIR" -type f | while read -r file; do - if is_valid_file "$file"; then - process_file "$file" - fi - done -} - -main() { - local TARGETS=("$@") - - parse_codespellrc_skips - - if [ "$#" -eq 0 ]; then - TARGETS=(./components ./examples) - fi - - for TARGET in "${TARGETS[@]}"; do - if [ -f "$TARGET" ]; then - if is_valid_file "$TARGET"; then - process_file "$TARGET" - fi - elif [ -d "$TARGET" ]; then - process_directory "$TARGET" - else - echo "Warning: '$TARGET' is not a valid file or directory, skipping" - fi - done - - if [ "$ERROR_FOUND" == "1" ]; then - echo "Typos found" - exit 1 - fi -} - -main "$@"