Skip to content

Commit

Permalink
Rename Darwin framework (CHIP.framework) to Matter.framework (#20139)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
woody-apple and bzbarsky-apple authored Jul 2, 2022
1 parent b78a6e6 commit f5c12c9
Show file tree
Hide file tree
Showing 205 changed files with 73,949 additions and 50,646 deletions.
96 changes: 57 additions & 39 deletions .github/workflows/darwin-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ on:
workflow_dispatch:

concurrency:
group:
${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name ==
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name ==
'pull_request' && github.event.number) || (github.event_name ==
'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true
Expand Down Expand Up @@ -76,63 +75,82 @@ jobs:
uses: actions/upload-artifact@v2
if: ${{ always() }} && ${{ !env.ACT }}
with:
name:
bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Build Apps
timeout-minutes: 60
- name: Delete Defaults
run: defaults delete com.apple.dt.xctest.tool
continue-on-error: true
- name: Run macOS Build
timeout-minutes: 40
# Enable -Werror by hand here, because the Xcode config can't
# enable it for various reasons. Keep whatever Xcode settings
# for OTHER_CFLAGS exist by using ${inherited}.
#
# Disable -Wmacro-redefined because CHIP_DEVICE_CONFIG_ENABLE_MDNS
# seems to be unconditionally defined in CHIPDeviceBuildConfig.h,
# which is apparently being included after CHIPDeviceConfig.h.
run: xcodebuild -target "Matter" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wno-macro-redefined'
working-directory: src/darwin/Framework
- name: Copying Framework to Temporary Path
continue-on-error: true
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target darwin-x64-darwin-framework-tool-${BUILD_VARIANT} \
--target darwin-x64-all-clusters-${BUILD_VARIANT} \
--target darwin-x64-lock-${BUILD_VARIANT} \
--target darwin-x64-ota-provider-${BUILD_VARIANT} \
--target darwin-x64-ota-requestor-${BUILD_VARIANT} \
--target darwin-x64-tv-app-${BUILD_VARIANT} \
build \
--copy-artifacts-to objdir-clone \
"
- name: Run Tests
timeout-minutes: 60
run: |
./scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
--chip-tool ./out/darwin-x64-darwin-framework-tool-${BUILD_VARIANT}/darwin-framework-tool \
--target-skip-glob '{TestGroupMessaging}' \
run \
--iterations 1 \
--test-timeout-seconds 120 \
--all-clusters-app ./out/darwin-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \
--lock-app ./out/darwin-x64-lock-${BUILD_VARIANT}/chip-lock-app \
--ota-provider-app ./out/darwin-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \
--ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \
--tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \
"
mkdir -p /tmp/macos_framework_output
ls -la /Users/runner/work/connectedhomeip/connectedhomeip/src/darwin/Framework/build/Release/
mv /Users/runner/work/connectedhomeip/connectedhomeip/src/darwin/Framework/build/Release/Matter.framework /tmp/macos_framework_output
ls -la /tmp/macos_framework_output
# Disabling for now
#
# - name: Build Apps
# timeout-minutes: 60
# run: |
# ./scripts/run_in_build_env.sh \
# "./scripts/build/build_examples.py \
# --target darwin-x64-darwin-framework-tool-${BUILD_VARIANT} \
# --target darwin-x64-all-clusters-${BUILD_VARIANT} \
# --target darwin-x64-lock-${BUILD_VARIANT} \
# --target darwin-x64-ota-provider-${BUILD_VARIANT} \
# --target darwin-x64-ota-requestor-${BUILD_VARIANT} \
# --target darwin-x64-tv-app-${BUILD_VARIANT} \
# build \
# --copy-artifacts-to objdir-clone \
# "
# - name: Run Tests
# timeout-minutes: 60
# run: |
# ./scripts/run_in_build_env.sh \
# "./scripts/tests/run_test_suite.py \
# --chip-tool ./out/darwin-x64-darwin-framework-tool-${BUILD_VARIANT}/darwin-framework-tool \
# --target-skip-glob '{TestGroupMessaging}' \
# run \
# --iterations 1 \
# --test-timeout-seconds 120 \
# --all-clusters-app ./out/darwin-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \
# --lock-app ./out/darwin-x64-lock-${BUILD_VARIANT}/chip-lock-app \
# --ota-provider-app ./out/darwin-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \
# --ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \
# --tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \
# "
- name: Uploading core files
uses: actions/upload-artifact@v2
if: ${{ failure() }} && ${{ !env.ACT }}
with:
name:
crash-core-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
name: crash-core-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
path: /cores/
# Cores are big; don't hold on to them too long.
retention-days: 5
- name: Uploading diagnostic logs
uses: actions/upload-artifact@v2
if: ${{ failure() }} && ${{ !env.ACT }}
with:
name:
crash-log-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
name: crash-log-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
path: ~/Library/Logs/DiagnosticReports/
- name: Uploading objdir for debugging
uses: actions/upload-artifact@v2
if: ${{ failure() }} && ${{ !env.ACT }}
with:
name:
crash-objdir-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
name: crash-objdir-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
path: objdir-clone/
# objdirs are big; don't hold on to them too long.
retention-days: 5
26 changes: 17 additions & 9 deletions .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,35 +66,43 @@ jobs:
- name: Run iOS Build Debug
timeout-minutes: 30
working-directory: src/darwin/Framework
run: xcodebuild -target "CHIP" -sdk iphoneos
run: xcodebuild -target "Matter" -sdk iphoneos
- name: Run iOS Build Release
timeout-minutes: 30
working-directory: src/darwin/Framework
run: xcodebuild -target "CHIP" -sdk iphoneos -configuration Release
run: xcodebuild -target "Matter" -sdk iphoneos -configuration Release
- name: Clean Build
run: xcodebuild clean
working-directory: src/darwin/Framework
- name: Delete Defaults
run: defaults delete com.apple.dt.xctest.tool
continue-on-error: true
- name: Run macOS Build
timeout-minutes: 30
timeout-minutes: 40
# Enable -Werror by hand here, because the Xcode config can't
# enable it for various reasons. Keep whatever Xcode settings
# for OTHER_CFLAGS exist by using ${inherited}.
#
# Disable -Wmacro-redefined because CHIP_DEVICE_CONFIG_ENABLE_MDNS
# seems to be unconditionally defined in CHIPDeviceBuildConfig.h,
# which is apparently being included after CHIPDeviceConfig.h.
run: xcodebuild -target "CHIP" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wno-macro-redefined'
run: xcodebuild -target "Matter" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wno-macro-redefined'
working-directory: src/darwin/Framework
- name: Copying Framework to Temporary Path
continue-on-error: true
run: |
mkdir -p /tmp/macos_framework_output
ls -la /Users/runner/work/connectedhomeip/connectedhomeip/src/darwin/Framework/build/Release/
mv /Users/runner/work/connectedhomeip/connectedhomeip/src/darwin/Framework/build/Release/Matter.framework /tmp/macos_framework_output
ls -la /tmp/macos_framework_output
- name: Clean Build
run: xcodebuild clean
working-directory: src/darwin/Framework
- name: Build example darwin-framework-tool
timeout-minutes: 15
run: |
scripts/examples/gn_build_example.sh examples/darwin-framework-tool out/debug chip_config_network_layer_ble=false is_asan=true
# Disabling for now
# - name: Build example darwin-framework-tool
# timeout-minutes: 15
# run: |
# scripts/examples/gn_build_example.sh examples/darwin-framework-tool out/debug chip_config_network_layer_ble=false is_asan=true
- name: Build example All Clusters Server
timeout-minutes: 15
run: |
Expand All @@ -115,7 +123,7 @@ jobs:
run: |
mkdir -p /tmp/darwin/framework-tests
../../../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) &
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)
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)
working-directory: src/darwin/Framework
- name: Uploading log files
uses: actions/upload-artifact@v2
Expand Down
63 changes: 27 additions & 36 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ jobs:
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Build Apps
timeout-minutes: 40
timeout-minutes: 60
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
Expand Down Expand Up @@ -240,17 +240,15 @@ jobs:

container:
image: connectedhomeip/chip-build:0.5.79
options:
--privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux
- name:
Try to ensure the directories for core dumping exist and we
- name: Try to ensure the directories for core dumping exist and we
can write them.
run: |
mkdir /tmp/cores || true
Expand All @@ -263,41 +261,38 @@ jobs:
uses: actions/upload-artifact@v2
if: ${{ always() }} && ${{ !env.ACT }}
with:
name:
bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }}
name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }}
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Build Python REPL and example apps
timeout-minutes: 50
run: |
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target linux-x64-all-clusters-no-ble-no-wifi-tsan-clang-test \
--target linux-x64-python-bindings \
build \
--copy-artifacts-to objdir-clone \
"
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target linux-x64-all-clusters-no-ble-no-wifi-tsan-clang-test \
--target linux-x64-python-bindings \
build \
--copy-artifacts-to objdir-clone \
"
- name: Run Tests
timeout-minutes: 40
run: |
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"'
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"'
- name: Uploading core files
uses: actions/upload-artifact@v2
if: ${{ failure() }} && ${{ !env.ACT }}
with:
name:
crash-core-linux-python-repl
name: crash-core-linux-python-repl
path: /tmp/cores/
# Cores are big; don't hold on to them too long.
retention-days: 5
- name: Uploading objdir for debugging
uses: actions/upload-artifact@v2
if: ${{ failure() }} && ${{ !env.ACT }}
with:
name:
crash-objdir-linux-python-repl
name: crash-objdir-linux-python-repl
path: objdir-clone/
# objdirs are big; don't hold on to them too long.
retention-days: 5
Expand Down Expand Up @@ -346,47 +341,43 @@ jobs:
uses: actions/upload-artifact@v2
if: ${{ always() }} && ${{ !env.ACT }}
with:
name:
bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Build Python REPL and example apps
timeout-minutes: 50
run: |
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target darwin-x64-all-clusters-${BUILD_VARIANT}-test \
build \
--copy-artifacts-to objdir-clone \
"
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target darwin-x64-all-clusters-${BUILD_VARIANT}-test \
build \
--copy-artifacts-to objdir-clone \
"
- name: Run Tests
timeout-minutes: 30
run: |
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"'
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"'
- name: Uploading core files
uses: actions/upload-artifact@v2
if: ${{ failure() }} && ${{ !env.ACT }}
with:
name:
crash-core-darwin-python-repl
name: crash-core-darwin-python-repl
path: /cores/
# Cores are big; don't hold on to them too long.
retention-days: 5
- name: Uploading diagnostic logs
uses: actions/upload-artifact@v2
if: ${{ failure() }} && ${{ !env.ACT }}
with:
name:
crash-log-darwin-python-repl
name: crash-log-darwin-python-repl
path: ~/Library/Logs/DiagnosticReports/
- name: Uploading objdir for debugging
uses: actions/upload-artifact@v2
if: ${{ failure() }} && ${{ !env.ACT }}
with:
name:
crash-objdir-darwin-python-repl
name: crash-objdir-darwin-python-repl
path: objdir-clone/
# objdirs are big; don't hold on to them too long.
retention-days: 5
1 change: 1 addition & 0 deletions .restyled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ exclude:
- "scripts/idl/tests/outputs/**/*" # Matches generated output 1:1
- "examples/chef/sample_app_util/test_files/*.yaml"
- "examples/chef/zzz_generated/**/*"
- "src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc.mm" # https://github.com/project-chip/connectedhomeip/issues/20236


changed_paths:
Expand Down
6 changes: 3 additions & 3 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
enable_standalone_chip_tool_build =
enable_default_builds && host_os != "win"

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

# Build the shell example.
enable_standalone_shell_build = enable_default_builds && host_os != "win"
Expand Down
Loading

0 comments on commit f5c12c9

Please sign in to comment.