Skip to content

Commit

Permalink
Merge pull request #2 from project-chip/master
Browse files Browse the repository at this point in the history
Fast forward master into dev branch
  • Loading branch information
marktrayer authored May 31, 2023
2 parents cc72a26 + 77b1596 commit 47b3846
Show file tree
Hide file tree
Showing 573 changed files with 404,806 additions and 92,492 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -528,5 +528,5 @@ jobs:
.environment/pigweed-venv/*.log
- name: Run Build Coverage
timeout-minutes: 20
timeout-minutes: 30
run: ./scripts/build_coverage.sh
2 changes: 1 addition & 1 deletion .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
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-incomplete-umbrella -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)
# -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-incomplete-umbrella -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-incomplete-umbrella -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)
working-directory: src/darwin/Framework
- name: Uploading log files
uses: actions/upload-artifact@v3
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/examples-cc13x2x7_26x2x7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ jobs:
BUILD_TYPE: gn_cc26x2x7

runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'
# This CI is disabled because running out of flash and a solution was not found in time, see https://github.com/project-chip/connectedhomeip/pull/26186
# An issue was opened at https://github.com/project-chip/connectedhomeip/issues/26957
# TODO : Enable this once we have a way to run without out of flash failure or remove platform if it cannot support the SDK
if: github.actor != 'restyled-io[bot]' && false

container:
image: connectedhomeip/chip-build-ti:0.7.14
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-qpg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
.environment/pigweed-venv/*.log
- name: Build QPG6105 example apps
timeout-minutes: 20
timeout-minutes: 30
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/full-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ env:
jobs:
full_android:
name: Run
timeout-minutes: 75
timeout-minutes: 120

env:
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64/
Expand Down
26 changes: 24 additions & 2 deletions .github/workflows/java-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,12 @@ jobs:

env:
TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt"
JAVA_PATH: /usr/lib/jvm/java-8-openjdk-amd64

if: github.actor != 'restyled-io[bot]'
runs-on: ubuntu-latest

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

Expand Down Expand Up @@ -79,7 +78,30 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Generate unit tests
timeout-minutes: 1
run: |
scripts/run_in_build_env.sh \
'./scripts/build/build_examples.py \
--target linux-x64-tests \
gen \
'
- name: Build unit tests
timeout-minutes: 25
run: scripts/run_in_build_env.sh 'ninja -C out/linux-x64-tests src:java_controller_tests'

- name: Run unit tests
timeout-minutes: 10
# TODO: this direct path loading is not maintainable. Our build system should define and
# support test classes.
run: |
$JAVA_PATH/bin/java \
-cp 'third_party/java_deps/artifacts/*:out/linux-x64-tests/lib/src/controller/java/*' \
org.junit.runner.JUnitCore \
chip.tlv.TlvWriterTest \
chip.tlv.TlvReadWriteTest \
chip.tlv.TlvReaderTest \
chip.jsontlv.JsonToTlvToJsonTest
- name: Build Java Matter Controller and all clusters app
timeout-minutes: 50
run: |
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,14 @@ jobs:
run: |
git grep -n 'SuccessOrExit(CHIP_ERROR' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
# to avoid our grep regexp matching itself.
- name: Check for use of "SuccessOrExit(something-without-assignment(", which should probably be "SuccessOrExit(err = something("
if: always()
run: |
git grep -n 'SuccessOrExit([^=)]*(' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
- name: Check that our hardcoded SHA for clang-format on ARM mac matches the pigweed SHA.
if: always()
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/clusters-extensions.xml \
src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml \
Expand Down Expand Up @@ -163,6 +164,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml \
Expand Down Expand Up @@ -487,7 +489,7 @@ jobs:
- 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_python.sh --install_wheel build-env --extra_packages "mobly"'
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test \
Expand Down
1 change: 1 addition & 0 deletions .restyled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ exclude:
- "src/darwin/Framework/CHIP/zap-generated/*" # already clang-formatted by our zap tooling
- "zzz_generated/**/*" # already clang-formatted by our zap tooling
- "src/controller/java/generated/java/**/*" # not formatted: generated files
- "src/controller/java/zap-generated/**/*" # not formatted: generated files


changed_paths:
Expand Down
6 changes: 3 additions & 3 deletions build/chip/java/config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
java_path = getenv("JAVA_PATH")
declare_args() {
java_matter_controller_dependent_paths = []
build_java_matter_controller = false
if (java_path != "") {
matter_enable_java_compilation = false
if (java_path != "" && current_os != "android") {
java_matter_controller_dependent_paths += [ "${java_path}/include/" ]

if (current_os == "mac") {
Expand All @@ -27,6 +27,6 @@ declare_args() {
[ "${java_path}/include/linux/" ]
}

build_java_matter_controller = true
matter_enable_java_compilation = true
}
}
16 changes: 10 additions & 6 deletions build/chip/java/rules.gni
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ kotlinc_runner = "${chip_root}/build/chip/java/kotlinc_runner.py"
jar_runner = "${chip_root}/build/chip/java/jar_runner.py"
write_build_config = "${chip_root}/build/chip/java/write_build_config.py"

assert(android_sdk_root != "" || build_java_matter_controller,
"android_sdk_root or java_path must be specified")
assert(android_sdk_root != "" || matter_enable_java_compilation,
"android_sdk_root must be specified or JAVA_PATH must be set.")

# Declare a java library target
#
Expand Down Expand Up @@ -127,7 +127,8 @@ template("java_library") {

# Compiles the given files into a directory and generates a 'class list'
_javac_target_name = target_name + "__javac"
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/classes"
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/" +
target_name + "/classes"
_class_list_file = "$target_gen_dir/$target_name.classlist"
action(_javac_target_name) {
sources = _java_files
Expand Down Expand Up @@ -284,7 +285,8 @@ template("java_binary") {

# Compiles the given files into a directory and generates a 'class list'
_javac_target_name = target_name + "__javac"
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/classes"
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/" +
target_name + "/classes"
_class_list_file = "$target_gen_dir/$target_name.classlist"
action(_javac_target_name) {
sources = _java_files
Expand Down Expand Up @@ -441,7 +443,8 @@ template("kotlin_library") {

# Compiles the given files into a directory and generates a 'class list'
_kotlinc_target_name = target_name + "__kotlinc"
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/classes"
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/" +
target_name + "/classes"
_class_list_file = "$target_gen_dir/$target_name.classlist"
action(_kotlinc_target_name) {
sources = _kotlin_files
Expand Down Expand Up @@ -598,7 +601,8 @@ template("kotlin_binary") {

# Compiles the given files into a directory and generates a 'class list'
_kotlinc_target_name = target_name + "__kotlinc"
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/classes"
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/" +
target_name + "/classes"
_class_list_file = "$target_gen_dir/$target_name.classlist"
action(_kotlinc_target_name) {
sources = _kotlin_files
Expand Down
2 changes: 1 addition & 1 deletion build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ config("strict_warnings") {
cflags += [ "-Wconversion" ]
}

if (build_java_matter_controller) {
if (matter_enable_java_compilation) {
cflags -= [ "-Wshadow" ]
}

Expand Down
15 changes: 14 additions & 1 deletion config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ if (CONFIG_ENABLE_ESP32_BLE_CONTROLLER)
chip_gn_arg_append("chip_enable_ble_controller" "true")
endif()

if (CONFIG_ENABLE_ETHERNET_TELEMETRY)
chip_gn_arg_append("chip_enable_ethernet" "true")
endif()

if (CONFIG_ENABLE_MATTER_OVER_THREAD)
chip_gn_arg_append("chip_enable_openthread" "true")
else()
Expand Down Expand Up @@ -359,6 +363,9 @@ endif()
if(CONFIG_OPENTHREAD_ENABLED)
idf_component_get_property(openthread_lib openthread COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${openthread_lib}>)

idf_component_get_property(ieee802154_lib ieee802154 COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${ieee802154_lib}>)
endif()

if((NOT CONFIG_USE_MINIMAL_MDNS) AND (CONFIG_ENABLE_WIFI_STATION OR CONFIG_ENABLE_WIFI_AP))
Expand All @@ -385,7 +392,7 @@ idf_component_get_property(lwip_lib lwip COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${lwip_lib}>)


if (CONFIG_ESP_WIFI_ENABLED)
if (CONFIG_ESP32_WIFI_ENABLED)
idf_component_get_property(esp_wifi_lib esp_wifi COMPONENT_LIB)
idf_component_get_property(esp_wifi_dir esp_wifi COMPONENT_DIR)
list(APPEND chip_libraries $<TARGET_FILE:${esp_wifi_lib}>)
Expand Down Expand Up @@ -436,6 +443,12 @@ list(APPEND chip_libraries $<TARGET_FILE:${soc_lib}>)
idf_component_get_property(efuse_lib efuse COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${efuse_lib}>)

idf_component_get_property(vfs_lib vfs COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${vfs_lib}>)

idf_component_get_property(driver_lib driver COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${driver_lib}>)

target_link_libraries(${COMPONENT_LIB} INTERFACE -Wl,--start-group
${chip_libraries}
$<TARGET_FILE:mbedcrypto> $<TARGET_FILE:mbedx509>
Expand Down
5 changes: 1 addition & 4 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -705,12 +705,9 @@ menu "CHIP Device Layer"
depends on SEC_CERT_DAC_PROVIDER && SOC_ECDSA_SUPPORTED
default y
select MBEDTLS_HARDWARE_ECDSA_SIGN
select ENABLE_ESP32_FACTORY_DATA_PROVIDER
select ENABLE_ESP32_DEVICE_INSTANCE_INFO_PROVIDER
help
If DAC is being read from secure cert and SOC supports ECDSA signing using on-chip peripheral
then this option gets enabled. This option also selects few more that are required for commissioning
the device.
then this option gets enabled.
Also, please disable ESP_SECURE_CERT_DS_PERIPHERAL from the menuconfig when this option is disabled

endmenu
Expand Down
5 changes: 3 additions & 2 deletions docs/guides/esp32/build_app_and_commission.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,9 @@ Note: In order to commission an ethernet device, from all-clusters-app enable
these config options: select `ESP32-Ethernet-Kit` under `Demo->Device Type` and
select `On-Network` rendezvous mode under `Demo->Rendezvous Mode`. Currently
default ethernet board supported is IP101, if you want to use other types of
ethernet board then override the current implementation under
`ConnectivityManagerImpl::InitEthernet`
ethernet board then you can extend the `ESPEthernetDriver` class in your
application and override the current implementation under
`ESPEthernetDriver::Init`
#### Commissioning Parameters
Expand Down
Loading

0 comments on commit 47b3846

Please sign in to comment.