Skip to content

Commit 47d51eb

Browse files
committed
Add matter over Thread
add ci build test
1 parent ca8dc0b commit 47d51eb

File tree

8 files changed

+65
-107
lines changed

8 files changed

+65
-107
lines changed

.github/workflows/build.yml

+23-5
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,36 @@ name: Build
33
on:
44
push:
55
branches:
6-
- "main"
7-
- "feature/*"
6+
- main
7+
- feature/*
88

99
workflow_dispatch:
1010

11+
permissions: read-all
12+
1113
jobs:
12-
build-docker-image:
14+
trunk_check:
15+
name: Trunk Check
16+
runs-on: ubuntu-latest
17+
permissions:
18+
checks: write # For trunk to post annotations
19+
contents: read # For repo checkout
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Trunk Check
26+
uses: trunk-io/trunk-action@v1
27+
28+
build_docker_image:
29+
name: Build docker image
1330
runs-on: ubuntu-latest
31+
needs: trunk_check
1432
steps:
1533
- name: Login to GitHub Container Registry
1634
uses: docker/login-action@v3
1735
with:
1836
registry: ghcr.io
19-
username: ${{ secrets.GITHUB_USERNAME }}
20-
password: ${{ secrets.GITHUB_TOKEN }}
37+
username: ${{ secrets.DOCKER_USERNAME }}
38+
password: ${{ secrets.DOCKER_PASSWORD }}

.trunk/configs/.hadolint.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Following source doesn't work in most setups
2+
ignored:
3+
- SC1090
4+
- SC1091

.trunk/configs/.shellcheckrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
enable=all
2+
source-path=SCRIPTDIR
3+
disable=SC2154
4+
5+
# If you're having issues with shellcheck following source, disable the errors via:
6+
# disable=SC1090
7+
# disable=SC1091

.trunk/trunk.yaml

+15-9
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,40 @@
22
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
33
version: 0.1
44
cli:
5-
version: 1.22.8
5+
version: 1.22.9
66
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
77
plugins:
88
sources:
99
- id: trunk
10-
ref: v1.6.6
10+
ref: v1.6.7
1111
uri: https://github.com/trunk-io/plugins
1212
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
1313
runtimes:
1414
enabled:
15+
1516
1617
1718
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
1819
lint:
1920
enabled:
21+
22+
23+
24+
2025
2126
2227
2328
24-
25-
- black@24.10.0
26-
29+
30+
- black@25.1.0
31+
2732
- git-diff-check
28-
- isort@5.13.2
29-
- markdownlint@0.43.0
33+
- isort@6.0.0
34+
- markdownlint@0.44.0
3035
3136
32-
- ruff@0.8.4
33-
37+
- ruff@0.9.3
38+
3439
3540
ignore:
3641
- linters: [ALL]
@@ -40,6 +45,7 @@ lint:
4045
- venv/**
4146
- cmake-*/**
4247
- vendor/**
48+
- ci/docker/Dockerfile
4349
actions:
4450
enabled:
4551
- trunk-announce

README.md

+13-4
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ Follow these steps to set up your Smart IoT Sensor:
311311

312312
### Dependencies
313313

314-
- **ESP-IDF**: [Official development framework](https://docs.espressif.com/projects/esp-idf/en/v5.3.1/esp32/get-started/index.html#software) for Espressif chips.
314+
- **Docker**: [Install docker](https://docs.docker.com/engine/install/).
315315

316316
### Building the Firmware
317317

@@ -353,22 +353,31 @@ When a sensor misbehaves, it's helpful to output logs to diagnose the issue. By
353353

354354
1. Open the configuration menu:
355355
```bash
356-
idf.py menuconfig
356+
docker run --rm -it \
357+
-v $PWD:/opt/esp/project \
358+
-w /opt/esp/project \
359+
esp_idf_xiao_esp32c6_sensor:latest idf.py menuconfig
357360
```
358361
2. Navigate to:
359362
`Component config``Log output``Default log verbosity`.
360363
3. Set the verbosity level to `Info`.
361364
4. Save the changes, and then execute the following command to build, flash, and monitor:
362365
```bash
363-
idf.py -p <TARGET_PORT> build flash monitor
366+
docker run --device=<TARGET_PORT> \
367+
--rm -v $PWD:/opt/esp/project \
368+
-w /opt/esp/project \
369+
-it esp_idf_xiao_esp32c6_sensor:latest idf.py -p <TARGET_PORT> build flash monitor
364370
```
365371

366372
## ZigBee
367373

368374
ZigBee can be activated in the menu:
369375

370376
```bash
371-
idf.py menuconfig
377+
docker run --rm -it \
378+
-v $PWD:/opt/esp/project \
379+
-w /opt/esp/project \
380+
esp_idf_xiao_esp32c6_sensor:latest idf.py menuconfig
372381
```
373382

374383
Navigate to `XIAO Sensor Configuration``Select Sensor Connection Type``ZigBee`.

ci/docker/entrypoint.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
source $IDF_PATH/export.sh
5-
source $ESP_MATTER_PATH/export.sh
4+
source "${IDF_PATH}"/export.sh
5+
source "${ESP_MATTER_PATH}"/export.sh
66

77
exec "$@"

main/idf_component.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## IDF Component Manager Manifest File
22
dependencies:
3-
espressif/button: "=2.5.0"
3+
espressif/button: =2.5.0
44
espressif/esp_diag_data_store: ==1.0.2
55
espressif/esp_secure_cert_mgr: "*"
66
espressif/esp-zboss-lib: ~1.5.0

scripts/install.py

-86
This file was deleted.

0 commit comments

Comments
 (0)