Skip to content

Commit de5066b

Browse files
authored
Merge branch 'master' into granbery/preset_scenario_count
2 parents d1fe36d + d04a667 commit de5066b

File tree

877 files changed

+35099
-34913
lines changed

Some content is hidden

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

877 files changed

+35099
-34913
lines changed

.devcontainer/Dockerfile

+22-16
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,19 @@ ARG USER_UID=1000
2424
ARG USER_GID=$USER_UID
2525
ENV LANG en_US.utf8
2626

27-
# these are installed for terminal/dev convenience. If more tooling for build is required, please
28-
# add them to chip-build (in integrations/docker/images/chip-build)
27+
28+
# These are installed for terminal/dev convenience. If more tooling for build is required, please
29+
# add them to chip-build (in integrations/docker/images/chip-build).
2930
RUN apt-get update \
3031
&& apt-get install -y locales \
3132
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
32-
&& apt-get -fy install git vim emacs sudo \
33+
&& apt-get -fy install vim emacs sudo \
3334
apt-utils dialog zsh \
34-
iproute2 procps lsb-release \
35+
lsb-release \
3536
bash-completion \
36-
build-essential cmake cppcheck valgrind \
37-
wget curl telnet \
37+
valgrind \
3838
docker.io \
39-
iputils-ping net-tools \
40-
libncurses5 \
41-
libncursesw5 \
42-
libpython2.7 \
39+
iputils-ping \
4340
&& :
4441

4542
RUN groupadd -g $USER_GID $USERNAME \
@@ -55,13 +52,22 @@ RUN curl https://raw.githubusercontent.com/restyled-io/restyler/master/bin/resty
5552
RUN mkdir -p /opt/sdk/sdks/ \
5653
&& chown -R $USERNAME:$USERNAME \
5754
/opt/sdk/sdks/ `# NXP uses a patch_sdk script to change SDK files` \
58-
/opt/NordicSemiconductor/nrfconnect/ `# $USERNAME needs to own west configuration to build nRF Connect examples` \
59-
$IDF_PATH `# $USERNAME needs to own the esp-idf and tools for the examples to build` \
55+
$ANDROID_HOME \
56+
$IDF_TOOLS_PATH \
57+
&& find $AMEBA_PATH -name "inc_lp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
58+
&& find $AMEBA_PATH -name "inc_hp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
59+
&& find $AMEBA_PATH -name "project_lp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
60+
&& find $AMEBA_PATH -name "project_hp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
61+
&& chmod -R +x \
62+
$ANDROID_HOME/tools/bin `# sdkmanager for accepting licenses`\
63+
&& chmod -R +w \
6064
$IDF_TOOLS_PATH \
61-
$SYSROOT_AARCH64 `# allow read/write access to header and libraries` \
62-
$ANDROID_HOME `# allow licenses to be accepted` \
63-
$AMEBA_PATH `# AmebaD requires access to change build_info.h` \
64-
$IMX_SDK_ROOT \
65+
&& find $AMEBA_PATH -name "inc_lp" -print0 | xargs -0 chmod -R +w \
66+
&& find $AMEBA_PATH -name "inc_hp" -print0 | xargs -0 chmod -R +w \
67+
&& find $AMEBA_PATH -name "project_lp" -print0 | xargs -0 chmod -R +w \
68+
&& find $AMEBA_PATH -name "project_hp" -print0 | xargs -0 chmod -R +w \
69+
# Safe directory is preffered over chown.
70+
&& git config --global --add safe.directory "*" \
6571
&& :
6672

6773
# Fix Tizen SDK paths for new user

.devcontainer/devcontainer.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@
1414
"mounts": [
1515
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
1616
],
17-
"initializeCommand": "bash .devcontainer/build.sh --tag matter-dev-environment:local --version 22",
17+
"initializeCommand": "bash .devcontainer/build.sh --tag matter-dev-environment:local --version 74",
1818
"image": "matter-dev-environment:local",
1919
"remoteUser": "vscode",
20+
"containerEnv": {
21+
"PW_ENVIRONMENT_ROOT": "${containerWorkspaceFolder}/.environment-vscode"
22+
},
2023
"customizations": {
2124
"vscode": {
2225
// Add the IDs of extensions you want installed when the container is created in the array below.

.github/.wordlist.txt

+6-2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ AdvSendAdvert
3737
AE
3838
aef
3939
AES
40+
AFL
4041
AIDL
4142
algs
4243
alloc
@@ -340,6 +341,7 @@ datamodel
340341
DataModelRevision
341342
dataset
342343
datasets
344+
datastore
343345
DataVersion
344346
dbf
345347
DBG
@@ -570,6 +572,8 @@ fsync
570572
ftd
571573
fullclean
572574
fuzzer
575+
fuzzers
576+
fuzztest
573577
FW
574578
gbl
575579
gcloud
@@ -948,8 +952,6 @@ NitricOxideConcentrationMeasurement
948952
NitrogenDioxideConcentrationMeasurement
949953
nl
950954
nltest
951-
NLUnitTest
952-
NLUnitTests
953955
nmcli
954956
nmtui
955957
noc
@@ -1008,6 +1010,7 @@ optionOverride
10081010
optionsMask
10091011
optionsOverride
10101012
orgs
1013+
OSS
10111014
OTA
10121015
OTADownloader
10131016
otaDownloadPath
@@ -1530,6 +1533,7 @@ virtualenv
15301533
visualstudio
15311534
vlatest
15321535
VLEDs
1536+
vm
15331537
vn
15341538
vnc
15351539
vous

.github/workflows/build.yaml

+8-6
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ jobs:
283283
if: github.actor != 'restyled-io[bot]'
284284

285285
container:
286-
image: ghcr.io/project-chip/chip-build:54
286+
image: ghcr.io/project-chip/chip-build:74
287287
volumes:
288288
- "/:/runner-root-volume"
289289
- "/tmp/log_output:/tmp/test_logs"
@@ -316,9 +316,10 @@ jobs:
316316
run: |
317317
scripts/run_in_build_env.sh 'virtualenv pyenv'
318318
source pyenv/bin/activate
319-
pip3 install ./out/controller/python/chip_core-0.0-cp37-abi3-linux_x86_64.whl
320-
pip3 install ./out/controller/python/chip_clusters-0.0-py3-none-any.whl
321-
pip3 install ./out/controller/python/chip_repl-0.0-py3-none-any.whl
319+
python -m ensurepip --upgrade
320+
python -m pip install ./out/controller/python/chip_core-0.0-cp37-abi3-linux_x86_64.whl
321+
python -m pip install ./out/controller/python/chip_clusters-0.0-py3-none-any.whl
322+
python -m pip install ./out/controller/python/chip_repl-0.0-py3-none-any.whl
322323
323324
- name: Run Python tests
324325
shell: bash
@@ -334,7 +335,8 @@ jobs:
334335
scripts/run_in_build_env.sh 'scripts/examples/gn_build_example.sh examples/chip-tool out/'
335336
scripts/run_in_build_env.sh 'virtualenv pyenv'
336337
source pyenv/bin/activate
337-
pip3 install -r scripts/setup/requirements.setuppayload.txt
338+
python -m ensurepip --upgrade
339+
python -m pip install -r scripts/setup/requirements.setuppayload.txt
338340
python3 src/setup_payload/tests/run_python_setup_payload_test.py out/chip-tool
339341
340342
build_linux_python_lighting_device:
@@ -344,7 +346,7 @@ jobs:
344346
if: github.actor != 'restyled-io[bot]'
345347

346348
container:
347-
image: ghcr.io/project-chip/chip-build:54
349+
image: ghcr.io/project-chip/chip-build:74
348350
volumes:
349351
- "/:/runner-root-volume"
350352
- "/tmp/log_output:/tmp/test_logs"

.github/workflows/darwin.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,9 @@ jobs:
105105
run: |
106106
scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug/ota-requestor-app chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0
107107
- name: Run Framework Tests
108-
# For now disable unguarded-availability-new warnings because we
109-
# internally use APIs that we are annotating as only available on
110-
# new enough versions. Maybe we should change out deployment
111-
# target versions instead?
108+
# We want to ensure that our log upload runs on timeout, so use a timeout here shorter
109+
# than the 6-hour overall job timeout. 4.5 hours should be plenty.
110+
timeout-minutes: 270
112111
working-directory: src/darwin/Framework
113112
run: |
114113
mkdir -p /tmp/darwin/framework-tests

.github/workflows/examples-infineon.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ jobs:
3737
if: github.actor != 'restyled-io[bot]'
3838

3939
container:
40-
image: ghcr.io/project-chip/chip-build-infineon:54
40+
image: ghcr.io/project-chip/chip-build-infineon:74
41+
env:
42+
# TODO: this should probably be part of the dockerfile itself
43+
CY_TOOLS_PATHS: /opt/Tools/ModusToolbox/tools_3.2
4144
volumes:
4245
- "/tmp/bloat_reports:/tmp/bloat_reports"
4346
steps:

.github/workflows/examples-nxp.yaml

+55-1
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,60 @@ jobs:
140140
if: ${{ !env.ACT }}
141141
with:
142142
platform-name: K32W1
143+
mcxw71:
144+
name: MCXW71
145+
146+
env:
147+
BUILD_TYPE: gn_k32w
148+
149+
runs-on: ubuntu-latest
150+
if: github.actor != 'restyled-io[bot]'
151+
152+
container:
153+
image: ghcr.io/project-chip/chip-build-nxp:71
154+
volumes:
155+
- "/tmp/bloat_reports:/tmp/bloat_reports"
156+
steps:
157+
- name: Checkout
158+
uses: actions/checkout@v4
159+
- name: Checkout submodules & Bootstrap
160+
uses: ./.github/actions/checkout-submodules-and-bootstrap
161+
with:
162+
platform: nxp
163+
extra-submodule-parameters: --recursive
164+
165+
- name: Set up environment for size reports
166+
uses: ./.github/actions/setup-size-reports
167+
if: ${{ !env.ACT }}
168+
with:
169+
gh-context: ${{ toJson(github) }}
170+
171+
- name: Build examples
172+
run: |
173+
scripts/run_in_build_env.sh "\
174+
./scripts/build/build_examples.py \
175+
--target nxp-mcxw71-freertos-lighting \
176+
--target nxp-mcxw71-freertos-contact-sensor-low-power \
177+
build \
178+
--copy-artifacts-to out/artifacts \
179+
"
180+
- name: Get lighting app size stats
181+
run: |
182+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
183+
nxp mcxw71+release light \
184+
out/artifacts/nxp-mcxw71-freertos-lighting/chip-mcxw71-light-example.elf \
185+
/tmp/bloat_reports/
186+
- name: Get contact sensor size stats
187+
run: |
188+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
189+
nxp mcxw71+release contact \
190+
out/artifacts/nxp-mcxw71-freertos-contact-sensor-low-power/chip-mcxw71-contact-example.elf \
191+
/tmp/bloat_reports/
192+
- name: Uploading Size Reports
193+
uses: ./.github/actions/upload-size-reports
194+
if: ${{ !env.ACT }}
195+
with:
196+
platform-name: MCXW71
143197
rw61x:
144198
name: RW61X
145199

@@ -150,7 +204,7 @@ jobs:
150204
if: github.actor != 'restyled-io[bot]'
151205

152206
container:
153-
image: ghcr.io/project-chip/chip-build-rw61x:74
207+
image: ghcr.io/project-chip/chip-build-nxp:74
154208
volumes:
155209
- "/tmp/bloat_reports:/tmp/bloat_reports"
156210
steps:

.github/workflows/minimal-build.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ name: Minimal Build (Linux / configure)
1717
on:
1818
push:
1919
branches-ignore:
20-
- 'dependabot/**'
20+
- "dependabot/**"
2121
pull_request:
2222
merge_group:
2323

@@ -42,11 +42,11 @@ jobs:
4242
- name: Checkout submodules # but don't bootstrap!
4343
uses: ./.github/actions/checkout-submodules
4444
with:
45-
platform: linux
45+
platform: linux
4646

4747
- name: Configure and build All Clusters App
4848
run: |
49-
CC=gcc CXX=g++ scripts/configure --project=examples/all-clusters-app/linux && ./ninja-build
49+
CC=gcc CXX=g++ scripts/configure --project=examples/all-clusters-app/linux --enable-recommended=no && ./ninja-build
5050
5151
minimal-network-manager:
5252
name: Linux / configure build of network-manager-app
@@ -64,8 +64,8 @@ jobs:
6464
- name: Checkout submodules # but don't bootstrap!
6565
uses: ./.github/actions/checkout-submodules
6666
with:
67-
platform: linux
67+
platform: linux
6868

6969
- name: Configure and build Network Manager App
7070
run: |
71-
CC=gcc CXX=g++ scripts/configure --project=examples/network-manager-app/linux && ./ninja-build
71+
CC=gcc CXX=g++ scripts/configure --project=examples/network-manager-app/linux --enable-recommended=no && ./ninja-build

.github/workflows/tests.yaml

+19-6
Original file line numberDiff line numberDiff line change
@@ -475,31 +475,43 @@ jobs:
475475
mkdir objdir-clone || true
476476
477477
- name: Build Python REPL and example apps
478+
# NOTE: the data-mode-check + check-failure-die is not 100% perfect as different
479+
# encoding sizes for data that keeps changing may alter over time (e.g. anything relating to time
480+
# or resources such as packet counts or other similar counters)
481+
#
482+
# This may result in invalid errors, however for most purposes of our testing, we are unlikely to
483+
# hit such cases so we remain very strict on testing here.
478484
run: |
479485
scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv'
480486
./scripts/run_in_build_env.sh \
481487
"./scripts/build/build_examples.py \
482-
--target linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test \
488+
--target linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test-data-model-check-check-failure-die \
483489
--target linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test \
484490
--target linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test \
485491
--target linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test \
486492
--target linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test \
487493
--target linux-x64-rvc-ipv6only-no-ble-no-wifi-tsan-clang-test \
488494
--target linux-x64-network-manager-ipv6only-no-ble-no-wifi-tsan-clang-test \
495+
--target linux-x64-fabric-admin-rpc-ipv6only-clang \
496+
--target linux-x64-fabric-bridge-rpc-ipv6only-no-ble-no-wifi-clang \
497+
--target linux-x64-light-data-model-no-unique-id-ipv6only-no-ble-no-wifi-clang \
489498
--target linux-x64-python-bindings \
490499
build \
491500
--copy-artifacts-to objdir-clone \
492501
"
493502
- name: Generate an argument environment file
494503
run: |
495504
echo -n "" >/tmp/test_env.yaml
496-
echo "ALL_CLUSTERS_APP: out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app" >> /tmp/test_env.yaml
505+
echo "ALL_CLUSTERS_APP: out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test-data-model-check-check-failure-die/chip-all-clusters-app" >> /tmp/test_env.yaml
497506
echo "CHIP_LOCK_APP: out/linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-lock-app" >> /tmp/test_env.yaml
498507
echo "ENERGY_MANAGEMENT_APP: out/linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-energy-management-app" >> /tmp/test_env.yaml
499508
echo "LIT_ICD_APP: out/linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test/lit-icd-app" >> /tmp/test_env.yaml
500509
echo "CHIP_MICROWAVE_OVEN_APP: out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app" >> /tmp/test_env.yaml
501510
echo "CHIP_RVC_APP: out/linux-x64-rvc-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-rvc-app" >> /tmp/test_env.yaml
502511
echo "NETWORK_MANAGEMENT_APP: out/linux-x64-network-manager-ipv6only-no-ble-no-wifi-tsan-clang-test/matter-network-manager-app" >> /tmp/test_env.yaml
512+
echo "FABRIC_ADMIN_APP: out/linux-x64-fabric-admin-rpc-ipv6only-clang/fabric-admin" >> /tmp/test_env.yaml
513+
echo "FABRIC_BRIDGE_APP: out/linux-x64-fabric-bridge-rpc-ipv6only-no-ble-no-wifi-clang/fabric-bridge-app" >> /tmp/test_env.yaml
514+
echo "LIGHTING_APP_NO_UNIQUE_ID: out/linux-x64-light-data-model-no-unique-id-ipv6only-no-ble-no-wifi-clang/chip-lighting-app" >> /tmp/test_env.yaml
503515
echo "TRACE_APP: out/trace_data/app-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml
504516
echo "TRACE_TEST_JSON: out/trace_data/test-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml
505517
echo "TRACE_TEST_PERFETTO: out/trace_data/test-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml
@@ -509,14 +521,15 @@ jobs:
509521
mkdir -p out/trace_data
510522
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/controller/python/test/test_scripts/mobile-device-test.py'
511523
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/execute_python_tests.py --env-file /tmp/test_env.yaml --search-directory src/python_testing'
512-
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestMatterTestingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
513-
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestSpecParsingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
514-
scripts/run_in_python_env.sh out/venv './scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py'
515-
scripts/run_in_python_env.sh out/venv './src/python_testing/test_testing/test_TC_ICDM_2_1.py'
524+
scripts/run_in_python_env.sh out/venv './scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py --all-clusters out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test-data-model-check-check-failure-die/chip-all-clusters-app'
516525
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestIdChecks.py'
517526
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingDeviceType.py'
518527
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceSupport.py'
528+
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceTest.py'
519529
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestChoiceConformanceSupport.py'
530+
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestMatterTestingSupport.py'
531+
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingSupport.py'
532+
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_TC_ICDM_2_1.py'
520533
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_IDM_10_4.py'
521534
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_TC_SC_7_1.py'
522535
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/TestDecorators.py'

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ out/
1515
/src/darwin/Framework/build/
1616

1717
# Pigweed Environment
18-
.environment/
18+
.environment*/
1919
build_overrides/pigweed_environment.gni
2020

2121
# Temporary Directories
@@ -84,4 +84,3 @@ examples/*/esp32/dependencies.lock
8484

8585
# jupyter temporary files
8686
.ipynb_checkpoints
87-

.gitmodules

+16
Original file line numberDiff line numberDiff line change
@@ -329,3 +329,19 @@
329329
path = third_party/infineon/psoc6/psoc6_sdk/libs/lwip-network-interface-integration
330330
url = https://github.com/Infineon/lwip-network-interface-integration.git
331331
platforms = infineon
332+
[submodule "third_party/abseil-cpp/src"]
333+
path = third_party/abseil-cpp/src
334+
url = https://github.com/abseil/abseil-cpp.git
335+
platforms = linux,darwin
336+
[submodule "third_party/fuzztest"]
337+
path = third_party/fuzztest
338+
url = https://github.com/google/fuzztest.git
339+
platforms = linux,darwin
340+
[submodule "third_party/googletest"]
341+
path = third_party/googletest
342+
url = https://github.com/google/googletest
343+
platforms = linux,darwin
344+
[submodule "third_party/re2/src"]
345+
path = third_party/re2/src
346+
url = https://github.com/google/re2.git
347+
platforms = linux,darwin

0 commit comments

Comments
 (0)