Skip to content

Commit

Permalink
Merge branch 'master' into add-update-remove-noc-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tehampson committed Jul 7, 2022
2 parents f0ca805 + e974dc6 commit da8fddf
Show file tree
Hide file tree
Showing 185 changed files with 13,552 additions and 8,601 deletions.
5 changes: 5 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ setup payload:
############################################################
platform:
- src/platform/*
- config/tizen/chip-gn/platform/*
- examples/platform/*
- scripts/tools/memory/platform/*
- src/include/platform/*
- src/lib/dnssd/platform/*

darwin:
- src/platform/Darwin/*
Expand Down
68 changes: 36 additions & 32 deletions .github/workflows/cherry-picks.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
name: Cherry-Pick Merges

on:
pull_request_target:
branches:
- master
types: ["closed"]
pull_request_target:
branches:
- master
types: ["closed"]

jobs:
cherry_pick_release_v1_0:
runs-on: ubuntu-latest
name: Cherry-Pick into SVE
if: |
(github.event.pull_request.merged == true)
&& (
(contains(github.event.pull_request.labels.*.name, 'sve'))
|| (contains(github.event.pull_request.labels.*.name, 'cert blocker'))
|| (contains(github.event.pull_request.labels.*.name, 'spec'))
|| (contains(github.event.pull_request.labels.*.name, 'platform'))
|| (contains(github.event.pull_request.labels.*.name, 'darwin'))
|| (contains(github.event.pull_request.labels.*.name, 'android'))
|| (contains(github.event.pull_request.labels.*.name, 'sve cherry-pick'))
)
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cherry-Pick into sve branch
uses: carloscastrojumo/github-cherry-pick-action@v1.0.1
with:
token: ${{ secrets.MATTER_PAT }}
branch: sve
reviewers: |
woody-apple
andy31415
cherry_pick_release_v1_0:
runs-on: ubuntu-latest
name: Cherry-Pick into SVE
if: |
(github.event.pull_request.merged == true)
&& (
(contains(github.event.pull_request.labels.*.name, 'sve'))
|| (contains(github.event.pull_request.labels.*.name, 'cert blocker'))
|| (contains(github.event.pull_request.labels.*.name, 'spec'))
|| (contains(github.event.pull_request.labels.*.name, 'platform'))
|| (contains(github.event.pull_request.labels.*.name, 'darwin'))
|| (contains(github.event.pull_request.labels.*.name, 'android'))
|| (contains(github.event.pull_request.labels.*.name, 'examples'))
|| (contains(github.event.pull_request.labels.*.name, 'scripts'))
|| (contains(github.event.pull_request.labels.*.name, 'workflows'))
|| (contains(github.event.pull_request.labels.*.name, 'github'))
|| (contains(github.event.pull_request.labels.*.name, 'sve cherry-pick'))
)
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cherry-Pick into sve branch
uses: carloscastrojumo/github-cherry-pick-action@v1.0.1
with:
token: ${{ secrets.MATTER_PAT }}
branch: sve
reviewers: |
woody-apple
andy31415
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -266,3 +266,6 @@
url = https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git
branch = master
platforms = efr32
[submodule "editline"]
path = third_party/editline/repo
url = https://github.com/troglobit/editline.git
2 changes: 1 addition & 1 deletion .restyled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +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
- "src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm" # https://github.com/project-chip/connectedhomeip/issues/20236


changed_paths:
Expand Down
18 changes: 18 additions & 0 deletions build_overrides/editline.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2022 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

declare_args() {
# Root directory for editline.
editline_root = "//third_party/editline"
}
1 change: 1 addition & 0 deletions examples/all-clusters-app/linux/main-common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <new>
#include <platform/DiagnosticDataProvider.h>
#include <platform/PlatformManager.h>
#include <signal.h>
#include <system/SystemPacketBuffer.h>
#include <transport/SessionManager.h>
#include <transport/raw/PeerAddress.h>
Expand Down
18 changes: 18 additions & 0 deletions examples/build_overrides/editline.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2022 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

declare_args() {
# Root directory for editline.
editline_root = "//third_party/connectedhomeip/third_party/editline"
}
11 changes: 7 additions & 4 deletions examples/chip-tool/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ import("${chip_root}/build/chip/tools.gni")
import("${chip_root}/examples/chip-tool/chip-tool.gni")
import("${chip_root}/src/lib/core/core.gni")

if (config_use_interactive_mode) {
import("//build_overrides/editline.gni")
}

assert(chip_build_tools)

config("config") {
Expand All @@ -37,10 +41,6 @@ config("config") {
]

cflags = [ "-Wconversion" ]

if (config_use_interactive_mode) {
libs = [ "readline" ]
}
}

static_library("chip-tool-utils") {
Expand Down Expand Up @@ -77,8 +77,11 @@ static_library("chip-tool-utils") {
"config/PersistentStorage.cpp",
]

deps = []

if (config_use_interactive_mode) {
sources += [ "commands/interactive/InteractiveCommands.cpp" ]
deps += [ "${editline_root}:editline" ]
}

if (config_enable_yaml_tests) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@

#include "InteractiveCommands.h"

#include <editline.h>
#include <iomanip>
#include <readline/history.h>
#include <readline/readline.h>
#include <sstream>

char kInteractiveModeName[] = "";
Expand Down
9 changes: 5 additions & 4 deletions examples/darwin-framework-tool/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ import("//build_overrides/chip.gni")
import("${chip_root}/build/chip/tools.gni")
import("${chip_root}/examples//chip-tool/chip-tool.gni")

if (config_use_interactive_mode) {
import("//build_overrides/editline.gni")
}

assert(chip_build_tools)

config("config") {
Expand All @@ -43,10 +47,6 @@ config("config") {
"-Wconversion",
"-fobjc-arc",
]

if (config_use_interactive_mode) {
libs = [ "readline" ]
}
}

executable("darwin-framework-tool") {
Expand Down Expand Up @@ -81,6 +81,7 @@ executable("darwin-framework-tool") {

if (config_use_interactive_mode) {
sources += [ "commands/interactive/InteractiveCommands.mm" ]
deps += [ "${editline_root}:editline" ]
}

if (config_enable_yaml_tests) {
Expand Down
2 changes: 1 addition & 1 deletion integrations/cloudbuild/smoke-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ artifacts:
# building instead of docker download/checkout/bootstrap)
options:
machineType: "E2_HIGHCPU_32"
diskSizeGb: 200
diskSizeGb: 500
15 changes: 7 additions & 8 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,14 +270,14 @@ def HostTargets():
builder.AppendVariant(name="ipv6only", enable_ipv4=False),
builder.AppendVariant(name="no-ble", enable_ble=False),
builder.AppendVariant(name="no-wifi", enable_wifi=False),
builder.AppendVariant(name="no-thread", enable_thread=False),
builder.AppendVariant(name="tsan", conflicts=['asan'], use_tsan=True),
builder.AppendVariant(name="asan", conflicts=['tsan'], use_asan=True),
builder.AppendVariant(name="libfuzzer", requires=[
"clang"], use_libfuzzer=True),
builder.AppendVariant(name="clang", use_clang=True),
builder.AppendVariant(name="test", extra_tests=True),

builder.WhitelistVariantNameForGlob('no-interactive-ipv6only')
builder.WhitelistVariantNameForGlob('ipv6only')

for target in app_targets:
Expand All @@ -288,12 +288,7 @@ def HostTargets():
builder.targets.append(target)

for target in builder.AllVariants():
if cross_compile and 'chip-tool' in target.name and 'arm64' in target.name and '-no-interactive' not in target.name:
# Interactive builds will not compile by default on arm cross compiles
# because libreadline is not part of the default sysroot
yield target.GlobBlacklist('Arm crosscompile does not support libreadline-dev')
else:
yield target
yield target

# Without extra build variants
yield target_native.Extend('chip-cert', app=HostApp.CERT_TOOL)
Expand All @@ -305,6 +300,10 @@ def HostTargets():
yield target_native.Extend('address-resolve-tool-platform-mdns-ipv6only', app=HostApp.ADDRESS_RESOLVE,
use_platform_mdns=True, enable_ipv4=False).GlobBlacklist("Reduce default build variants")

nodeps_args = dict(enable_ipv4=False, enable_ble=False, enable_wifi=False, enable_thread=False)
yield target_native.Extend('chip-tool-nodeps', app=HostApp.CHIP_TOOL, **nodeps_args)
yield target_native.Extend('all-clusters-app-nodeps', app=HostApp.ALL_CLUSTERS, **nodeps_args)

test_target = Target(HostBoard.NATIVE.PlatformName(), HostBuilder)
yield test_target.Extend(HostBoard.NATIVE.BoardName() + '-tests', board=HostBoard.NATIVE, app=HostApp.TESTS)
yield test_target.Extend(HostBoard.NATIVE.BoardName() + '-tests-clang', board=HostBoard.NATIVE, app=HostApp.TESTS, use_clang=True)
Expand Down Expand Up @@ -413,7 +412,7 @@ def NrfTargets():
]

# Enable nrf52840dongle for all-clusters and lighting app only
yield target.Extend('nrf52840dongle-all-clusters', board=NrfBoard.NRF52840DONGLE, app=NrfApp.ALL_CLUSTERS)
yield target.Extend('nrf52840dongle-all-clusters', board=NrfBoard.NRF52840DONGLE, app=NrfApp.ALL_CLUSTERS).GlobBlacklist('Out of flash when linking')
yield target.Extend('nrf52840dongle-all-clusters-minimal', board=NrfBoard.NRF52840DONGLE, app=NrfApp.ALL_CLUSTERS_MINIMAL)
yield target.Extend('nrf52840dongle-light', board=NrfBoard.NRF52840DONGLE, app=NrfApp.LIGHT)

Expand Down
11 changes: 8 additions & 3 deletions scripts/build/builders/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,11 @@ def PlatformName(self):

class HostBuilder(GnBuilder):

def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE, enable_ipv4=True,
enable_ble=True, enable_wifi=True, use_tsan=False, use_asan=False, separate_event_loop=True,
use_libfuzzer=False, use_clang=False, interactive_mode=True, extra_tests=False,
def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE,
enable_ipv4=True, enable_ble=True, enable_wifi=True,
enable_thread=True, use_tsan=False, use_asan=False,
separate_event_loop=True, use_libfuzzer=False, use_clang=False,
interactive_mode=True, extra_tests=False,
use_platform_mdns=False, enable_rpcs=False):
super(HostBuilder, self).__init__(
root=os.path.join(root, 'examples', app.ExamplePath()),
Expand All @@ -216,6 +218,9 @@ def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE, enable_ip
if not enable_wifi:
self.extra_gn_options.append('chip_enable_wifi=false')

if not enable_thread:
self.extra_gn_options.append('chip_enable_openthread=false')

if use_tsan:
self.extra_gn_options.append('is_tsan=true')

Expand Down
2 changes: 1 addition & 1 deletion scripts/build/testdata/all_targets_except_host.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ nrf-nrf52840dk-lock
nrf-nrf52840dk-pump
nrf-nrf52840dk-pump-controller
nrf-nrf52840dk-shell
nrf-nrf52840dongle-all-clusters
nrf-nrf52840dongle-all-clusters (NOGLOB: Out of flash when linking)
nrf-nrf52840dongle-all-clusters-minimal
nrf-nrf52840dongle-light
nrf-nrf5340dk-all-clusters
Expand Down
30 changes: 22 additions & 8 deletions scripts/build/testdata/build_linux_on_x64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,15 @@ bash -c '
PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/bridge-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-bridge-ipv6only'

# Generating linux-arm64-chip-tool-no-interactive-ipv6only
# Generating linux-arm64-chip-tool
bash -c '
PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=chip_inet_config_enable_ipv4=false config_use_interactive_mode=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-chip-tool-no-interactive-ipv6only'
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-chip-tool'

# Generating linux-arm64-chip-tool-ipv6only
bash -c '
PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-chip-tool-ipv6only'

# Generating linux-arm64-light
bash -c '
Expand Down Expand Up @@ -150,6 +155,9 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root} {ou
# Generating linux-x64-all-clusters
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux {out}/linux-x64-all-clusters

# Generating linux-x64-all-clusters-app-nodeps
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false' {out}/linux-x64-all-clusters-app-nodeps

# Generating linux-x64-all-clusters-ipv6only
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux --args=chip_inet_config_enable_ipv4=false {out}/linux-x64-all-clusters-ipv6only

Expand All @@ -174,8 +182,8 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa
# Generating linux-x64-chip-tool-ipv6only
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool --args=chip_inet_config_enable_ipv4=false {out}/linux-x64-chip-tool-ipv6only

# Generating linux-x64-chip-tool-no-interactive-ipv6only
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '--args=chip_inet_config_enable_ipv4=false config_use_interactive_mode=false' {out}/linux-x64-chip-tool-no-interactive-ipv6only
# Generating linux-x64-chip-tool-nodeps
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false' {out}/linux-x64-chip-tool-nodeps

# Generating linux-x64-light
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux {out}/linux-x64-light
Expand Down Expand Up @@ -270,8 +278,11 @@ ninja -C {out}/linux-arm64-bridge
# Building linux-arm64-bridge-ipv6only
ninja -C {out}/linux-arm64-bridge-ipv6only

# Building linux-arm64-chip-tool-no-interactive-ipv6only
ninja -C {out}/linux-arm64-chip-tool-no-interactive-ipv6only
# Building linux-arm64-chip-tool
ninja -C {out}/linux-arm64-chip-tool

# Building linux-arm64-chip-tool-ipv6only
ninja -C {out}/linux-arm64-chip-tool-ipv6only

# Building linux-arm64-light
ninja -C {out}/linux-arm64-light
Expand Down Expand Up @@ -345,6 +356,9 @@ ninja -C {out}/linux-x64-address-resolve-tool src/lib/address_resolve:address-re
# Building linux-x64-all-clusters
ninja -C {out}/linux-x64-all-clusters

# Building linux-x64-all-clusters-app-nodeps
ninja -C {out}/linux-x64-all-clusters-app-nodeps

# Building linux-x64-all-clusters-ipv6only
ninja -C {out}/linux-x64-all-clusters-ipv6only

Expand All @@ -369,8 +383,8 @@ ninja -C {out}/linux-x64-chip-tool
# Building linux-x64-chip-tool-ipv6only
ninja -C {out}/linux-x64-chip-tool-ipv6only

# Building linux-x64-chip-tool-no-interactive-ipv6only
ninja -C {out}/linux-x64-chip-tool-no-interactive-ipv6only
# Building linux-x64-chip-tool-nodeps
ninja -C {out}/linux-x64-chip-tool-nodeps

# Building linux-x64-light
ninja -C {out}/linux-x64-light
Expand Down
1 change: 0 additions & 1 deletion scripts/build/testdata/glob_star_targets_except_host.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ nrf-nrf52840dk-lock
nrf-nrf52840dk-pump
nrf-nrf52840dk-pump-controller
nrf-nrf52840dk-shell
nrf-nrf52840dongle-all-clusters
nrf-nrf52840dongle-all-clusters-minimal
nrf-nrf52840dongle-light
nrf-nrf5340dk-all-clusters
Expand Down
Loading

0 comments on commit da8fddf

Please sign in to comment.