Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
ade06e7
Revert "SWPROT-8953: zpc: Relax Werror for release, to be reverted"
rzr Feb 11, 2025
a4179bb
Revert "SWPROT-8953: libs2: Relax Werror for release, to be reverted"
rzr Feb 14, 2025
93cfcd6
SWPROT-8953: ci: Pull annotated tag
rzr Feb 18, 2025
d7f90d3
SWPROT-8953: cmake: Drop vers_1.7.0 hardcoded version
rzr Feb 18, 2025
8ff4397
SWPROT-8953: git: Remove .gitattributes to be part of next release
rzr Feb 17, 2025
eff5532
SWPROT-8953: zpc: rust: Bump unsafe-libyaml
rzr Feb 14, 2025
9f33ffe
SWPROT-8953: docs: a/z/d: Update supported_command_classes.rst
rzr Feb 20, 2025
7f5c550
SWPROT-8953: build: ci: Allow build in forks .g/w/build-rootfs.yml
rzr Feb 14, 2025
b80bc58
libs2: SWPROT-9264: Store ZW_classcmd.h in a generated subdirectory …
anrivoal Jan 6, 2025
829cb6d
libs2: SWPROT-9272: Correct NLS Support advertising (#51)
Thomasdjb Jan 10, 2025
2fcf326
libs2: SWPROT-9264: Update libs2 Jenkinsfile with ZW_classcmd.h new p…
Thomasdjb Jan 10, 2025
ccdf0bb
docs: libs2: Update references for next release (#51)
rzr Mar 4, 2025
39c18f2
libs2/tf: NOJIRA: allow to declare mock with multiple calls (#57)
anrivoal Nov 13, 2023
ea8f0b4
libs2/tf: SWPROT-8720: removed C51 specific code in TestFramework (#57)
Luisky Feb 21, 2024
db797ad
libs2/tf: SWPROT-8720: remove unused python scripts in TestFramework …
Luisky Feb 22, 2024
33e344a
libs2/tf: SWPROT-8720: removed unity_print as it's useless on x86 (#57)
Luisky Feb 22, 2024
05f8ddd
libs2/tf: SWPROT-8720: removed unused cmake commands unity_test and C…
Luisky Feb 22, 2024
ca9bca9
libs2/tf: SWPROT-8720: removed unused __codasip__ checks (#57)
Luisky Feb 22, 2024
a7a9ee9
libs2/tf: SWPROT-8720: renamed zw700 to zw-protocol in comments (#57)
Luisky Feb 22, 2024
562be6a
libs2/tf: SWPROT-8720: fix find_package() for Python3 interpreter (#57)
Luisky Feb 21, 2024
9512478
libs2/tf: SWPROT-8720: fix Syntax warning for regex (#57)
Luisky Feb 21, 2024
b9a9feb
libs2/tf: SWPROT-8720: rewrote gen_test_runner.py for greater clarity…
Luisky Feb 22, 2024
ddee63a
libs2/tf: SWPROT-8720: remove unity bundled with TestFramwork as it w…
Luisky Feb 22, 2024
d605a13
libs2/tf: SWPROT-8720: move cmock in TestFramework (#57)
Luisky Feb 26, 2024
6f64658
libs2/tf: SWPROT-8720: move unity and cmock lib build in TestFramewor…
Luisky Feb 26, 2024
3469544
libs2/tf: SWPROT-8720: mandate the use of Python 3 with gen_test_runn…
Luisky Jul 11, 2024
463c06f
docs: Update NEWS.md with zw-testframework refs (#57)
rzr Mar 6, 2025
de71797
libs2/tf: Fix a/z/c/z/z/s/l/z/T/cmock submodule to v2.5.3-g9d092898 (…
rzr Mar 6, 2025
f04526b
libs2: SWPROT-9245: "NLS Node List Get/Report" implementation (#52)
silabs-aydogane Jan 17, 2025
e8b7217
libs2: SWPROT-9320: Store NLS status of primary/secondary controller …
silabs-aydogane Feb 6, 2025
d9995cc
libs2: zwave_transports: Align libs2 API in zwave_s2_transport.c (#52)
rzr Mar 5, 2025
bfd8e69
docs: Update NEWS.md with zw-libs2 refs (#52)
rzr Mar 6, 2025
10173ec
store: SWPROT-9246: "NLS Node List Get/Report" implementation (#53)
silabs-aydogane Feb 6, 2025
dda1886
SWPROT-9320 Controller NLS state storage (#54)
silabs-aydogane Feb 10, 2025
fe0f30f
SWPROT-8953: docs: zpc: Relocate debug page
rzr Feb 12, 2025
6a6f0e1
SWPROT-8953: doc/how_to_write_uam_files.rst: Removed as not part of z…
rzr Feb 13, 2025
7bbb2cd
SWPROT-8953: ci: github: Enable build in PR
rzr Mar 17, 2025
a5b9d46
libs2: SWPROT-9363: Remove s2_inclusion_controller from libS2
silabs-aydogane Mar 17, 2025
fdedcaa
s2: SWPROT-9363: Move s2_inclusion_controller to ZPC
silabs-aydogane Mar 17, 2025
1f508b6
tests: Fix a/z/c/z/test/zwave_command_class_time_parameters_test on U…
rzr Mar 17, 2025
1bf0fef
p/UnifySDK: Add patch that remove vendored cmock #60
rzr Mar 19, 2025
9512cd0
tests: p/UnifySDK: Add cmock patch Added-array_as_byte-config-op #60
rzr Mar 19, 2025
def7ec8
tests: p/UnifySDK: cmock: Use upstream cmock with patch #60
rzr Mar 19, 2025
b4469cd
build: p/UnifySDK: Add patch to remove some assets #77
rzr Mar 19, 2025
b352e5f
build: UnifySDK: Apply patches for zpc #77
rzr Mar 18, 2025
2445dfc
tests: build: cmake: Use Upstream cmock #60
rzr Feb 6, 2025
6911355
components/testframework/libs/cmock: Removed as not part of z-wave-pr…
rzr Feb 6, 2025
ed47b30
tests: SWPROT-8953: components/testframework/libs/testframework/unity…
rzr Mar 10, 2025
b39ec2b
tests: Revert "libs2/tf: Fix a/z/c/z/z/s/l/z/T/cmock submodule to v2.…
rzr Mar 13, 2025
4aa857a
tests: Deduplicate test_framework using patched Unify one #60
rzr Mar 17, 2025
8162055
tests: Deduplicate test_framework in a/z/c/z/z/s/l/zw-libs2
rzr Mar 19, 2025
fa0a832
tests: applications/zpc/components/zwave/zwave_transports/s2/libs/zw-…
rzr Mar 17, 2025
49cb993
tests: a/z/c/z/z/s/l/zw-libs2/t/cmock: Removed as not part of z-wave-…
rzr Mar 17, 2025
b04ad89
tests: a/z/c/z/z/s/l/zw-libs2/TestFramework: Removed as not part of z…
rzr Mar 17, 2025
bd39577
tests: c/t/l/testframework: Removed as not part of z-wave-protocol-co…
rzr Mar 17, 2025
3789365
tests: c/testframework: Removed as not part of z-wave-protocol-contro…
rzr Mar 17, 2025
e1d3c87
tests: Enable a/z/c/dotdot_mapper/test #46
rzr Mar 17, 2025
72a7610
tests: Enable a/z/c/z_classes zwave_command_class_switch_multilevel_t…
rzr Mar 17, 2025
c63fbee
tests: Remove test bypassing #46
rzr Mar 18, 2025
e0e3061
build: d/host_dependencies.apt: Remove libasound2 for WSL #72
rzr Mar 18, 2025
2bfbd4c
SWPROT-8953: build: Add run rule (#72)
rzr Feb 17, 2025
dbc84df
SWPROT-8953: Docs add Quickstart instructions (#72)
rzr Feb 17, 2025
bd9fdd9
SWPROT-8953: git: Ignore temp files (#72)
rzr Feb 25, 2025
a85fccd
SWPROT-8953: docker: Run zpc in container (#72)
rzr Feb 20, 2025
8a2617c
p/UnifySDK: Add patch to remove uic-resources (LFS)
rzr Mar 24, 2025
cbbfde1
docker: Slim down run image to save space for github
rzr Mar 26, 2025
6608633
build: Remove zap, dev-ui deps as not used in zpc
rzr Mar 25, 2025
b866045
build: cmake: Ignore UnifySDK LFS
rzr Apr 16, 2025
a2249f8
ci: github: Add test action that prepare env for smoketests
rzr Apr 16, 2025
4c96a21
ci: github: Align docker image to zpc
rzr Apr 22, 2025
468ce4b
p/UnifySDK: Refresh patches series to align z-wave/core/zpc/main
rzr Mar 28, 2025
d2be800
docker: Wait broker before starting zpc
rzr Apr 18, 2025
93ef333
test: Add integration test using z-wave-stack-binaries to be used for CI
rzr Apr 16, 2025
e3f0985
ci: github: Enable z-wave-stack-binaries-test in detached mode
rzr Apr 17, 2025
ac67b78
test: helper: Add devel/integration/test rule for developer to smoketest
rzr Apr 18, 2025
6b0f79c
doc: script: Add wsl2 device support
Thomasdjb Apr 23, 2025
f14320b
SWPROT-9242: Move s2 protocol CC encryption handling to protocol CC
Thomasdjb Jan 31, 2025
16c3168
fix(cc): include header algorithms
lmolina Apr 24, 2025
2aa9f2b
SWPROT-8953: scripts/sd_card/pyshrink: Removed codedroped upstream co…
rzr Feb 14, 2025
875b332
fix(github): Use build git rev for testing
rzr Apr 29, 2025
7d73721
UIC-3544: core/zeal: U/p: Add UIC-3544-core-C-c-f-u_a_resolver.patch
rzr Feb 18, 2025
4f4829d
UIC-3517: core/zeal: U/p: Add UIC-3517-c-A-f_c-in-attribute.hpp-to-ea…
rzr Feb 18, 2025
79afe51
UIC-3544: zpc: C++ callback for uic_attribute_resolver
silabs-borisl Oct 28, 2024
843e9d4
fix(test): Download z-wave-stack-binaries supporting HOMEID cli
rzr Apr 29, 2025
369dbfd
fix(tests): Add HOMEID support for cli and improve debug
rzr Apr 25, 2025
d4be8b1
fix(ci): Adjust z-wave-stack-binaries name
rzr Apr 30, 2025
96b8d8d
fix(docs): correct typo in documents reference
lmolina Apr 25, 2025
f065d7d
fix(network_monitor): Delete previously allocated events in contiki
rzr Apr 30, 2025
7a4701c
sapi: Remove dead code ext_transport_security.c using rijndael-alg-fst
rzr May 12, 2025
2aade3b
tests: Update zwa app to latest and stick to it
rzr May 15, 2025
b6789cb
ci: github: Propagate test run outcome to commit status
rzr May 16, 2025
29c0f12
build: Harden XML parser in extract_get.py
rzr May 16, 2025
683ecb2
ci: github: Pin actions with sha as version
rzr May 20, 2025
635846d
ci: github: Restrict permissions for actions, test update commit status
rzr May 20, 2025
8a02bcb
ci: github: Fix change status of head of failed run
rzr May 22, 2025
9355fe6
Remove dependency to zpc_config.
adigie Jun 7, 2022
10d0e15
Remove dependency to zwave_smartstart_management.
adigie May 12, 2023
a0ab6ae
zpc: SWPROT-9418: Add testlib
Thomasdjb May 22, 2025
27ac508
zpc: SWPROT-9418: Add support for emulated tick mode
Thomasdjb May 22, 2025
6c9c213
Handle default region as EU.
adigie Jun 14, 2022
074280a
FUNC_ID_ZW_ASSIGN_PRIORITY_RETURN_ROUTE
adigie Aug 4, 2022
36a855f
FUNC_ID_ZW_ASSIGN_PRIORITY_SUC_RETURN_ROUTE
adigie Aug 4, 2022
b1c2f79
Add classic inclusion (direct range).
adigie Jul 27, 2022
f510498
Don't automatically take SIS role.
adigie Aug 8, 2022
a95c666
Add inclusion_protocol argument to on_new_network_entered.
adigie Aug 31, 2022
60076ec
Handle NM_EV_ABORT in NM_LEARN_MODE_STARTED.
adigie Oct 18, 2022
e8b7de3
Refresh network information after timeout or abort in NM_LEARN_MODE.
adigie Oct 18, 2022
b331705
Always send empty SECURITY_COMMANDS_SUPPORTED_REPORT.
adigie Feb 16, 2023
1309472
SWPROT-9418: Add zwave_s2_testlib library
Thomasdjb Mar 25, 2025
f65d52e
zpc: SWPROT-9418: Use uic_main_testlib library
Thomasdjb May 22, 2025
160a10b
zpc: SWPROT-9418: Use unify_testlib library
Thomasdjb May 22, 2025
a0dcacb
SWPROT-9418: Restore zwave_controller and create zwave_controller_tes…
Thomasdjb Mar 26, 2025
754eace
SWPROT-9418: Restore zwave_rx and create zwave_rx_testlib
Thomasdjb Mar 26, 2025
2f4efba
SWPROT-9418: create zwave_network_management_testlib
Thomasdjb Mar 26, 2025
da23273
SWPROT-9418: Add library zwave_transport_testlib
Thomasdjb Mar 26, 2025
8a2fafb
SWPROT-9418: Link testlib on new _testlib libs
Thomasdjb Mar 26, 2025
a29dc53
SWPROT-9418: Revert "UIC-3274: CRC16 Encapsulation"
Thomasdjb Mar 27, 2025
2cc703b
SWPROT-9418: Created shared library zwave_testlib
Thomasdjb Mar 27, 2025
c13247e
SWPROT-9418: Create zwave_s0_testlib library
Thomasdjb Mar 31, 2025
398e5ee
SWPROT-9418: Add inclusion protocol to network_monitor_on_network_ready
Thomasdjb Mar 31, 2025
8270d29
GH-45: Add UnifySDK patchs for testlib libraries
Thomasdjb May 23, 2025
f4f3d3e
GH-45: Fix zwave_network_management_learn_mode_test
Thomasdjb Jun 6, 2025
6cac2ce
GH-45: Fix zwave_network_management_test
Thomasdjb Jun 6, 2025
8a9becd
GH-45: Fix zwave_rx_test
Thomasdjb Jun 6, 2025
310b1f9
GH-45: Add install rule
Thomasdjb Jun 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
33 changes: 33 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# .dockerignore
Dockerfile
docker-compose.yml

# .gitignore
# Temporary files
*~
tmp
# All build folders
/build*/
# Visual Studio Code
.vscode/settings.json
.vscode/launch.json
.vscode/*.log
*.code-workspace
# JetBrains IDE
.idea/
# Cmake Projects in root ###
compile_commands.json
# Clangd index
.clangd/
.cache/
# BeyondCompare backup files
*.orig
# SonarScanner files
.scannerwork/
# Generated debconf files
applications/*/debconf/config
# Macos fs igores
*.DS_Store
# Other files
*.swp
*.gcov
6 changes: 0 additions & 6 deletions .gitattributes

This file was deleted.

25 changes: 19 additions & 6 deletions .github/workflows/build-rootfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on: # yamllint disable-line rule:truthy
- '*'
jobs:
build:
permissions:
contents: read
runs-on: ubuntu-24.04
strategy:
matrix:
Expand All @@ -16,9 +18,13 @@ jobs:
- arm64
# - armhf # TODO Enable when supported
steps:
- uses: actions/checkout@v4.1.1
# yamllint disable-line rule:line-length
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
# Relate-to: https://github.com/actions/checkout/pull/2081#2025
ref: ${{ github.ref }}

- id: describe
name: Describe HEAD
run: >-
Expand All @@ -31,7 +37,8 @@ jobs:
UNIFYSDK_GIT_TAG=${{ secrets.UNIFYSDK_GIT_TAG }}
./scripts/build-rootfs.sh
- name: Upload artifacts
uses: actions/upload-artifact@v4
# yamllint disable-line rule:line-length
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
# yamllint disable-line rule:line-length
name: ${{ github.event.repository.name }}-${{ steps.describe.outputs.describe }}-${{ matrix.arch }}
Expand All @@ -42,8 +49,12 @@ jobs:
./scripts/build-rootfs.sh docs/dist
- name: Upload Release Asset
id: upload-release-asset
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
env:
token-defined: ${{ secrets.GH_UNIFY_ACCESS_TOKEN != '' }}
# yamllint disable-line rule:line-length
if: ${{ env.token-defined == true && startsWith(github.ref, 'refs/tags/') }}
# yamllint disable-line rule:line-length
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2
with:
files: build/dist/*
# yamllint disable-line rule:line-length
Expand All @@ -52,7 +63,8 @@ jobs:
- name: Upload pages artifact
id: deployment
if: startsWith(github.ref, 'refs/tags/') && matrix.arch == 'amd64'
uses: actions/upload-pages-artifact@v3.0.1
# yamllint disable-line rule:line-length
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: docs/
deploy:
Expand All @@ -67,5 +79,6 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
# yamllint disable-line rule:line-length
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
if: startsWith(github.ref, 'refs/tags/')
34 changes: 27 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
# YAML -*- mode: yaml; tab-width: 2; indent-tabs-mode: nil; coding: utf-8 -*-
# SPDX-License-Identifier: Zlib
# SPDX-FileCopyrightText: Silicon Laboratories Inc. https://www.silabs.com
---

name: z-wave-protocol-controller Build in docker
name: build

on: # yamllint disable-line rule:truthy
push:

jobs:
build:
permissions:
contents: read
env:
project-name: z-wave-protocol-controller # This should be lowercase for docker (and aligned)
project-name: z-wave-protocol-controller # Align to docker (lowercase)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4.1.1
# yamllint disable-line rule:line-length
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- id: describe
Expand All @@ -22,18 +27,33 @@ jobs:
| tee $GITHUB_OUTPUT
- name: Build Docker image from sources
run: >-
df -h
&&
docker build
--tag "${{ env.project-name }}:latest"
--build-arg UNIFYSDK_GIT_REPOSITORY=${{ secrets.UNIFYSDK_GIT_REPOSITORY }}
--build-arg UNIFYSDK_GIT_TAG=${{ secrets.UNIFYSDK_GIT_TAG }}
--build-arg
UNIFYSDK_GIT_REPOSITORY=${{ secrets.UNIFYSDK_GIT_REPOSITORY }}
--build-arg
UNIFYSDK_GIT_TAG=${{ secrets.UNIFYSDK_GIT_TAG }}
.
&&
df -h

- name: Upload container image
# yamllint disable-line rule:line-length
uses: ishworkh/container-image-artifact-upload@5d71a2417f0576fa11fe770fb04ece58c4587714 # v2.0.0
with:
image: "${{ env.project-name }}:latest"
retention_days: 10

- name: Extract artifacts
run: >-
container=$(docker create "${{ env.project-name }}:latest")
&& docker cp
${container}:/usr/local/opt/${{ env.project-name }}/build/dist .
${container}:/usr/local/opt/${{ env.project-name }}/dist .
- name: Upload artifacts
uses: actions/upload-artifact@v4
# yamllint disable-line rule:line-length
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
# yamllint disable-line
name: ${{ github.event.repository.name }}-${{ steps.describe.outputs.describe }}
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# YAML -*- mode: yaml; tab-width: 2; indent-tabs-mode: nil; coding: utf-8 -*-
# SPDX-License-Identifier: Zlib
# SPDX-FileCopyrightText: Silicon Laboratories Inc. https://www.silabs.com
---

name: test

# yamllint disable-line rule:line-length
run-name: "test: ${{ github.event.workflow_run.head_branch }}#${{ github.event.workflow_run.head_commit.id }}"

on: # yamllint disable-line rule:truthy
workflow_run:
workflows: ["build"]
types:
- completed

jobs:
test:
permissions:
contents: read
statuses: write
env:
project-name: z-wave-protocol-controller # Align to docker (lowercase)
runs-on: ubuntu-24.04
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download image
# yamllint disable-line rule:line-length
uses: ishworkh/container-image-artifact-download@ccb3671db007622e886a2d7037eb62b119d5ffaf # v2.0.0
with:
image: "${{ env.project-name }}:latest"
workflow: "build"
token: ${{ secrets.GH_SL_ACCESS_TOKEN }}
workflow_run_id: ${{ github.event.workflow_run.id }}

# yamllint disable-line rule:line-length
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
ref: ${{ github.event.workflow_run.head_commit.id }}

- name: Download embedded applications package
# yamllint disable-line rule:line-length
uses: robinraju/release-downloader@daf26c55d821e836577a15f77d86ddc078948b05 # v1.12
with:
repository: 'Z-Wave-Alliance/z-wave-stack-binaries'
tag: 'v25.1.0-28-g7e0b50f'
fileName: 'z-wave-stack-binaries-*-Linux.tar.gz'
token: ${{ secrets.GH_ZWAVE_ACCESS_TOKEN }}
latest: true

- name: Setup
env:
debian_packages: time screen docker-compose mosquitto-clients jq wget
run: >-
set -x
&& sudo apt update
&& sudo apt install -y --no-install-recommends
${{ env.debian_packages }}
&& sudo apt-get clean -y
&& echo "https://github.com/Z-Wave-Alliance/z-wave-stack/issues/733"
&& mkdir -p z-wave-stack-binaries
&& tar xfz z-wave-stack-binaries-*-Linux.tar.gz
-C z-wave-stack-binaries
&& rm z-wave-stack-binaries-*-Linux.tar.gz
&& date -u

- name: Run
id: run
run: |
set -x
export ZPC_RUN_MODE="docker"
export ZPC_COMMAND="docker run ${{ env.project-name }}"
$ZPC_COMMAND --version
docker-compose pull
export ZPC_COMMAND="docker-compose up --abort-on-container-exit"
cd z-wave-stack-binaries/bin && file -E *_x86_REALTIME.elf && cd -
export ZPC_ARGS="--log.level=d"
./scripts/tests/z-wave-stack-binaries-test.sh
continue-on-error: true

- name: Propagate run status to commit status
# yamllint disable-line rule:line-length
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
if: always()
env:
status: ${{ steps.run.outcome }}
sha: ${{ github.event.workflow_run.head_commit.id }}
with:
script: |
await github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: process.env.sha,
state: process.env.status
})
process.exit(process.env.status == 'success' ? 0 : 1);
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# .gitignore
# Temporary files
*~
tmp
# All build folders
/build*/
# Visual Studio Code
.vscode/settings.json
.vscode/launch.json
.vscode/*.log
*.code-workspace
# JetBrains IDE
.idea/
# Cmake Projects in root ###
compile_commands.json
# Clangd index
.clangd/
.cache/
# BeyondCompare backup files
*.orig
# SonarScanner files
.scannerwork/
# Generated debconf files
applications/*/debconf/config
# Macos fs igores
*.DS_Store
# Other files
*.swp
*.gcov
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,19 @@ if(NOT DEFINED COMMON_LOCATION)
endif()

if(BUILD_TESTING)
include(cmake/modules/FindCMock.cmake)
set(THS-CMOCK_LOCATION "${cmock_SOURCE_DIR}")
set(THS-UNITY_LOCATION "${cmock_SOURCE_DIR}/vendor/unity")
# https://gitlab.kitware.com/cmake/cmake/-/issues/22813#note_1620373
option(BUILD_TESTING_PROPERTY_DISABLED "WARNING: Bypass some tests" True)
option(BUILD_TESTING_PROPERTY_DISABLED "WARNING: Bypass some tests" false)
if(BUILD_TESTING_PROPERTY_DISABLED)
message(WARNING "TODO: Some tests are bypassed, please help fixing them")
endif()
include(${CMAKE_SOURCE_DIR}/components/testframework/target_add_unittest.cmake)
# Testframework deduplicated, only one to be used
set(ZPC_TESTFRAMEWORK_PATH
${unifysdk_SOURCE_DIR}/components/testframework
)
include(${ZPC_TESTFRAMEWORK_PATH}/target_add_unittest.cmake)
include(cmake/include/unittest.cmake)
endif()

Expand Down
49 changes: 32 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
FROM debian:bookworm
# SPDX-License-Identifier: Zlib
# SPDX-FileCopyrightText: Silicon Laboratories Inc. https://www.silabs.com

ENV DEBIAN_FRONTEND noninteractive
ENV LC_ALL en_US.UTF-8
ENV LANG ${LC_ALL}
FROM debian:bookworm as builder

ARG UNIFYSDK_GIT_REPOSITORY https://github.com/SiliconLabs/UnifySDK
ARG UNIFYSDK_GIT_TAG main

RUN echo "# log: Configuring locales" \
&& set -x \
&& apt-get update -y \
&& apt-get install -y locales \
&& echo "${LC_ALL} UTF-8" | tee /etc/locale.gen \
&& locale-gen ${LC_ALL} \
&& dpkg-reconfigure locales \
&& TZ=Etc/UTC apt-get -y install tzdata \
&& date -u

ENV project z-wave-protocol-controller
ENV workdir /usr/local/opt/${project}
ADD . ${workdir}
Expand All @@ -25,14 +14,40 @@ WORKDIR ${workdir}

RUN echo "# log: Setup system" \
&& set -x \
&& apt-get install -y make sudo \
&& df -h \
&& apt-get update \
&& apt-get install -y --no-install-recommends -- make sudo \
&& ./helper.mk help setup \
&& date -u

RUN echo "# log: Build" \
&& set -x \
&& ./helper.mk \
&& date -u \
&& echo "# log: Clean to only keep packages to save space" \
&& mkdir -p dist \
&& cd dist \
&& unzip ../build/dist/${project}*.zip \
&& cd - \
&& ./helper.mk distclean \
&& date -u

FROM debian:bookworm
ENV project z-wave-protocol-controller
ENV workdir /usr/local/opt/${project}
COPY --from=builder ${workdir}/dist/ ${workdir}/dist/
WORKDIR ${workdir}

RUN echo "# log: Install to system" \
&& set -x \
&& apt-get update \
&& dpkg -i ./dist/${project}*/*.deb \
|| apt install -f -y --no-install-recommends \
&& echo "TODO: rm -rf dist # If artifacts are no more needed" \
&& apt-get clean -y \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/ \
&& df -h \
&& date -u

ENTRYPOINT [ "/usr/local/opt/z-wave-protocol-controller/helper.mk" ]
CMD [ "help" ]
ENTRYPOINT [ "/usr/bin/zpc" ]
CMD [ "--help" ]
Loading