Skip to content

Commit

Permalink
Merge branch 'master' into feature/cleanup_zap_scene_name
Browse files Browse the repository at this point in the history
  • Loading branch information
lpbeliveau-silabs authored Oct 11, 2023
2 parents 9ea329d + 91b1f62 commit 41aaf74
Show file tree
Hide file tree
Showing 504 changed files with 140,316 additions and 516,396 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/examples-telink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ jobs:
with:
gh-context: ${{ toJson(github) }}

- name: Build example Telink (B92) Air Quality Sensor App
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target 'telink-tlsr9528a-air-quality-sensor' build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
telink tlsr9528a air-quality-sensor-app \
out/telink-tlsr9528a-air-quality-sensor/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: clean out build output
run: rm -rf ./out

- name: Build example Telink (B91) All Clusters App
run: |
./scripts/run_in_build_env.sh \
Expand Down Expand Up @@ -124,25 +136,13 @@ jobs:
- name: clean out build output (keep tools)
run: rm -rf ./out/telink*

- name: Build example Telink (B92) Lighting App with RPC, Shell and Factory Data
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target 'telink-tlsr9528a-light-rpc-shell-factory-data' build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
telink tlsr9528a lighting-app-rpc-shell-factory-data \
out/telink-tlsr9528a-light-rpc-shell-factory-data/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: clean out build output
run: rm -rf ./out

- name: Build example Telink (B91) Light Switch App
- name: Build example Telink (B92) Light Switch App with RPC, Shell and Factory Data
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-light-switch' build"
"./scripts/build/build_examples.py --target 'telink-tlsr9528a-light-switch-rpc-shell-factory-data' build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
telink tlsr9518adk80d light-switch-app \
out/telink-tlsr9518adk80d-light-switch/zephyr/zephyr.elf \
telink tlsr9528a light-switch-app-rpc-shell-factory-data \
out/telink-tlsr9528a-light-switch-rpc-shell-factory-data/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: clean out build output
Expand Down
20 changes: 15 additions & 5 deletions .github/workflows/recent_fail_summary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
name: Recent Fail Summary
on:
schedule:
- cron: "0 0 * * *"
- cron: "10 0 * * *"
workflow_dispatch:

concurrency:
Expand All @@ -25,24 +25,34 @@ jobs:
list_workflows:
name: Summarize Recent Workflow Failures
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v4
- run: pip install pandas python-slugify
- run: pip install pandas python-slugify pyyaml tabulate
- name: Run Summarization Script
run: python scripts/tools/summarize_fail.py
env:
GH_TOKEN: ${{ github.token }}
- name: Update Docs
uses: test-room-7/action-update-file@v1
with:
file-path: docs/daily_pass_percentage.md
commit-msg: Update daily pass percentage
github-token: ${{ secrets.GITHUB_TOKEN }}
branch: daily_pass_percentage
- name: Upload Logs
uses: actions/upload-artifact@v3
with:
name: workflow-fail-summary
path: |
run_list.json
fail_run_list.json
all_run_list.json
recent_fails.csv
recent_fails_frequency.csv
failure_cause_summary.csv
workflow_fail_rate.csv
workflow_pass_rate.csv
workflow_pass_rate.sqlite3
recent_fails_logs
workflow_fail_rate
workflow_pass_rate
retention-days: 5

11 changes: 11 additions & 0 deletions .gn
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,15 @@ default_args = {

# GN target to use for the default Python build venv.
pw_build_PYTHON_BUILD_VENV = "//:matter_build_venv"

# Required for pw_unit_test
pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio"
pw_assert_BACKEND = "$dir_pw_assert_log"
pw_log_BACKEND = "$dir_pw_log_basic"

# TODO: Make sure only unit tests link against this
pw_build_LINK_DEPS = [
"$dir_pw_assert:impl",
"$dir_pw_log:impl",
]
}
1 change: 1 addition & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@
"openiotsdk-lock",
"openiotsdk-shell",
"qpg-qpg6100-lock",
"telink-tlsr9518adk80d-air-quality-sensor",
"telink-tlsr9518adk80d-all-clusters",
"telink-tlsr9518adk80d-all-clusters-minimal",
"telink-tlsr9518adk80d-bridge",
Expand Down
1 change: 0 additions & 1 deletion build/chip/chip_codegen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ function(chip_zapgen TARGET_NAME)
# out links of template files and zap files and such
SET(EXTRA_DEPENDENCIES
"${CHIP_ROOT}/src/app/zap-templates/partials/header.zapt"
"${CHIP_ROOT}/src/app/zap-templates/partials/im_command_handler_cluster_commands.zapt"
"${CHIP_ROOT}/src/app/zap-templates/templates/app/access.zapt"
"${CHIP_ROOT}/src/app/zap-templates/templates/app/CHIPClusters.zapt"
"${CHIP_ROOT}/src/app/zap-templates/templates/app/endpoint_config.zapt"
Expand Down
1 change: 0 additions & 1 deletion build/chip/chip_codegen.gni
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ template("_chip_build_time_zapgen") {
# out links of template files and zap files and such
_extra_dependencies = [
"${_partials_dir}/header.zapt",
"${_partials_dir}/im_command_handler_cluster_commands.zapt",

# Application templates, actually generating files
"${_template_dir}/access.zapt",
Expand Down
6 changes: 3 additions & 3 deletions build/chip/chip_test.gni
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ if (chip_link_tests) {
output_dir = _test_output_dir
}

group(_test_name + "_lib") {
group(_test_name + ".lib") {
}

if (chip_pw_run_tests) {
pw_python_action(_test_name + "_run") {
pw_python_action(_test_name + ".run") {
deps = [ ":${_test_name}" ]
inputs = [ pw_unit_test_AUTOMATIC_RUNNER ]
module = "pw_unit_test.test_runner"
Expand All @@ -64,7 +64,7 @@ if (chip_link_tests) {
template("chip_test") {
group(target_name) {
}
group(target_name + "_lib") {
group(target_name + ".lib") {
}
not_needed(invoker, "*")
}
Expand Down
4 changes: 2 additions & 2 deletions build/chip/chip_test_group.gni
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ template("chip_test_group") {
_target_type = "group"
}

_lib_target_name = "${_test_group_name}_lib"
_lib_target_name = "${_test_group_name}.lib"

target(_target_type, _lib_target_name) {
forward_variables_from(invoker,
Expand All @@ -43,7 +43,7 @@ template("chip_test_group") {

deps = []
foreach(_test, invoker.deps) {
deps += [ get_label_info(_test, "label_no_toolchain") + "_lib" ]
deps += [ get_label_info(_test, "label_no_toolchain") + ".lib" ]
}

if (_build_monolithic_library && chip_build_test_static_libraries) {
Expand Down
109 changes: 102 additions & 7 deletions build/chip/chip_test_suite.gni
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ template("chip_test_suite") {
} else {
_target_type = "source_set"
}
target(_target_type, "${_suite_name}_lib") {
target(_target_type, "${_suite_name}.lib") {
forward_variables_from(invoker, "*", [ "tests" ])

output_dir = "${root_out_dir}/lib"
Expand All @@ -99,7 +99,104 @@ template("chip_test_suite") {
public_deps += [ "${chip_root}/src/platform/logging:force_stdio" ]
}
}
if (chip_link_tests) {
tests = []

if (defined(invoker.test_sources)) {
foreach(_test, invoker.test_sources) {
_test_name = string_replace(_test, ".cpp", "")

pw_test(_test_name) {
forward_variables_from(invoker,
[
"deps",
"public_deps",
"cflags",
"configs",
])
public_deps += [ ":${_suite_name}.lib" ]
sources = [ _test ]
}
tests += [ _test_name ]
}
}

if (defined(invoker.tests)) {
foreach(_test, invoker.tests) {
pw_test(_test) {
forward_variables_from(invoker,
[
"deps",
"public_deps",
"cflags",
"configs",
])
public_deps += [ ":${_suite_name}.lib" ]
test_main = ""
sources = [
"${_test}.cpp",
"${_test}Driver.cpp",
]
}
tests += [ _test ]
}
}

group(_suite_name) {
deps = []
foreach(_test, tests) {
deps += [ ":${_test}" ]
}
}

if (chip_pw_run_tests) {
group("${_suite_name}_run") {
deps = []
foreach(_test, tests) {
deps += [ ":${_test}.run" ]
}
}
}
} else {
group(_suite_name) {
deps = [ ":${_suite_name}.lib" ]
}
}
}

# TODO: remove this once transition away from nlunit-test is completed
template("chip_test_suite_using_nltest") {
_suite_name = target_name

# Ensures that the common library has sources containing both common
# and individual unit tests.
if (!defined(invoker.sources)) {
invoker.sources = []
}

if (defined(invoker.test_sources)) {
invoker.sources += invoker.test_sources
}

if (chip_build_test_static_libraries) {
_target_type = "static_library"
} else {
_target_type = "source_set"
}
target(_target_type, "${_suite_name}.lib") {
forward_variables_from(invoker, "*", [ "tests" ])

output_dir = "${root_out_dir}/lib"

if (!defined(invoker.public_deps)) {
public_deps = []
}

if (current_os != "zephyr" && current_os != "mbed") {
# Depend on stdio logging, and have it take precedence over the default platform backend
public_deps += [ "${chip_root}/src/platform/logging:force_stdio" ]
}
}
if (chip_link_tests) {
tests = []

Expand All @@ -123,11 +220,10 @@ template("chip_test_suite") {
chip_test(_test_name) {
sources = [ _driver_name ]
public_deps = [
":${_suite_name}_lib",
":${_suite_name}.lib",
":${_test_name}_generate_driver",
]
}

tests += [ _test_name ]
}
}
Expand All @@ -137,9 +233,8 @@ template("chip_test_suite") {
chip_test(_test) {
sources = [ "${_test}Driver.cpp" ]

public_deps = [ ":${_suite_name}_lib" ]
public_deps = [ ":${_suite_name}.lib" ]
}

tests += [ _test ]
}
}
Expand All @@ -155,13 +250,13 @@ template("chip_test_suite") {
group("${_suite_name}_run") {
deps = []
foreach(_test, tests) {
deps += [ ":${_test}_run" ]
deps += [ ":${_test}.run" ]
}
}
}
} else {
group(_suite_name) {
deps = [ ":${_suite_name}_lib" ]
deps = [ ":${_suite_name}.lib" ]
}
}
}
12 changes: 12 additions & 0 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,18 @@ config("strict_warnings") {
cflags += [ "-Wconversion" ]
}

# For now we can't enable -Wundef across the board. Enable it where
# we can. Ideally this would be checking chip_device_platform or so
# to be more fine-grained than current_os, but it's not clear that
# we can access that here.
if (current_os != "freertos" && current_os != "mbed" &&
# cmsis-rtos is OpenIOT
current_os != "cmsis-rtos" &&
# cyw30739 is one of the Infineon builds
current_os != "cyw30739") {
cflags += [ "-Wundef" ]
}

if (matter_enable_java_compilation) {
cflags -= [ "-Wshadow" ]
}
Expand Down
9 changes: 9 additions & 0 deletions docs/examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ darwin-framework-tool/README
java-matter-controller/README
```

## Kotlin matter controller example

```{toctree}
:glob:
:maxdepth: 1
kotlin-matter-controller/README
```

## Virtual Device App example

```{toctree}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,7 @@
"<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│ │ </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.OtaSoftwareUpdateRequestor'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">{</span>\n",
"<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│ │ │ </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.DefaultOTAProviders'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">[]</span>,\n",
"<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│ │ │ </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdatePossible'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #00ff00; text-decoration-color: #00ff00; font-style: italic\">True</span>,\n",
"<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│ │ │ </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateState'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">OTAUpdateStateEnum.kUnknown:</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span><span style=\"font-weight: bold\">&gt;</span>,\n",
"<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│ │ │ </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateState'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">UpdateStateEnum.kUnknown:</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span><span style=\"font-weight: bold\">&gt;</span>,\n",
"<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│ │ │ </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateStateProgress'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>,\n",
"<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│ │ │ </span><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">class</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #008000; text-decoration-color: #008000\">'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.ClusterRevision'</span><span style=\"font-weight: bold\">&gt;</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span>\n",
"<span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">│ │ </span><span style=\"font-weight: bold\">}</span>,\n",
Expand Down Expand Up @@ -2432,7 +2432,7 @@
"\u001b[2;32m│ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n",
"\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.DefaultOTAProviders'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\u001b[1m]\u001b[0m,\n",
"\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdatePossible'\u001b[0m\u001b[1m>\u001b[0m: \u001b[3;92mTrue\u001b[0m,\n",
"\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateState'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95mOTAUpdateStateEnum.kUnknown:\u001b[0m\u001b[39m \u001b[0m\u001b[1;36m0\u001b[0m\u001b[1m>\u001b[0m,\n",
"\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateState'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95mUpdateStateEnum.kUnknown:\u001b[0m\u001b[39m \u001b[0m\u001b[1;36m0\u001b[0m\u001b[1m>\u001b[0m,\n",
"\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateStateProgress'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n",
"\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.ClusterRevision'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m1\u001b[0m\n",
"\u001b[2;32m│ │ \u001b[0m\u001b[1m}\u001b[0m,\n",
Expand Down
Loading

0 comments on commit 41aaf74

Please sign in to comment.