Skip to content

Commit 1217603

Browse files
committed
Merge branch 'master' of https://github.com/project-chip/connectedhomeip into bugfix/rs911x_ble_tx_timer_issue
2 parents e07c862 + c644692 commit 1217603

File tree

411 files changed

+21938
-5982
lines changed

Some content is hidden

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

411 files changed

+21938
-5982
lines changed

.github/workflows/bloat_check.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
name: Bloat Check
1616
on:
17+
workflow_dispatch:
1718
schedule:
1819
- cron: "*/5 * * * *"
1920

@@ -33,7 +34,7 @@ jobs:
3334
runs-on: ubuntu-latest
3435

3536
container:
36-
image: ghcr.io/project-chip/chip-build:35
37+
image: ghcr.io/project-chip/chip-build:41
3738

3839
steps:
3940
- name: Checkout
@@ -49,4 +50,4 @@ jobs:
4950
--github-limit-artifacts 500 \
5051
--github-limit-comments 20 \
5152
--github-repository project-chip/connectedhomeip \
52-
--github-api-token "${{ secrets.GITHUB_TOKEN }}"
53+
--github-api-token "${{ secrets.BLOAT_REPORT }}"

.github/workflows/build.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
if: github.actor != 'restyled-io[bot]'
4141

4242
container:
43-
image: ghcr.io/project-chip/chip-build:35
43+
image: ghcr.io/project-chip/chip-build:41
4444
volumes:
4545
- "/:/runner-root-volume"
4646
- "/tmp/log_output:/tmp/test_logs"
@@ -136,7 +136,7 @@ jobs:
136136
if: github.actor != 'restyled-io[bot]'
137137

138138
container:
139-
image: ghcr.io/project-chip/chip-build:35
139+
image: ghcr.io/project-chip/chip-build:41
140140
volumes:
141141
- "/:/runner-root-volume"
142142
- "/tmp/log_output:/tmp/test_logs"
@@ -279,7 +279,7 @@ jobs:
279279
if: github.actor != 'restyled-io[bot]'
280280

281281
container:
282-
image: ghcr.io/project-chip/chip-build:35
282+
image: ghcr.io/project-chip/chip-build:41
283283
volumes:
284284
- "/:/runner-root-volume"
285285
- "/tmp/log_output:/tmp/test_logs"
@@ -340,7 +340,7 @@ jobs:
340340
if: github.actor != 'restyled-io[bot]'
341341

342342
container:
343-
image: ghcr.io/project-chip/chip-build:35
343+
image: ghcr.io/project-chip/chip-build:41
344344
volumes:
345345
- "/:/runner-root-volume"
346346
- "/tmp/log_output:/tmp/test_logs"
@@ -449,7 +449,7 @@ jobs:
449449
if: github.actor != 'restyled-io[bot]'
450450

451451
container:
452-
image: ghcr.io/project-chip/chip-build:35
452+
image: ghcr.io/project-chip/chip-build:41
453453
volumes:
454454
- "/:/runner-root-volume"
455455
- "/tmp/log_output:/tmp/test_logs"

.github/workflows/chef.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
if: github.actor != 'restyled-io[bot]'
3434

3535
container:
36-
image: ghcr.io/project-chip/chip-build:35
36+
image: ghcr.io/project-chip/chip-build:41
3737
options: --user root
3838

3939
steps:
@@ -54,7 +54,7 @@ jobs:
5454
if: github.actor != 'restyled-io[bot]'
5555

5656
container:
57-
image: ghcr.io/project-chip/chip-build-esp32:35
57+
image: ghcr.io/project-chip/chip-build-esp32:41
5858
options: --user root
5959

6060
steps:
@@ -75,7 +75,7 @@ jobs:
7575
if: github.actor != 'restyled-io[bot]'
7676

7777
container:
78-
image: ghcr.io/project-chip/chip-build-nrf-platform:35
78+
image: ghcr.io/project-chip/chip-build-nrf-platform:41
7979
options: --user root
8080

8181
steps:
@@ -96,7 +96,7 @@ jobs:
9696
if: github.actor != 'restyled-io[bot]'
9797

9898
container:
99-
image: ghcr.io/project-chip/chip-build-telink:35
99+
image: ghcr.io/project-chip/chip-build-telink:41
100100
options: --user root
101101

102102
steps:

.github/workflows/cirque.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
# need to run with privilege, which isn't supported by job.XXX.contaner
4141
# https://github.com/actions/container-action/issues/2
4242
# container:
43-
# image: ghcr.io/project-chip/chip-build-cirque:35
43+
# image: ghcr.io/project-chip/chip-build-cirque:41
4444
# volumes:
4545
# - "/tmp:/tmp"
4646
# - "/dev/pts:/dev/pts"

.github/workflows/darwin.yaml

+84-72
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,25 @@ concurrency:
2626

2727
env:
2828
CHIP_NO_LOG_TIMESTAMPS: true
29-
30-
jobs:
31-
darwin:
32-
name: Build Darwin
3329

30+
jobs:
31+
framework:
32+
name: Build framework
3433
if: github.actor != 'restyled-io[bot]'
3534
runs-on: macos-latest
36-
35+
strategy:
36+
matrix:
37+
options: # We don't need a full matrix
38+
- flavor: macos-release-availability
39+
arguments: -sdk macosx -configuration Release OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-unguarded-availability-new'
40+
- flavor: ios-release
41+
arguments: -sdk iphoneos -configuration Release OTHER_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
42+
- flavor: ios-debug
43+
arguments: -sdk iphoneos -configuration Debug OTHER_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
44+
- flavor: tvos-debug
45+
arguments: -sdk appletvos -configuration Debug OTHER_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
46+
- flavor: watchos-debug
47+
arguments: -sdk watchos -configuration Debug OTHER_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
3748
steps:
3849
- name: Checkout
3950
uses: actions/checkout@v4
@@ -43,57 +54,41 @@ jobs:
4354
uses: ./.github/actions/checkout-submodules-and-bootstrap
4455
with:
4556
platform: darwin
57+
bootstrap-log-name: bootstrap-logs-framework-${{ matrix.options.flavor }}
4658
- name: Block zap-cli from being used
47-
# xcodebuild is NOT expected to require zap-cli
48-
run: scripts/run_in_build_env.sh 'D=$(dirname $(which zap-cli)) && mv $D/zap-cli $D/zap-cli.moved'
49-
- name: Validate zap-cli is NOT available
50-
# run_in_build_env.sh is used to ensure PATH is set to something that would otherwise find zap-cli
51-
run: scripts/run_in_build_env.sh '(zap-cli --version && exit 1) || exit 0'
52-
- name: Run watchOS Build Debug
53-
working-directory: src/darwin/Framework
54-
# Disable availability annotations, since we are not building a system
55-
# Matter.framework.
56-
run: xcodebuild -target "Matter" -sdk watchos -configuration Debug GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
57-
- name: Run tvOS Build Debug
58-
working-directory: src/darwin/Framework
59-
# Disable availability annotations, since we are not building a system
60-
# Matter.framework.
61-
run: xcodebuild -target "Matter" -sdk appletvos -configuration Debug GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
62-
- name: Run iOS Build Debug
63-
working-directory: src/darwin/Framework
64-
# Disable availability annotations, since we are not building a system
65-
# Matter.framework.
66-
run: xcodebuild -target "Matter" -sdk iphoneos -configuration Debug GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
67-
- name: Run iOS Build Release
68-
working-directory: src/darwin/Framework
69-
# Disable availability annotations, since we are not building a system
70-
# Matter.framework.
71-
run: xcodebuild -target "Matter" -sdk iphoneos -configuration Release GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
72-
- name: Clean Build
73-
run: xcodebuild clean
74-
working-directory: src/darwin/Framework
75-
- name: Delete Defaults
76-
run: defaults delete com.apple.dt.xctest.tool
77-
continue-on-error: true
78-
- name: Run macOS Build
79-
# Enable -Werror by hand here, because the Xcode config can't
80-
# enable it for various reasons. Keep whatever Xcode settings
81-
# for OTHER_CFLAGS exist by using ${inherited}.
82-
#
83-
# Enable -Wconversion by hand as well, because it seems to not be
84-
# enabled by default in the Xcode config.
85-
#
86-
# Disable availability annotations, since we are not building a system
87-
# Matter.framework.
88-
run: xcodebuild -target "Matter" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
89-
working-directory: src/darwin/Framework
90-
- name: Clean Build
91-
run: xcodebuild clean
59+
run: |
60+
# Framework builds are NOT expected to require zap-cli
61+
scripts/run_in_build_env.sh 'D=$(dirname $(which zap-cli)) && mv $D/zap-cli $D/zap-cli.moved'
62+
# run_in_build_env.sh is used to ensure PATH is set to something that would otherwise find zap-cli
63+
scripts/run_in_build_env.sh '(zap-cli --version && exit 1) || exit 0'
64+
- name: Build
9265
working-directory: src/darwin/Framework
93-
- name: Make zap-cli work again
94-
run: scripts/run_in_build_env.sh 'D=$(dirname $(which zap-cli.moved)) && mv $D/zap-cli.moved $D/zap-cli'
95-
- name: Validate zap-cli is again available
96-
run: scripts/run_in_build_env.sh 'zap-cli --version'
66+
run: xcodebuild -target "Matter" ${{ matrix.options.arguments }}
67+
68+
tests:
69+
name: Run framework tests
70+
if: github.actor != 'restyled-io[bot]'
71+
runs-on: macos-latest
72+
strategy:
73+
matrix:
74+
options: # We don't need a full matrix
75+
- flavor: asan
76+
arguments: -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES
77+
- flavor: asan-global-storage
78+
arguments: -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES
79+
defines: MTR_PER_CONTROLLER_STORAGE_ENABLED=0
80+
- flavor: tsan
81+
arguments: -enableThreadSanitizer YES
82+
steps:
83+
- name: Checkout
84+
uses: actions/checkout@v4
85+
- name: Setup Environment
86+
run: brew install python@3.9
87+
- name: Checkout submodules & Bootstrap
88+
uses: ./.github/actions/checkout-submodules-and-bootstrap
89+
with:
90+
platform: darwin
91+
bootstrap-log-name: bootstrap-logs-framework-${{ matrix.options.flavor }}
9792
- name: Build example All Clusters Server
9893
run: |
9994
scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug chip_config_network_layer_ble=false
@@ -103,40 +98,57 @@ jobs:
10398
- name: Build example OTA Requestor
10499
run: |
105100
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
106-
- name: Delete Defaults
107-
run: defaults delete com.apple.dt.xctest.tool
108-
continue-on-error: true
109101
- name: Run Framework Tests
110102
# For now disable unguarded-availability-new warnings because we
111103
# internally use APIs that we are annotating as only available on
112104
# new enough versions. Maybe we should change out deployment
113105
# target versions instead?
106+
working-directory: src/darwin/Framework
114107
run: |
115108
mkdir -p /tmp/darwin/framework-tests
116-
../../../out/debug/chip-all-clusters-app --interface-id -1 > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) &
109+
echo "This is a simple log" > /tmp/darwin/framework-tests/end_user_support_log.txt
110+
../../../out/debug/chip-all-clusters-app --interface-id -1 --end_user_support_log /tmp/darwin/framework-tests/end_user_support_log.txt > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) &
117111
../../../out/debug/chip-all-clusters-app --interface-id -1 --dac_provider ../../../credentials/development/commissioner_dut/struct_cd_origin_pid_vid_correct/test_case_vector.json --product-id 32768 --discriminator 3839 --secured-device-port 5539 --KVS /tmp/chip-all-clusters-app-kvs2 > >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid-err.log >&2) &
118-
# Disable BLE (CHIP_IS_BLE=NO) because the app does not have the permission to use it and that may crash the CI.
119112
120-
TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion' CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'> >(tee /tmp/darwin/framework-tests/darwin-tests-asan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-err.log >&2)
121-
# And the same thing, but with MTR_PER_CONTROLLER_STORAGE_ENABLED turned off, so we test that it does not break for now.
122-
TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion' CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1 MTR_PER_CONTROLLER_STORAGE_ENABLED=0' > >(tee /tmp/darwin/framework-tests/darwin-tests-asan-controller-storage.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-controller-storage-err.log >&2)
123-
# And the same thing, but with MTR_NO_AVAILABILITY not turned on. This requires -Wno-unguarded-availability-new to avoid availability errors.
124-
TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-unguarded-availability-new' CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited}' > >(tee /tmp/darwin/framework-tests/darwin-tests-asan-with-availability-annotations.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-with-availability-annotations-err.log >&2)
113+
export TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1
125114
126-
xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableThreadSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion' CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1' > >(tee /tmp/darwin/framework-tests/darwin-tests-tsan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-tsan-err.log >&2)
127-
working-directory: src/darwin/Framework
128-
- name: Build Matter TV Casting Bridge
129-
run: |
130-
xcodebuild -target "MatterTvCastingBridge" -sdk iphoneos
131-
working-directory: examples/tv-casting-app/darwin/MatterTvCastingBridge
115+
# Disable BLE (CHIP_IS_BLE=NO) because the app does not have the permission to use it and that may crash the CI.
116+
xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx ${{ matrix.options.arguments }} \
117+
OTHER_CFLAGS='${inherited} -Werror -Wconversion' CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1 ${{ matrix.options.defines }}' \
118+
> >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2)
132119
- name: Collect crash logs
133120
run: |
134121
mkdir -p /tmp/darwin/framework-tests
135122
find ~/Library/Developer/Xcode/DerivedData /Library/Logs/DiagnosticReports -name '*.ips' -print0 | xargs -0 -J % cp % /tmp/darwin/framework-tests
136123
- name: Uploading log files
137124
uses: actions/upload-artifact@v4
138-
if: ${{ failure() && !env.ACT }}
125+
if: failure() && !env.ACT
139126
with:
140-
name: darwin-framework-test-logs
127+
name: darwin-framework-test-logs-${{ matrix.options.flavor }}
141128
path: /tmp/darwin/framework-tests
142129
retention-days: 5
130+
131+
tv-casting-bridge:
132+
name: Build TV Casting Bridge example
133+
if: github.actor != 'restyled-io[bot]'
134+
runs-on: macos-latest
135+
steps:
136+
- name: Checkout
137+
uses: actions/checkout@v4
138+
- name: Setup Environment
139+
run: brew install python@3.9
140+
- name: Checkout submodules & Bootstrap
141+
uses: ./.github/actions/checkout-submodules-and-bootstrap
142+
with:
143+
platform: darwin
144+
- name: Build
145+
working-directory: examples/tv-casting-app/darwin/MatterTvCastingBridge
146+
run: xcodebuild -target "MatterTvCastingBridge" -sdk iphoneos
147+
148+
darwin:
149+
name: Build Darwin # Matches the previous monolithic build that's marked "required" for PRs
150+
needs: [ framework, tests ]
151+
runs-on: macos-latest
152+
steps:
153+
- name: Done
154+
run: 'true' # nothing to do

.github/workflows/doxygen.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181

8282
runs-on: ubuntu-latest
8383
container:
84-
image: ghcr.io/project-chip/chip-build-doxygen:35
84+
image: ghcr.io/project-chip/chip-build-doxygen:41
8585

8686
if: github.actor != 'restyled-io[bot]'
8787

.github/workflows/examples-ameba.yaml

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

3838
container:
39-
image: ghcr.io/project-chip/chip-build-ameba:35
39+
image: ghcr.io/project-chip/chip-build-ameba:41
4040
options: --user root
4141

4242
steps:

.github/workflows/examples-asr.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
if: github.actor != 'restyled-io[bot]'
3535

3636
container:
37-
image: ghcr.io/project-chip/chip-build-asr:35
37+
image: ghcr.io/project-chip/chip-build-asr:41
3838
options: --user root
3939

4040
steps:

.github/workflows/examples-bouffalolab.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
if: github.actor != 'restyled-io[bot]'
3636

3737
container:
38-
image: ghcr.io/project-chip/chip-build-bouffalolab:35
38+
image: ghcr.io/project-chip/chip-build-bouffalolab:41
3939
volumes:
4040
- "/tmp/bloat_reports:/tmp/bloat_reports"
4141
steps:

.github/workflows/examples-cc13x2x7_26x2x7.yaml

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

3838
container:
39-
image: ghcr.io/project-chip/chip-build-ti:35
39+
image: ghcr.io/project-chip/chip-build-ti:41
4040
volumes:
4141
- "/tmp/bloat_reports:/tmp/bloat_reports"
4242
steps:

.github/workflows/examples-cc32xx.yaml

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

3939
container:
40-
image: ghcr.io/project-chip/chip-build-ti:35
40+
image: ghcr.io/project-chip/chip-build-ti:41
4141
volumes:
4242
- "/tmp/bloat_reports:/tmp/bloat_reports"
4343
steps:

.github/workflows/examples-efr32.yaml

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

4040
container:
41-
image: ghcr.io/project-chip/chip-build-efr32:36
41+
image: ghcr.io/project-chip/chip-build-efr32:41
4242
volumes:
4343
- "/tmp/bloat_reports:/tmp/bloat_reports"
4444
steps:

0 commit comments

Comments
 (0)