Skip to content

Commit

Permalink
Merge branch 'master' into TC_TIMESYNC_2_4_max_name_size_check
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille authored Jul 7, 2023
2 parents 1fa4a81 + 21bbc36 commit fdbd981
Show file tree
Hide file tree
Showing 379 changed files with 108,155 additions and 195,592 deletions.
25 changes: 0 additions & 25 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,6 @@ exclude = third_party
scripts/tools/zap_convert_all.py
src/app/ota_image_tool.py
src/app/zap_cluster_list.py
src/controller/python/build-chip-wheel.py
src/controller/python/chip-device-ctrl.py
src/controller/python/chip/CertificateAuthority.py
src/controller/python/chip/ChipBleUtility.py
src/controller/python/chip/ChipBluezMgr.py
src/controller/python/chip/ChipCommissionableNodeCtrl.py
src/controller/python/chip/ChipCoreBluetoothMgr.py
src/controller/python/chip/ChipDeviceCtrl.py
src/controller/python/chip/ChipReplStartup.py
src/controller/python/chip/ChipStack.py
src/controller/python/chip/ChipUtility.py
src/controller/python/chip/FabricAdmin.py
src/controller/python/chip/ble/scan_devices.py
src/controller/python/chip/clusters/Attribute.py
src/controller/python/chip/clusters/ClusterObjects.py
src/controller/python/chip/clusters/Command.py
src/controller/python/chip/clusters/__init__.py
src/controller/python/chip/discovery/__init__.py
src/controller/python/chip/interaction_model/__init__.py
src/controller/python/chip/interaction_model/delegate.py
src/controller/python/chip/internal/commissioner.py
src/controller/python/chip/setup_payload/setup_payload.py
src/controller/python/chip/storage/__init__.py
src/controller/python/chip/tlv/__init__.py
src/controller/python/chip/utils/CommissioningBuildingBlocks.py
src/controller/python/chip/yaml/__init__.py
src/controller/python/chip/yaml/format_converter.py
src/controller/python/chip/yaml/runner.py
Expand Down
9 changes: 6 additions & 3 deletions .github/actions/checkout-submodules/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ inputs:
runs:
using: "composite"
steps:
- name: Checkout submodules
shell: bash
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform ${{ inputs.platform }} ${{ inputs.extra-parameters }}
- uses: Wandalen/wretry.action@v1.3.0
name: Checkout submodules
with:
command: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform ${{ inputs.platform }} ${{ inputs.extra-parameters }}
attempt_limit: 3
attempt_delay: 2000
14 changes: 10 additions & 4 deletions .github/workflows/darwin-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: darwin
bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }}

- name: Run macOS Darwin Framework Tool Build Debug
working-directory: src/darwin/Framework
Expand Down Expand Up @@ -126,21 +126,27 @@ jobs:
uses: actions/upload-artifact@v3
if: ${{ failure() && !env.ACT }}
with:
name: crash-core-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
name: crash-core-darwin-${{ matrix.build_variant }}
path: /cores/
# Cores are big; don't hold on to them too long.
retention-days: 5
- name: Uploading diagnostic logs
uses: actions/upload-artifact@v3
if: ${{ failure() && !env.ACT }}
with:
name: crash-log-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
name: crash-log-darwin-${{ matrix.build_variant }}
path: ~/Library/Logs/DiagnosticReports/
- name: Uploading framework build log
uses: actions/upload-artifact@v3
if: ${{ failure() && !env.ACT }}
with:
name: framework-build-log-darwin-${{ matrix.build_variant }}
path: out/darwin-x64-darwin-framework-tool-${{ matrix.build_variant }}/darwin_framework_build.log
- name: Uploading objdir for debugging
uses: actions/upload-artifact@v3
if: ${{ failure() && !env.ACT }}
with:
name: crash-objdir-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
name: crash-objdir-darwin-${{ matrix.build_variant }}
path: objdir-clone/
# objdirs are big; don't hold on to them too long.
retention-days: 5
9 changes: 6 additions & 3 deletions .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ jobs:
# Disable -Wunguarded-availability-new because we internally use
# APIs we added after our deployment target version. Maybe we
# should change the deployment target version instead?
run: xcodebuild -target "Matter" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-unguarded-availability-new'
#
# Disable BLE because the app does not have the permission to use
# it and that may crash the CI.
run: xcodebuild -target "Matter" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-unguarded-availability-new' CHIP_IS_BLE=NO
working-directory: src/darwin/Framework
- name: Clean Build
run: xcodebuild clean
Expand Down Expand Up @@ -121,10 +124,10 @@ jobs:
../../../out/debug/chip-ota-requestor-app --interface-id -1 --secured-device-port 5543 --discriminator 1112 --KVS /tmp/chip-ota-requestor-kvs2 --otaDownloadPath /tmp/chip-ota-requestor-downloaded-image2 --autoApplyImage > >(tee /tmp/darwin/framework-tests/ota-requestor-app-2.log) 2> >(tee /tmp/darwin/framework-tests/ota-requestor-app-err-2.log >&2) &
# -enableUndefinedBehaviorSanitizer instruments the code in Matter.framework,
# but to instrument the code in the underlying libCHIP we need to pass CHIP_IS_UBSAN=YES
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_UBSAN=YES > >(tee /tmp/darwin/framework-tests/darwin-tests-asan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-err.log >&2)
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_UBSAN=YES CHIP_IS_BLE=NO > >(tee /tmp/darwin/framework-tests/darwin-tests-asan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-err.log >&2)
# -enableThreadSanitizer instruments the code in Matter.framework,
# but to instrument the code in the underlying libCHIP we need to pass CHIP_IS_TSAN=YES
xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableThreadSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-unguarded-availability-new' CHIP_IS_TSAN=YES > >(tee /tmp/darwin/framework-tests/darwin-tests-tsan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-tsan-err.log >&2)
xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableThreadSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-unguarded-availability-new' CHIP_IS_TSAN=YES CHIP_IS_BLE=NO > >(tee /tmp/darwin/framework-tests/darwin-tests-tsan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-tsan-err.log >&2)
working-directory: src/darwin/Framework
- name: Build Matter TV Casting Bridge
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-efr32:0.7.3
image: connectedhomeip/chip-build-efr32:0.7.25
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/kotlin-style.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Kotlin

on:
pull_request:
paths:
- "**/*.kt"
- ".github/workflows/kotlin-style.yaml"
- "kotlin-detect-config.yaml"

concurrency:
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


jobs:
detekt:
name: Static code analysis
runs-on: ubuntu-latest

steps:
- name: "checkout"
uses: actions/checkout@v2

- name: "detekt"
uses: natiginfo/action-detekt-all@1.23.0
# Detekt seems not to like circular symlinks, so we set up
# explicit paths below
with:
args: --parallel --build-upon-default-config --config kotlin-detect-config.yaml --input examples/android/CHIPTest,examples/android/CHIPTool,examples/java-matter-controller/java,src/controller/java

ktlint:
name: "Format check"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'

- name: Download ktfmt
run: |
cd /tmp
wget "https://repo1.maven.org/maven2/com/facebook/ktfmt/0.44/ktfmt-0.44-jar-with-dependencies.jar"
- name: Format kotlin files
run: |
find src examples -name '*.kt' \
| xargs java -jar /tmp/ktfmt-0.44-jar-with-dependencies.jar --google-style
- name: Ensure git works in current working directory
run: git config --global --add safe.directory `pwd`

- name: Check for uncommited changes
run: |
git add .
# Show the full diff
git diff-index -p HEAD --
# Also show just the files that are different, to make it easy
# to tell at a glance what might be going on. And throw in
# --exit-code to make this job fail if there is a difference.
git diff-index --exit-code HEAD --
7 changes: 6 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ jobs:
"
- name: Run Tests using the python parser sending commands to chip-tool
# https://github.com/project-chip/connectedhomeip/issues/27673
if: matrix.build_variant != 'no-ble-tsan-clang'
run: |
./scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
Expand Down Expand Up @@ -286,7 +288,8 @@ jobs:

strategy:
matrix:
build_variant: [no-ble-tsan-clang, no-ble-asan-clang]
build_variant: [no-ble-asan-clang]
# Since no-ble-tsan-clang doesn't run any tests, this is just wasted CI time for now
chip_tool: [""]
env:
BUILD_VARIANT: ${{matrix.build_variant}}
Expand Down Expand Up @@ -350,6 +353,8 @@ jobs:
"
- name: Run Tests using the python parser sending commands to chip-tool
# https://github.com/project-chip/connectedhomeip/issues/27673
if: matrix.build_variant != 'no-ble-tsan-clang'
run: |
./scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
Expand Down
1 change: 1 addition & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
"${chip_root}/src/credentials/tests:fuzz-chip-cert",
"${chip_root}/src/lib/core/tests:fuzz-tlv-reader",
"${chip_root}/src/lib/dnssd/minimal_mdns/tests:fuzz-minmdns-packet-parsing",
"${chip_root}/src/lib/format/tests:fuzz-payload-decoder",
]
}
}
Expand Down
15 changes: 14 additions & 1 deletion build/chip/chip_codegen.gni
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,19 @@ template("_chip_build_time_codegen") {
rebase_path(target_gen_dir, root_build_dir),
"--expected-outputs",
rebase_path(_expected_outputs, root_build_dir),
rebase_path(_idl_file, root_build_dir),
]

if (defined(invoker.options)) {
foreach(option, invoker.options) {
args += [
"--option",
option,
]
}
}

args += [ rebase_path(_idl_file, root_build_dir) ]

inputs = [
_idl_file,
_expected_outputs,
Expand Down Expand Up @@ -313,12 +323,15 @@ template("chip_codegen") {
"generator",
"input",
"outputs",
"options",
"public_configs",
])
}
} else {
_name = target_name

not_needed(invoker, [ "options" ])

# This constructs a path like:
# FROM all-clusters-app.matter (inside examples/all-clusters-app/all-clusters-common/)
# USING "cpp-app" for generator:
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/esp32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ example on ESP32 series of SoCs
- [Flash and NVS encryption for securing factory data](flash_nvs_encryption.md)
- [RPC Console and Device Tracing](rpc_console.md)
- [Matter OTA](ota.md)
- [Generating and Using ESP Secure Cert Parttiton](secure_cert_partition.md)
- [Generating and Using ESP Secure Cert Partition](secure_cert_partition.md)
2 changes: 1 addition & 1 deletion docs/guides/repl/Matter_Multi_Fabric_Commissioning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"source": [
"## FabricAdmins and Controllers\n",
"\n",
"The `FabricAdmin` class (present in the `chip.FabricAdmin` package) is responsible for adminstering a fabric. It houses the Fabric ID and Index, as well as an RCAC and ICAC that provides the certificate material grounding that fabric.\n",
"The `FabricAdmin` class (present in the `chip.FabricAdmin` package) is responsible for administering a fabric. It houses the Fabric ID and Index, as well as an RCAC and ICAC that provides the certificate material grounding that fabric.\n",
"\n",
"The `FabricAdmin` can be used to vend `ChipDeviceController` objects that represent a controller instance with a specific identity grounded in the admin's fabric. This controller can then be used to commission and interact with devices."
]
Expand Down
Loading

0 comments on commit fdbd981

Please sign in to comment.