Skip to content

Commit e8b686f

Browse files
Merge remote-tracking branch 'refs/remotes/origin/main'
2 parents 4f340c3 + 8eaf68d commit e8b686f

309 files changed

Lines changed: 11996 additions & 4976 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-format

Lines changed: 0 additions & 109 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Report Certification Failure
3+
about: Create a bug report for Matter device certification failure
4+
title: '[CERT-FAILURE]'
5+
labels: 'certification'
6+
---
7+
8+
**Failed Test Case**
9+
- Test Case ID (e.g., TC-ACL-2.4):
10+
- Test Case Name:
11+
- Test Step Where Failure Occurred:
12+
13+
**Describe the issue**
14+
Please describe the certification failure in detail.
15+
16+
**DUT details**
17+
Please provide the following information:
18+
- Matter version:
19+
- ESP-Matter Commit Id:
20+
- ESP-IDF Commit Id:
21+
- SoC (eg: ESP32 or ESP32-C3):
22+
- sdkconfig:
23+
- Partition table:
24+
- Endpoint Hierarchy:
25+
26+
**Test Harness details**
27+
- Test Harness Version:
28+
- Test Harness SHA:
29+
- Test Harness SDK SHA:
30+
31+
**Attachments**
32+
Please attach the following files:
33+
- [ ] PICS items
34+
- [ ] Device logs (with debug level)
35+
- [ ] Test harness logs
36+
37+
**Checklist**
38+
- [ ] I have gone through the [GitHub issues](https://github.com/espressif/esp-matter/issues) and the [Matter Programming Guide](https://docs.espressif.com/projects/esp-matter/en/latest/esp32/) and did not find a similar issue.
39+
- [ ] I have verified that the PICS items match the cluster configuration on my DUT.
40+
- [ ] I have verified that the PICS items are correct as per the test plan.
41+
- [ ] I have run the test locally and verified that the issue is reproducible. (You can run tests locally by following instructions here: [Python tests](https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#running-tests-locally) and [YAML tests](https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/yaml.md#running-yaml-tests))

.github/workflows/pre-commit.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Copyright 2026 Espressif Systems (Shanghai) PTE LTD
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Pre-commit Hooks
16+
17+
permissions:
18+
contents: read
19+
20+
on:
21+
pull_request:
22+
branches:
23+
- main
24+
- 'release/**'
25+
26+
jobs:
27+
pre-commit:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v6
31+
with:
32+
fetch-depth: 0
33+
34+
- uses: actions/setup-python@v5
35+
with:
36+
python-version: '3.x'
37+
38+
- uses: pre-commit/action@v3.0.1
39+
with:
40+
extra_args: --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}

.gitlab-ci.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
stages:
2-
- check_typos
2+
- pre_check
33
- cleanup
44
- docker_build
55
- build
@@ -250,6 +250,7 @@ build_image:
250250
- job: build_image
251251
optional: true
252252
- job: check_typos
253+
- job: pre_commit_check
253254
tags:
254255
- build
255256
# runner: `sudo mkdir -p /cache/matter_build/`
@@ -616,6 +617,7 @@ build_managed_component_light:
616617
- job: build_image
617618
optional: true
618619
- job: check_typos
620+
- job: pre_commit_check
619621
script:
620622
- cd ${ESP_MATTER_PATH}/examples/managed_component_light
621623
- idf.py set-target esp32c3
@@ -649,6 +651,7 @@ build_esp_rainmaker_apps:
649651
- job: build_image
650652
optional: true
651653
- job: check_typos
654+
- job: pre_commit_check
652655

653656
artifacts:
654657
paths:
@@ -754,7 +757,7 @@ deploy_docs_production:
754757

755758
check_typos:
756759
image: $CI_DOCKER_REGISTRY/esp-env-v6.0:1
757-
stage: check_typos
760+
stage: pre_check
758761
script:
759762
- pip install codespell
760763
- git fetch origin main
@@ -766,3 +769,29 @@ check_typos:
766769
fi
767770
tags:
768771
- build
772+
773+
pre_commit_check:
774+
image: $CI_DOCKER_REGISTRY/esp-env-v6.0:1
775+
stage: pre_check
776+
rules:
777+
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "push" || $CI_COMMIT_BRANCH == "main"
778+
script:
779+
- pip install pre-commit
780+
- git fetch origin main
781+
- pre-commit install-hooks
782+
- |
783+
# Get the base commit for comparison
784+
BASE_COMMIT=$(git merge-base origin/main HEAD)
785+
# Run pre-commit on changed files
786+
FILES=$(git diff --name-only --diff-filter=ACMRT ${BASE_COMMIT}...HEAD)
787+
if [ -n "$FILES" ]; then
788+
echo "Running pre-commit on changed files:"
789+
echo "$FILES"
790+
# Convert newline-separated files to space-separated and pass to pre-commit
791+
echo "$FILES" | xargs pre-commit run --files
792+
else
793+
echo "No files changed, skipping pre-commit"
794+
fi
795+
796+
tags:
797+
- build

.pre-commit-config.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
repos:
2-
- repo: https://github.com/pre-commit/mirrors-clang-format
3-
rev: '0f8362ad84fe4a446b807ffbfc9e65d078ecf732'
2+
- repo: https://github.com/espressif/astyle_py.git
3+
rev: v1.0.5
44
hooks:
5-
- id: clang-format
6-
exclude: '^.*/zap-generated/.*$'
5+
- id: astyle_py
6+
args: ['--astyle-version=3.4.7', '--rules=tools/ci/astyle-rules.yml']
77

8+
- repo: https://github.com/google/keep-sorted
9+
rev: v0.7.1
10+
hooks:
11+
- id: keep-sorted
812

13+
- repo: https://github.com/codespell-project/codespell
14+
rev: v2.4.1
15+
hooks:
16+
- id: codespell
17+
args: ['--config=.codespellrc', '--write-changes']

DEVELOPER_GUIDE.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Developer Guide
2+
3+
This guide covers the development workflow and tooling for contributors to esp-matter.
4+
5+
## Pre-commit Hooks
6+
7+
The repository uses [pre-commit](https://pre-commit.com/) to run automated checks before each commit. Following hooks are configured:
8+
9+
1. astyle_py — C/C++ Code Formatter
10+
11+
[astyle_py](https://github.com/espressif/astyle_py) enforces consistent C/C++ formatting.
12+
The formatting rules are defined in `tools/ci/astyle-rules.yml`.
13+
14+
2. keep-sorted — Sorted Block Enforcer
15+
16+
[keep-sorted](https://github.com/google/keep-sorted) is used in documentation and
17+
source files to maintain alphabetical ordering of lists and sections.
18+
19+
3. codespell — Spell Checker
20+
21+
[codespell](https://github.com/codespell-project/codespell) catches common
22+
misspellings in source code, documentation, and comments.
23+
Configuration is in `.codespellrc`.
24+
25+
### Setup
26+
27+
1. Install pre-commit
28+
29+
```bash
30+
python3 -m pip install pre-commit
31+
```
32+
33+
2. Install the hooks
34+
35+
From the repository root:
36+
37+
```bash
38+
cd $ESP_MATTER_PATH
39+
pre-commit install
40+
```
41+
42+
This registers the hooks so they run automatically on `git commit`.
43+
44+
### Usage
45+
46+
Once installed, the hooks run on every `git commit` against the staged files. If a hook reformats a file, the commit is aborted — review the changes, `git add` the updated files, and commit again.
47+
48+
### Running locally
49+
50+
Run all hooks on every file in the repository:
51+
52+
```bash
53+
pre-commit run --all-files
54+
```
55+
56+
Run all hooks only on staged files (same as what happens on commit):
57+
58+
```bash
59+
pre-commit run
60+
```
61+
62+
Run a specific hook:
63+
64+
```bash
65+
pre-commit run astyle_py --all-files
66+
pre-commit run keep-sorted --all-files
67+
pre-commit run codespell --all-files
68+
```
69+
70+
Run hooks on specific files:
71+
72+
```bash
73+
pre-commit run --files path/to/file.cpp path/to/other_file.h
74+
```
75+
76+
Skip hooks for a one-off commit (not recommended):
77+
78+
```bash
79+
git commit --no-verify
80+
```

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
# Espressif's SDK for Matter
22

33
[![Docker Image](https://github.com/espressif/esp-matter/actions/workflows/docker-image.yml/badge.svg)](https://github.com/espressif/esp-matter/actions/workflows/docker-image.yml)
4+
 
45
[![Launchpad Deployment](https://github.com/espressif/esp-matter/actions/workflows/pages.yml/badge.svg)](https://github.com/espressif/esp-matter/actions/workflows/pages.yml)
6+
##### Tools
7+
[![Try With Launchpad](https://img.shields.io/badge/Try_With-ESP_Launchpad-0066CC?logo=espressif)](https://espressif.github.io/esp-launchpad/?flashConfigURL=https://espressif.github.io/esp-matter/launchpad.toml)
8+
 
9+
[![Try DMV](https://img.shields.io/badge/Try-Data_Model_Validator_Tool-0066CC?logo=espressif)](https://espressif.github.io/esp-matter-tools/dmv_tool)
10+
##### Documentation
11+
[![Programming Guide](https://img.shields.io/badge/ESP--Matter-Programming_Guide-6F42C1?logo=readthedocs)](https://docs.espressif.com/projects/esp-matter/en/latest/)
12+
 
13+
[![Matter Blog Series](https://img.shields.io/badge/Espressif's_Matter-Blog_Series-6F42C1?logo=espressif)](https://blog.espressif.com/matter-38ccf1d60bcd)
14+
 
15+
[![Matter Specification](https://img.shields.io/badge/Matter-Specification-6F42C1)](https://csa-iot.org/developer-resource/specifications-download-request/)
516

17+
---
618
## Introduction
719

820
Espressif's SDK for Matter is the official Matter development framework for ESP32 series SoCs. It is built on top of the [open source Matter SDK](https://github.com/project-chip/connectedhomeip/), and provides simplified APIs, commonly used peripherals, tools and utilities for security, manufacturing and production accompanied by exhaustive documentation. It includes rich production references, aimed to simplify the development process of Matter products and enable the users to go to production in the shortest possible time.
@@ -42,9 +54,3 @@ Refer the [Programming Guide](https://docs.espressif.com/projects/esp-matter/en/
4254

4355
## Matter Specifications
4456
Download the Matter specification from [CSA's official site](https://csa-iot.org/developer-resource/specifications-download-request/)
45-
46-
---
47-
48-
<a href="https://espressif.github.io/esp-launchpad/?flashConfigURL=https://espressif.github.io/esp-matter/launchpad.toml">
49-
<img alt="Try it with ESP Launchpad" src="https://espressif.github.io/esp-launchpad/assets/try_with_launchpad.png" width="250" height="70">
50-
</a>

0 commit comments

Comments
 (0)