Skip to content

Commit e6257d3

Browse files
Merge branch 'project-chip:master' into master
2 parents 52d2bae + 0c59ebf commit e6257d3

File tree

529 files changed

+104107
-7660
lines changed

Some content is hidden

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

529 files changed

+104107
-7660
lines changed

.github/.wordlist.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,7 @@ OpenThreadDemo
10061006
openweave
10071007
OperationalCredentials
10081008
operationalDataset
1009+
operationalstate
10091010
opkg
10101011
OPTIGA
10111012
optionMask

.github/workflows/build.yaml

+50-18
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ jobs:
157157
run: echo "$CONCURRENCY_CONTEXT"
158158
- name: Checkout
159159
uses: actions/checkout@v4
160+
with:
161+
fetch-depth: 2
162+
persist-credentials: true
160163
- name: Try to ensure the directories for core dumping exist and we
161164
can write them.
162165
run: |
@@ -186,6 +189,10 @@ jobs:
186189
- name: Clean output
187190
run: rm -rf ./out
188191
- name: Run Tests with sanitizers
192+
# Sanitizer tests are not likely to find extra issues so running the same tests
193+
# as above repeatedly on every pull request seems extra time. Instead keep this run
194+
# for master only
195+
if: github.event.pull_request.number == null
189196
env:
190197
LSAN_OPTIONS: detect_leaks=1
191198
run: |
@@ -201,17 +208,34 @@ jobs:
201208
BUILD_TYPE=sanitizers scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" --export-compile-commands
202209
BUILD_TYPE=sanitizers scripts/tests/gn_tests.sh
203210
done
211+
- name: Generate tests with sanitizers (for tidy)
212+
if: github.event.pull_request.number != null
213+
run: |
214+
rm -rf ./out/sanitizers
215+
BUILD_TYPE=sanitizers scripts/build/gn_gen.sh --args="is_clang=true is_asan=true chip_data_model_check_die_on_failure=true" --export-compile-commands
204216
- name: Ensure codegen is done for sanitize
205217
run: |
206218
./scripts/run_in_build_env.sh "./scripts/run_codegen_targets.sh out/sanitizers"
219+
- name: Find changed files
220+
id: changed-files
221+
uses: tj-actions/changed-files@v45
207222
- name: Clang-tidy validation
208223
# NOTE: clang-tidy crashes on CodegenDataModel_Write due to Nullable/std::optional check.
209224
# See https://github.com/llvm/llvm-project/issues/97426
225+
env:
226+
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
210227
run: |
228+
touch out/changed_files.txt
229+
for file in ${ALL_CHANGED_FILES}; do
230+
echo "$file changed and will be considered for tidy"
231+
echo "$file" >>out/changed_files.txt
232+
done
233+
211234
./scripts/run_in_build_env.sh \
212235
"./scripts/run-clang-tidy-on-compile-commands.py \
213236
--compile-database out/sanitizers/compile_commands.json \
214237
--file-exclude-regex '/(repo|zzz_generated|lwip/standalone)/|-ReadImpl|-InvokeSubscribeImpl|CodegenDataModel_Write|QuieterReporting' \
238+
--file-list-file out/changed_files.txt \
215239
check \
216240
"
217241
- name: Clean output
@@ -375,13 +399,16 @@ jobs:
375399
scripts/build_python_device.sh --chip_detail_logging true
376400
377401
build_darwin:
378-
name: Build on Darwin (clang, python_lib, simulated)
402+
name: Build on Darwin (clang, simulated)
379403
runs-on: macos-13
380404
if: github.actor != 'restyled-io[bot]'
381405

382406
steps:
383407
- name: Checkout
384408
uses: actions/checkout@v4
409+
with:
410+
fetch-depth: 2
411+
persist-credentials: true
385412
- name: Checkout submodules & Bootstrap
386413
uses: ./.github/actions/checkout-submodules-and-bootstrap
387414
with:
@@ -402,37 +429,42 @@ jobs:
402429
CHIP_ROOT_PATH=examples/placeholder/linux
403430
CHIP_ROOT_PATH="$CHIP_ROOT_PATH" BUILD_TYPE="$BUILD_TYPE" scripts/build/gn_gen.sh --args="$GN_ARGS"
404431
scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE"
405-
- name: Setup Build, Run Build and Run Tests
432+
- name: Setup Build, Run Build and Run Tests (asan + target_os=all)
406433
# We can't enable leak checking here in LSAN_OPTIONS, because on
407434
# Darwin that's only supported with a new enough clang, and we're
408435
# not building with the pigweed clang here.
436+
env:
437+
BUILD_TYPE: default
409438
run: |
410-
for BUILD_TYPE in default python_lib; do
411-
case $BUILD_TYPE in
412-
# We want to build various standalone example apps
413-
# (similar to what examples-linux-standalone.yaml
414-
# does), so use target_os="all" to get those picked
415-
# up as part of the "unified" build. But then to
416-
# save CI resources we want to exclude the
417-
# "host clang" build, which uses the pigweed
418-
# clang.
419-
"default") GN_ARGS='target_os="all" is_asan=true enable_host_clang_build=false';;
420-
esac
421-
BUILD_TYPE=$BUILD_TYPE scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" --export-compile-commands
422-
scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE"
423-
BUILD_TYPE=$BUILD_TYPE scripts/tests/gn_tests.sh
424-
done
425-
- name: Ensure codegen is done for sanitize
439+
# We want to build various standalone example apps (similar to what examples-linux-standalone.yaml
440+
# does), so use target_os="all" to get those picked up as part of the "unified" build. But then
441+
# to save CI resources we want to exclude the "host clang" build, which uses the pigweed clang.
442+
scripts/build/gn_gen.sh --args='target_os="all" is_asan=true enable_host_clang_build=false chip_data_model_check_die_on_failure=true' --export-compile-commands
443+
scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE"
444+
scripts/tests/gn_tests.sh
445+
- name: Ensure codegen is done for default
426446
run: |
427447
./scripts/run_in_build_env.sh "./scripts/run_codegen_targets.sh out/default"
448+
- name: Find changed files
449+
id: changed-files
450+
uses: tj-actions/changed-files@v45
428451
- name: Clang-tidy validation
429452
# NOTE: clang-tidy crashes on CodegenDataModel_Write due to Nullable/std::optional check.
430453
# See https://github.com/llvm/llvm-project/issues/97426
454+
env:
455+
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
431456
run: |
457+
touch out/changed_files.txt
458+
for file in ${ALL_CHANGED_FILES}; do
459+
echo "$file changed and will be considered for tidy"
460+
echo "$file" >>out/changed_files.txt
461+
done
462+
432463
./scripts/run_in_build_env.sh \
433464
"./scripts/run-clang-tidy-on-compile-commands.py \
434465
--compile-database out/default/compile_commands.json \
435466
--file-exclude-regex '/(repo|zzz_generated|lwip/standalone)/|CodegenDataModel_Write|QuieterReporting' \
467+
--file-list-file out/changed_files.txt \
436468
check \
437469
"
438470
- name: Uploading diagnostic logs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Copyright (c) 2024 Project CHIP Authors
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: Cancel workflows on failing CI
16+
on:
17+
workflow_dispatch:
18+
schedule:
19+
- cron: "*/10 * * * *"
20+
21+
jobs:
22+
cancel_workflow:
23+
name: Cancel CI on failing pull requests
24+
25+
runs-on: ubuntu-latest
26+
27+
# Don't run on forked repos
28+
if: github.repository_owner == 'project-chip'
29+
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
- uses: actions/setup-python@v5
34+
with:
35+
python-version: '3.12'
36+
- name: Setup pip modules we use
37+
run: |
38+
pip install \
39+
click \
40+
coloredlogs \
41+
python-dateutil \
42+
pygithub \
43+
&& echo "DONE installint python prerequisites"
44+
- name: Cancel runs
45+
run: |
46+
scripts/tools/cancel_workflows_for_pr.py \
47+
--gh-api-token "${{ secrets.GITHUB_TOKEN }}" \
48+
--require "Restyled" \
49+
--require "Lint Code Base" \
50+
--require "ZAP" \
51+
--require "Run misspell" \
52+
--max-pr-age-minutes 20

.github/workflows/darwin-tests.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ jobs:
7373
platform: darwin
7474
bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }}
7575

76+
- name: Build iOS Darwin Framework Tool Build Debug
77+
working-directory: src/darwin/Framework
78+
run: xcodebuild -target "darwin-framework-tool" -sdk iphoneos -configuration Debug AD_HOC_CODE_SIGNING_ALLOWED=YES
79+
7680
- name: Run macOS Darwin Framework Tool Build Debug
7781
working-directory: src/darwin/Framework
7882
run: xcodebuild -target "darwin-framework-tool" -sdk macosx -configuration Debug

.github/workflows/examples-bouffalolab.yaml

+12-37
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,15 @@ jobs:
5858
run: |
5959
./scripts/run_in_build_env.sh \
6060
"./scripts/build/build_examples.py \
61-
--target bouffalolab-bl602dk-light-easyflash \
62-
--target bouffalolab-bl602dk-light-mfd-littlefs \
63-
--target bouffalolab-bl602dk-light-rpc-115200-littlefs \
61+
--target bouffalolab-bl602dk-light-mfd-littlefs-rpc-115200 \
6462
build \
6563
--copy-artifacts-to out/artifacts \
6664
"
6765
- name: Prepare some bloat report from the previous builds
6866
run: |
6967
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
70-
bl602 bl602 lighting-app \
71-
out/artifacts/bouffalolab-bl602dk-light-easyflash/chip-bl602-lighting-example.out \
72-
/tmp/bloat_reports/
73-
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
74-
bl602 bl602+mfd lighting-app \
75-
out/artifacts/bouffalolab-bl602dk-light-mfd-littlefs/chip-bl602-lighting-example.out \
76-
/tmp/bloat_reports/
77-
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
78-
bl602 bl602+rpc lighting-app \
79-
out/artifacts/bouffalolab-bl602dk-light-rpc-115200-littlefs/chip-bl602-lighting-example.out \
68+
bl602 bl602+mfd+littlefs+rpc lighting-app \
69+
out/artifacts/bouffalolab-bl602dk-light-mfd-littlefs-rpc-115200/chip-bl602-lighting-example.out \
8070
/tmp/bloat_reports/
8171
- name: Clean out build output
8272
run: rm -rf ./out
@@ -85,35 +75,25 @@ jobs:
8575
run: |
8676
./scripts/run_in_build_env.sh \
8777
"./scripts/build/build_examples.py \
88-
--target bouffalolab-bl706dk-light-easyflash \
89-
--target bouffalolab-bl706dk-light-mfd-littlefs \
90-
--target bouffalolab-bl706dk-light-ethernet-littlefs \
78+
--target bouffalolab-bl706dk-light-ethernet-easyflash \
9179
--target bouffalolab-bl706dk-light-wifi-littlefs \
92-
--target bouffalolab-bl706dk-light-rpc-115200-littlefs \
80+
--target bouffalolab-bl706dk-light-mfd-rpc-littlefs-115200 \
9381
build \
9482
--copy-artifacts-to out/artifacts \
9583
"
9684
- name: Prepare some bloat report from the previous builds
9785
run: |
9886
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
99-
bl702 bl702 lighting-app \
100-
out/artifacts/bouffalolab-bl706dk-light-easyflash/chip-bl702-lighting-example.out \
101-
/tmp/bloat_reports/
102-
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
103-
bl702 bl702+mfd lighting-app \
104-
out/artifacts/bouffalolab-bl706dk-light-mfd-littlefs/chip-bl702-lighting-example.out \
105-
/tmp/bloat_reports/
106-
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
107-
bl702 bl706-eth lighting-app \
108-
out/artifacts/bouffalolab-bl706dk-light-ethernet-littlefs/chip-bl702-lighting-example.out \
87+
bl702 bl702+eth lighting-app \
88+
out/artifacts/bouffalolab-bl706dk-light-ethernet-easyflash/chip-bl702-lighting-example.out \
10989
/tmp/bloat_reports/
11090
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
111-
bl702 bl706-wifi lighting-app \
91+
bl702 bl702+wifi lighting-app \
11292
out/artifacts/bouffalolab-bl706dk-light-wifi-littlefs/chip-bl702-lighting-example.out \
11393
/tmp/bloat_reports/
11494
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
115-
bl702 bl702+rpc lighting-app \
116-
out/artifacts/bouffalolab-bl706dk-light-rpc-115200-littlefs/chip-bl702-lighting-example.out \
95+
bl702 bl706+mfd+rpc+littlefs lighting-app \
96+
out/artifacts/bouffalolab-bl706dk-light-mfd-rpc-littlefs-115200/chip-bl702-lighting-example.out \
11797
/tmp/bloat_reports/
11898
- name: Clean out build output
11999
run: rm -rf ./out
@@ -123,19 +103,14 @@ jobs:
123103
run: |
124104
./scripts/run_in_build_env.sh \
125105
"./scripts/build/build_examples.py \
126-
--target bouffalolab-bl704ldk-light-easyflash \
127106
--target bouffalolab-bl704ldk-light-mfd-littlefs \
128107
build \
129108
--copy-artifacts-to out/artifacts \
130109
"
131110
- name: Prepare some bloat report from the previous builds
132111
run: |
133112
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
134-
bl702l bl702l lighting-app \
135-
out/artifacts/bouffalolab-bl704ldk-light-easyflash/chip-bl702l-lighting-example.out \
136-
/tmp/bloat_reports/
137-
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
138-
bl702l bl702l+mfd lighting-app \
113+
bl702l bl702l+mfd+littlefs lighting-app \
139114
out/artifacts/bouffalolab-bl704ldk-light-mfd-littlefs/chip-bl702l-lighting-example.out \
140115
/tmp/bloat_reports/
141116
- name: Clean out build output
@@ -145,4 +120,4 @@ jobs:
145120
uses: ./.github/actions/upload-size-reports
146121
if: ${{ !env.ACT }}
147122
with:
148-
platform-name: BouffaloLab
123+
platform-name: BouffaloLab

.github/workflows/examples-efr32.yaml

+7-38
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ jobs:
6868
./scripts/run_in_build_env.sh \
6969
"./scripts/build/build_examples.py \
7070
--enable-flashbundle \
71-
--target efr32-brd4187c-thermostat-openthread-mtd \
72-
--target efr32-brd4187c-air-quality-sensor-app-openthread-mtd \
71+
--target efr32-brd4187c-thermostat-use-ot-lib \
7372
--target efr32-brd4187c-switch-shell-use-ot-coap-lib \
7473
--target efr32-brd4187c-unit-test \
7574
build \
@@ -82,42 +81,30 @@ jobs:
8281
./scripts/run_in_build_env.sh \
8382
"./scripts/build/build_examples.py \
8483
--enable-flashbundle \
85-
--target efr32-brd4187c-light-use-ot-lib \
86-
--target efr32-brd4187c-pump \
87-
--target efr32-brd4187c-lock-shell-heap-monitoring \
88-
build \
89-
--copy-artifacts-to out/artifacts \
90-
"
91-
- name: Clean out build output
92-
run: rm -rf ./out
93-
- name: Build BRD4187C variants (3)
94-
run: |
95-
./scripts/run_in_build_env.sh \
96-
"./scripts/build/build_examples.py \
97-
--enable-flashbundle \
84+
--target efr32-brd4187c-lock-rpc \
85+
--target efr32-brd4187c-air-quality-sensor-app-shell-heap-monitoring \
9886
--target efr32-brd4187c-window-covering-additional-data-advertising \
99-
--target efr32-brd4187c-light-rpc \
10087
build \
10188
--copy-artifacts-to out/artifacts \
10289
"
10390
- name: Prepare some bloat report from the previous builds
10491
run: |
10592
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
106-
efr32 BRD4187C lighting-app \
107-
out/efr32-brd4187c-light-rpc/matter-silabs-lighting-example.out \
93+
efr32 BRD4187C lock-app \
94+
out/efr32-brd4187c-lock-rpc/matter-silabs-lock-example.out \
10895
/tmp/bloat_reports/
10996
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
11097
efr32 BRD4187C window-app \
11198
out/efr32-brd4187c-window-covering-additional-data-advertising/matter-silabs-window-example.out \
11299
/tmp/bloat_reports/
113100
- name: Clean out build output
114101
run: rm -rf ./out
115-
- name: Build BRD4338A WiFi Soc variants
102+
- name: Build some WiFi Soc variants
116103
run: |
117104
./scripts/run_in_build_env.sh \
118105
"./scripts/build/build_examples.py \
119106
--enable-flashbundle \
120-
--target efr32-brd4338a-light-skip-rps-generation \
107+
--target efr32-brd2605a-light-skip-rps-generation \
121108
--target efr32-brd4338a-lock-skip-rps-generation \
122109
build \
123110
--copy-artifacts-to out/artifacts \
@@ -130,24 +117,6 @@ jobs:
130117
/tmp/bloat_reports/
131118
- name: Clean out build output
132119
run: rm -rf ./out
133-
- name: Build BRD2605A WiFi Soc variants
134-
run: |
135-
./scripts/run_in_build_env.sh \
136-
"./scripts/build/build_examples.py \
137-
--enable-flashbundle \
138-
--target efr32-brd2605a-light-skip-rps-generation \
139-
--target efr32-brd2605a-lock-skip-rps-generation \
140-
build \
141-
--copy-artifacts-to out/artifacts \
142-
"
143-
- name: Prepare bloat report for brd2605a lock app
144-
run: |
145-
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
146-
efr32 BRD2605a lock-app \
147-
out/efr32-brd2605a-lock-skip-rps-generation/matter-silabs-lock-example.out \
148-
/tmp/bloat_reports/
149-
- name: Clean out build output
150-
run: rm -rf ./out
151120
- name: Build EFR32 with WiFi NCP
152121
run: |
153122
./scripts/run_in_build_env.sh \

0 commit comments

Comments
 (0)