Skip to content

Commit

Permalink
Add Linux door-lock app (project-chip#12907)
Browse files Browse the repository at this point in the history
* 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 <evgeniy.morozov@dsr-corporation.com>
  • Loading branch information
dustin-crossman and Morozov-5F authored Jan 4, 2022
1 parent a0a932a commit b006321
Show file tree
Hide file tree
Showing 35 changed files with 8,776 additions and 22 deletions.
1 change: 1 addition & 0 deletions .github/workflows/examples-linux-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
"./scripts/build/build_examples.py \
--target linux-arm64-all-clusters \
--target linux-arm64-chip-tool-ipv6only \
--target linux-arm64-door-lock \
--target linux-arm64-minmdns \
--target linux-arm64-thermostat-no-ble \
build \
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/examples-linux-standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,17 @@ jobs:
out/ota_requestor_debug/chip-ota-requestor-app \
/tmp/bloat_reports/
- name: Build example Standalone Door Lock App
timeout-minutes: 5
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target linux-x64-door-lock \
build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
linux debug door-lock-app \
out/linux-x64-door-lock/chip-door-lock-app \
/tmp/bloat_reports/
- name: Uploading Size Reports
uses: actions/upload-artifact@v2
if: ${{ !env.ACT }}
Expand Down
15 changes: 15 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
enable_linux_thermostat_app_build =
enable_default_builds && (host_os == "linux" || host_os == "mac")

# Build the Linux door lock app example.
enable_linux_door_lock_app_build =
enable_default_builds && (host_os == "linux" || host_os == "mac")

# Build the cc13x2x7_26x2x7 lock app example.
enable_cc13x2x7_26x2x7_lock_app_build = enable_ti_simplelink_builds

Expand Down Expand Up @@ -387,6 +391,14 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
}
}

if (enable_linux_door_lock_app_build) {
group("linux_door_lock_app") {
deps = [
"${chip_root}/examples/door-lock-app/linux(${standalone_toolchain})",
]
}
}

if (enable_efr32_lock_app_build) {
group("efr32_lock_app") {
deps = [ "${chip_root}/examples/lock-app/efr32(${chip_root}/config/efr32/toolchain:efr32_lock_app)" ]
Expand Down Expand Up @@ -484,6 +496,9 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
if (enable_linux_lighting_app_build) {
deps += [ ":linux_lighting_app" ]
}
if (enable_linux_door_lock_app_build) {
deps += [ ":linux_door_lock_app" ]
}
if (enable_efr32_lock_app_build) {
deps += [ ":efr32_lock_app" ]
}
Expand Down
25 changes: 25 additions & 0 deletions examples/door-lock-app/door-lock-common/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (c) 2020 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.

import("//build_overrides/chip.gni")
import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni")
import("${chip_root}/src/app/chip_data_model.gni")

chip_data_model("door-lock-common") {
zap_file = "door-lock-app.zap"

zap_pregenerated_dir =
"${chip_root}/zzz_generated/door-lock-app/zap-generated"
is_server = true
}
Loading

0 comments on commit b006321

Please sign in to comment.