Skip to content

Commit 4787684

Browse files
dustin-crossmanMorozov-5F
authored andcommitted
Add Linux door-lock app (#12907)
* Add linux lock app stub. * Add LockManager to linux lock app * Add linux door-lock app to github workflows. * Add door lock cluster to door lock app zap. * Regen auto-generated stuff. * Working on door-lock implementation. * Update a couple auto-generated files. Remove deleted include file. Updating lock-app.zap with more commands and regen files. * More door-lock fixes/improvements. * Cleaning up lock app a bit. * Add linux lock app to build_examples.py script and use it in github workflows. * Addressing review feedback. * Fixup some auto-generated files. * Ran through clang-format. * Regen files. * More review feedback. * Restyle gn files. * Added weak definitions for Lock/Unlock commands. * Addressing review feedback. * Restyle * Quick fix. * Fix format strings in Door Lock cluster * Add Door Lock Cluster to an mbedOS build * Fix format strings and parameter usage * Add placeholder README.md * Make lock-app to build on Darwin * Fix Linux Build tests by adding appropriate targets * Fix formatting in README for linux lock app * Use proper path for Linux lock app in CI * Fix build errors on ESP32 * Update auto-generated files * Fix ESP32 build lock-app build * Move door lock app to the separate example * Fix styling issues Co-authored-by: Morozov-5F <[email protected]>
1 parent 16d2cad commit 4787684

35 files changed

+8776
-22
lines changed

.github/workflows/examples-linux-arm.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565
"./scripts/build/build_examples.py \
6666
--target linux-arm64-all-clusters \
6767
--target linux-arm64-chip-tool-ipv6only \
68+
--target linux-arm64-door-lock \
6869
--target linux-arm64-minmdns \
6970
--target linux-arm64-thermostat-no-ble \
7071
build \

.github/workflows/examples-linux-standalone.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,17 @@ jobs:
128128
out/ota_requestor_debug/chip-ota-requestor-app \
129129
/tmp/bloat_reports/
130130
131+
- name: Build example Standalone Door Lock App
132+
timeout-minutes: 5
133+
run: |
134+
./scripts/run_in_build_env.sh \
135+
"./scripts/build/build_examples.py \
136+
--target linux-x64-door-lock \
137+
build"
138+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
139+
linux debug door-lock-app \
140+
out/linux-x64-door-lock/chip-door-lock-app \
141+
/tmp/bloat_reports/
131142
- name: Uploading Size Reports
132143
uses: actions/upload-artifact@v2
133144
if: ${{ !env.ACT }}

BUILD.gn

+15
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
236236
enable_linux_thermostat_app_build =
237237
enable_default_builds && (host_os == "linux" || host_os == "mac")
238238

239+
# Build the Linux door lock app example.
240+
enable_linux_door_lock_app_build =
241+
enable_default_builds && (host_os == "linux" || host_os == "mac")
242+
239243
# Build the cc13x2x7_26x2x7 lock app example.
240244
enable_cc13x2x7_26x2x7_lock_app_build = enable_ti_simplelink_builds
241245

@@ -387,6 +391,14 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
387391
}
388392
}
389393

394+
if (enable_linux_door_lock_app_build) {
395+
group("linux_door_lock_app") {
396+
deps = [
397+
"${chip_root}/examples/door-lock-app/linux(${standalone_toolchain})",
398+
]
399+
}
400+
}
401+
390402
if (enable_efr32_lock_app_build) {
391403
group("efr32_lock_app") {
392404
deps = [ "${chip_root}/examples/lock-app/efr32(${chip_root}/config/efr32/toolchain:efr32_lock_app)" ]
@@ -484,6 +496,9 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
484496
if (enable_linux_lighting_app_build) {
485497
deps += [ ":linux_lighting_app" ]
486498
}
499+
if (enable_linux_door_lock_app_build) {
500+
deps += [ ":linux_door_lock_app" ]
501+
}
487502
if (enable_efr32_lock_app_build) {
488503
deps += [ ":efr32_lock_app" ]
489504
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright (c) 2020 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import("//build_overrides/chip.gni")
16+
import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni")
17+
import("${chip_root}/src/app/chip_data_model.gni")
18+
19+
chip_data_model("door-lock-common") {
20+
zap_file = "door-lock-app.zap"
21+
22+
zap_pregenerated_dir =
23+
"${chip_root}/zzz_generated/door-lock-app/zap-generated"
24+
is_server = true
25+
}

0 commit comments

Comments
 (0)