Skip to content

Commit 1397520

Browse files
woody-applebzbarsky-apple
authored andcommitted
Rename Darwin framework (CHIP.framework) to Matter.framework (#20139)
* Renaming CHIP -> Matter * Fix ZAP style * Adding Boris' test fixes * Go back to skipping tests we used to skip. * Hopefully final rename Co-authored-by: Boris Zbarsky <[email protected]>
1 parent 36f5c28 commit 1397520

File tree

205 files changed

+73949
-50646
lines changed

Some content is hidden

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

205 files changed

+73949
-50646
lines changed

.github/workflows/darwin-tests.yaml

+57-39
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ on:
2020
workflow_dispatch:
2121

2222
concurrency:
23-
group:
24-
${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name ==
23+
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name ==
2524
'pull_request' && github.event.number) || (github.event_name ==
2625
'workflow_dispatch' && github.run_number) || github.sha }}
2726
cancel-in-progress: true
@@ -76,63 +75,82 @@ jobs:
7675
uses: actions/upload-artifact@v2
7776
if: ${{ always() }} && ${{ !env.ACT }}
7877
with:
79-
name:
80-
bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
78+
name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
8179
path: |
8280
.environment/gn_out/.ninja_log
8381
.environment/pigweed-venv/*.log
84-
- name: Build Apps
85-
timeout-minutes: 60
82+
- name: Delete Defaults
83+
run: defaults delete com.apple.dt.xctest.tool
84+
continue-on-error: true
85+
- name: Run macOS Build
86+
timeout-minutes: 40
87+
# Enable -Werror by hand here, because the Xcode config can't
88+
# enable it for various reasons. Keep whatever Xcode settings
89+
# for OTHER_CFLAGS exist by using ${inherited}.
90+
#
91+
# Disable -Wmacro-redefined because CHIP_DEVICE_CONFIG_ENABLE_MDNS
92+
# seems to be unconditionally defined in CHIPDeviceBuildConfig.h,
93+
# which is apparently being included after CHIPDeviceConfig.h.
94+
run: xcodebuild -target "Matter" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wno-macro-redefined'
95+
working-directory: src/darwin/Framework
96+
- name: Copying Framework to Temporary Path
97+
continue-on-error: true
8698
run: |
87-
./scripts/run_in_build_env.sh \
88-
"./scripts/build/build_examples.py \
89-
--target darwin-x64-darwin-framework-tool-${BUILD_VARIANT} \
90-
--target darwin-x64-all-clusters-${BUILD_VARIANT} \
91-
--target darwin-x64-lock-${BUILD_VARIANT} \
92-
--target darwin-x64-ota-provider-${BUILD_VARIANT} \
93-
--target darwin-x64-ota-requestor-${BUILD_VARIANT} \
94-
--target darwin-x64-tv-app-${BUILD_VARIANT} \
95-
build \
96-
--copy-artifacts-to objdir-clone \
97-
"
98-
- name: Run Tests
99-
timeout-minutes: 60
100-
run: |
101-
./scripts/run_in_build_env.sh \
102-
"./scripts/tests/run_test_suite.py \
103-
--chip-tool ./out/darwin-x64-darwin-framework-tool-${BUILD_VARIANT}/darwin-framework-tool \
104-
--target-skip-glob '{TestGroupMessaging}' \
105-
run \
106-
--iterations 1 \
107-
--test-timeout-seconds 120 \
108-
--all-clusters-app ./out/darwin-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \
109-
--lock-app ./out/darwin-x64-lock-${BUILD_VARIANT}/chip-lock-app \
110-
--ota-provider-app ./out/darwin-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \
111-
--ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \
112-
--tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \
113-
"
99+
mkdir -p /tmp/macos_framework_output
100+
ls -la /Users/runner/work/connectedhomeip/connectedhomeip/src/darwin/Framework/build/Release/
101+
mv /Users/runner/work/connectedhomeip/connectedhomeip/src/darwin/Framework/build/Release/Matter.framework /tmp/macos_framework_output
102+
ls -la /tmp/macos_framework_output
103+
# Disabling for now
104+
#
105+
# - name: Build Apps
106+
# timeout-minutes: 60
107+
# run: |
108+
# ./scripts/run_in_build_env.sh \
109+
# "./scripts/build/build_examples.py \
110+
# --target darwin-x64-darwin-framework-tool-${BUILD_VARIANT} \
111+
# --target darwin-x64-all-clusters-${BUILD_VARIANT} \
112+
# --target darwin-x64-lock-${BUILD_VARIANT} \
113+
# --target darwin-x64-ota-provider-${BUILD_VARIANT} \
114+
# --target darwin-x64-ota-requestor-${BUILD_VARIANT} \
115+
# --target darwin-x64-tv-app-${BUILD_VARIANT} \
116+
# build \
117+
# --copy-artifacts-to objdir-clone \
118+
# "
119+
# - name: Run Tests
120+
# timeout-minutes: 60
121+
# run: |
122+
# ./scripts/run_in_build_env.sh \
123+
# "./scripts/tests/run_test_suite.py \
124+
# --chip-tool ./out/darwin-x64-darwin-framework-tool-${BUILD_VARIANT}/darwin-framework-tool \
125+
# --target-skip-glob '{TestGroupMessaging}' \
126+
# run \
127+
# --iterations 1 \
128+
# --test-timeout-seconds 120 \
129+
# --all-clusters-app ./out/darwin-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \
130+
# --lock-app ./out/darwin-x64-lock-${BUILD_VARIANT}/chip-lock-app \
131+
# --ota-provider-app ./out/darwin-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \
132+
# --ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \
133+
# --tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \
134+
# "
114135
- name: Uploading core files
115136
uses: actions/upload-artifact@v2
116137
if: ${{ failure() }} && ${{ !env.ACT }}
117138
with:
118-
name:
119-
crash-core-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
139+
name: crash-core-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
120140
path: /cores/
121141
# Cores are big; don't hold on to them too long.
122142
retention-days: 5
123143
- name: Uploading diagnostic logs
124144
uses: actions/upload-artifact@v2
125145
if: ${{ failure() }} && ${{ !env.ACT }}
126146
with:
127-
name:
128-
crash-log-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
147+
name: crash-log-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
129148
path: ~/Library/Logs/DiagnosticReports/
130149
- name: Uploading objdir for debugging
131150
uses: actions/upload-artifact@v2
132151
if: ${{ failure() }} && ${{ !env.ACT }}
133152
with:
134-
name:
135-
crash-objdir-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
153+
name: crash-objdir-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
136154
path: objdir-clone/
137155
# objdirs are big; don't hold on to them too long.
138156
retention-days: 5

.github/workflows/darwin.yaml

+17-9
Original file line numberDiff line numberDiff line change
@@ -66,35 +66,43 @@ jobs:
6666
- name: Run iOS Build Debug
6767
timeout-minutes: 30
6868
working-directory: src/darwin/Framework
69-
run: xcodebuild -target "CHIP" -sdk iphoneos
69+
run: xcodebuild -target "Matter" -sdk iphoneos
7070
- name: Run iOS Build Release
7171
timeout-minutes: 30
7272
working-directory: src/darwin/Framework
73-
run: xcodebuild -target "CHIP" -sdk iphoneos -configuration Release
73+
run: xcodebuild -target "Matter" -sdk iphoneos -configuration Release
7474
- name: Clean Build
7575
run: xcodebuild clean
7676
working-directory: src/darwin/Framework
7777
- name: Delete Defaults
7878
run: defaults delete com.apple.dt.xctest.tool
7979
continue-on-error: true
8080
- name: Run macOS Build
81-
timeout-minutes: 30
81+
timeout-minutes: 40
8282
# Enable -Werror by hand here, because the Xcode config can't
8383
# enable it for various reasons. Keep whatever Xcode settings
8484
# for OTHER_CFLAGS exist by using ${inherited}.
8585
#
8686
# Disable -Wmacro-redefined because CHIP_DEVICE_CONFIG_ENABLE_MDNS
8787
# seems to be unconditionally defined in CHIPDeviceBuildConfig.h,
8888
# which is apparently being included after CHIPDeviceConfig.h.
89-
run: xcodebuild -target "CHIP" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wno-macro-redefined'
89+
run: xcodebuild -target "Matter" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wno-macro-redefined'
9090
working-directory: src/darwin/Framework
91+
- name: Copying Framework to Temporary Path
92+
continue-on-error: true
93+
run: |
94+
mkdir -p /tmp/macos_framework_output
95+
ls -la /Users/runner/work/connectedhomeip/connectedhomeip/src/darwin/Framework/build/Release/
96+
mv /Users/runner/work/connectedhomeip/connectedhomeip/src/darwin/Framework/build/Release/Matter.framework /tmp/macos_framework_output
97+
ls -la /tmp/macos_framework_output
9198
- name: Clean Build
9299
run: xcodebuild clean
93100
working-directory: src/darwin/Framework
94-
- name: Build example darwin-framework-tool
95-
timeout-minutes: 15
96-
run: |
97-
scripts/examples/gn_build_example.sh examples/darwin-framework-tool out/debug chip_config_network_layer_ble=false is_asan=true
101+
# Disabling for now
102+
# - name: Build example darwin-framework-tool
103+
# timeout-minutes: 15
104+
# run: |
105+
# scripts/examples/gn_build_example.sh examples/darwin-framework-tool out/debug chip_config_network_layer_ble=false is_asan=true
98106
- name: Build example All Clusters Server
99107
timeout-minutes: 15
100108
run: |
@@ -115,7 +123,7 @@ jobs:
115123
run: |
116124
mkdir -p /tmp/darwin/framework-tests
117125
../../../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) &
118-
xcodebuild test -target "CHIP" -scheme "CHIP Framework Tests" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wno-incomplete-umbrella' > >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2)
126+
xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wno-incomplete-umbrella' > >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2)
119127
working-directory: src/darwin/Framework
120128
- name: Uploading log files
121129
uses: actions/upload-artifact@v2

.github/workflows/tests.yaml

+27-36
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ jobs:
177177
.environment/gn_out/.ninja_log
178178
.environment/pigweed-venv/*.log
179179
- name: Build Apps
180-
timeout-minutes: 40
180+
timeout-minutes: 60
181181
run: |
182182
./scripts/run_in_build_env.sh \
183183
"./scripts/build/build_examples.py \
@@ -240,17 +240,15 @@ jobs:
240240

241241
container:
242242
image: connectedhomeip/chip-build:0.5.79
243-
options:
244-
--privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
243+
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
245244
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
246245

247246
steps:
248247
- name: Checkout
249248
uses: actions/checkout@v2
250249
- name: Checkout submodules
251250
run: scripts/checkout_submodules.py --shallow --platform linux
252-
- name:
253-
Try to ensure the directories for core dumping exist and we
251+
- name: Try to ensure the directories for core dumping exist and we
254252
can write them.
255253
run: |
256254
mkdir /tmp/cores || true
@@ -263,41 +261,38 @@ jobs:
263261
uses: actions/upload-artifact@v2
264262
if: ${{ always() }} && ${{ !env.ACT }}
265263
with:
266-
name:
267-
bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }}
264+
name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }}
268265
path: |
269266
.environment/gn_out/.ninja_log
270267
.environment/pigweed-venv/*.log
271268
- name: Build Python REPL and example apps
272269
timeout-minutes: 50
273270
run: |
274-
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
275-
./scripts/run_in_build_env.sh \
276-
"./scripts/build/build_examples.py \
277-
--target linux-x64-all-clusters-no-ble-no-wifi-tsan-clang-test \
278-
--target linux-x64-python-bindings \
279-
build \
280-
--copy-artifacts-to objdir-clone \
281-
"
271+
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
272+
./scripts/run_in_build_env.sh \
273+
"./scripts/build/build_examples.py \
274+
--target linux-x64-all-clusters-no-ble-no-wifi-tsan-clang-test \
275+
--target linux-x64-python-bindings \
276+
build \
277+
--copy-artifacts-to objdir-clone \
278+
"
282279
- name: Run Tests
283280
timeout-minutes: 40
284281
run: |
285-
scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --script-args "--log-level INFO -t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"'
282+
scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --script-args "--log-level INFO -t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"'
286283
- name: Uploading core files
287284
uses: actions/upload-artifact@v2
288285
if: ${{ failure() }} && ${{ !env.ACT }}
289286
with:
290-
name:
291-
crash-core-linux-python-repl
287+
name: crash-core-linux-python-repl
292288
path: /tmp/cores/
293289
# Cores are big; don't hold on to them too long.
294290
retention-days: 5
295291
- name: Uploading objdir for debugging
296292
uses: actions/upload-artifact@v2
297293
if: ${{ failure() }} && ${{ !env.ACT }}
298294
with:
299-
name:
300-
crash-objdir-linux-python-repl
295+
name: crash-objdir-linux-python-repl
301296
path: objdir-clone/
302297
# objdirs are big; don't hold on to them too long.
303298
retention-days: 5
@@ -346,47 +341,43 @@ jobs:
346341
uses: actions/upload-artifact@v2
347342
if: ${{ always() }} && ${{ !env.ACT }}
348343
with:
349-
name:
350-
bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
344+
name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
351345
path: |
352346
.environment/gn_out/.ninja_log
353347
.environment/pigweed-venv/*.log
354348
- name: Build Python REPL and example apps
355349
timeout-minutes: 50
356350
run: |
357-
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
358-
./scripts/run_in_build_env.sh \
359-
"./scripts/build/build_examples.py \
360-
--target darwin-x64-all-clusters-${BUILD_VARIANT}-test \
361-
build \
362-
--copy-artifacts-to objdir-clone \
363-
"
351+
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
352+
./scripts/run_in_build_env.sh \
353+
"./scripts/build/build_examples.py \
354+
--target darwin-x64-all-clusters-${BUILD_VARIANT}-test \
355+
build \
356+
--copy-artifacts-to objdir-clone \
357+
"
364358
- name: Run Tests
365359
timeout-minutes: 30
366360
run: |
367-
scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/darwin-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 3840 --interface-id -1" --script-args "-t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"'
361+
scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/darwin-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 3840 --interface-id -1" --script-args "-t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"'
368362
- name: Uploading core files
369363
uses: actions/upload-artifact@v2
370364
if: ${{ failure() }} && ${{ !env.ACT }}
371365
with:
372-
name:
373-
crash-core-darwin-python-repl
366+
name: crash-core-darwin-python-repl
374367
path: /cores/
375368
# Cores are big; don't hold on to them too long.
376369
retention-days: 5
377370
- name: Uploading diagnostic logs
378371
uses: actions/upload-artifact@v2
379372
if: ${{ failure() }} && ${{ !env.ACT }}
380373
with:
381-
name:
382-
crash-log-darwin-python-repl
374+
name: crash-log-darwin-python-repl
383375
path: ~/Library/Logs/DiagnosticReports/
384376
- name: Uploading objdir for debugging
385377
uses: actions/upload-artifact@v2
386378
if: ${{ failure() }} && ${{ !env.ACT }}
387379
with:
388-
name:
389-
crash-objdir-darwin-python-repl
380+
name: crash-objdir-darwin-python-repl
390381
path: objdir-clone/
391382
# objdirs are big; don't hold on to them too long.
392383
retention-days: 5

.restyled.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ exclude:
7272
- "scripts/idl/tests/outputs/**/*" # Matches generated output 1:1
7373
- "examples/chef/sample_app_util/test_files/*.yaml"
7474
- "examples/chef/zzz_generated/**/*"
75+
- "src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc.mm" # https://github.com/project-chip/connectedhomeip/issues/20236
7576

7677

7778
changed_paths:

BUILD.gn

+3-3
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
226226
enable_standalone_chip_tool_build =
227227
enable_default_builds && host_os != "win"
228228

229-
# Build the darwin-framework-tool example.
230-
enable_standalone_chip_tool_darwin_build =
231-
enable_default_builds && host_os == "mac"
229+
# Build the darwin-framework-tool example. By default this is off, because
230+
# it requires a preceding XCode build of the framework.
231+
enable_standalone_chip_tool_darwin_build = false
232232

233233
# Build the shell example.
234234
enable_standalone_shell_build = enable_default_builds && host_os != "win"

0 commit comments

Comments
 (0)