Skip to content

Commit 04b2842

Browse files
[workflows] Fixed nrfconnect workflows
* Fixed paths to build artifacts in nrfconnect workflow * Fixed passing device type name to the chef app
1 parent f69cff3 commit 04b2842

File tree

8 files changed

+135
-53
lines changed

8 files changed

+135
-53
lines changed

.github/workflows/examples-nrfconnect.yaml

+45-45
Original file line numberDiff line numberDiff line change
@@ -78,119 +78,119 @@ jobs:
7878
- name: Build example nRF Connect SDK Lock App on nRF52840 DK
7979
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
8080
run: |
81-
scripts/examples/nrfconnect_example.sh lock-app nrf52840dk_nrf52840
81+
scripts/examples/nrfconnect_example.sh lock-app nrf52840dk/nrf52840
8282
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
83-
nrfconnect nrf52840dk_nrf52840 lock-app \
84-
examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \
83+
nrfconnect nrf52840dk/nrf52840 lock-app \
84+
examples/lock-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
8585
/tmp/bloat_reports/
8686
- name: Build example nRF Connect SDK Lighting App on nRF52840 Dongle
8787
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
8888
run: |
89-
scripts/examples/nrfconnect_example.sh lighting-app nrf52840dongle_nrf52840 -DCONFIG_CHIP_ROTATING_DEVICE_ID=y
89+
scripts/examples/nrfconnect_example.sh lighting-app nrf52840dongle/nrf52840 -DCONFIG_CHIP_ROTATING_DEVICE_ID=y
9090
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
91-
nrfconnect nrf52840dongle_nrf52840 lighting-app \
92-
examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \
91+
nrfconnect nrf52840dongle/nrf52840 lighting-app \
92+
examples/lighting-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
9393
/tmp/bloat_reports/
9494
- name: Build example nRF Connect SDK Lighting App on nRF52840 DK with RPC
9595
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
9696
run: |
97-
scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk_nrf52840 -DOVERLAY_CONFIG=rpc.overlay
97+
scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk/nrf52840 -DOVERLAY_CONFIG=rpc.overlay
9898
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
99-
nrfconnect nrf52840dk_nrf52840+rpc lighting-app \
100-
examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \
99+
nrfconnect nrf52840dk/nrf52840+rpc lighting-app \
100+
examples/lighting-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
101101
/tmp/bloat_reports/
102102
- name: Build example nRF Connect SDK Light Switch App on nRF52840 DK
103103
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
104104
run: |
105-
scripts/examples/nrfconnect_example.sh light-switch-app nrf52840dk_nrf52840
105+
scripts/examples/nrfconnect_example.sh light-switch-app nrf52840dk/nrf52840
106106
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
107-
nrfconnect nrf52840dk_nrf52840 light-switch-app \
108-
examples/light-switch-app/nrfconnect/build/zephyr/zephyr.elf \
107+
nrfconnect nrf52840dk/nrf52840 light-switch-app \
108+
examples/light-switch-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
109109
/tmp/bloat_reports/
110110
- name: Build example nRF Connect SDK Shell on nRF52840 DK
111111
if: github.event_name == 'push' || steps.changed_paths.outputs.shell == 'true'
112112
run: |
113-
scripts/examples/nrfconnect_example.sh shell nrf52840dk_nrf52840
113+
scripts/examples/nrfconnect_example.sh shell nrf52840dk/nrf52840
114114
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
115-
nrfconnect nrf52840dk_nrf52840 shell \
116-
examples/shell/nrfconnect/build/zephyr/zephyr.elf \
115+
nrfconnect nrf52840dk/nrf52840 shell \
116+
examples/shell/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
117117
/tmp/bloat_reports/
118118
- name: Build example nRF Connect SDK Pump App on nRF52840 DK
119119
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
120120
run: |
121-
scripts/examples/nrfconnect_example.sh pump-app nrf52840dk_nrf52840
121+
scripts/examples/nrfconnect_example.sh pump-app nrf52840dk/nrf52840
122122
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
123-
nrfconnect nrf52840dk_nrf52840 pump-app \
124-
examples/pump-app/nrfconnect/build/zephyr/zephyr.elf \
123+
nrfconnect nrf52840dk/nrf52840 pump-app \
124+
examples/pump-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
125125
/tmp/bloat_reports/
126126
- name: Build example nRF Connect SDK Pump Controller App on nRF52840 DK
127127
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
128128
run: |
129-
scripts/examples/nrfconnect_example.sh pump-controller-app nrf52840dk_nrf52840
129+
scripts/examples/nrfconnect_example.sh pump-controller-app nrf52840dk/nrf52840
130130
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
131-
nrfconnect nrf52840dk_nrf52840 pump-controller-app \
132-
examples/pump-controller-app/nrfconnect/build/zephyr/zephyr.elf \
131+
nrfconnect nrf52840dk/nrf52840 pump-controller-app \
132+
examples/pump-controller-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
133133
/tmp/bloat_reports/
134134
- name: Build example nRF Connect SDK All Clusters App on nRF52840 DK
135135
run: |
136-
scripts/examples/nrfconnect_example.sh all-clusters-app nrf52840dk_nrf52840
136+
scripts/examples/nrfconnect_example.sh all-clusters-app nrf52840dk/nrf52840
137137
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
138-
nrfconnect nrf52840dk_nrf52840 all-clusters-app \
139-
examples/all-clusters-app/nrfconnect/build/zephyr/zephyr.elf \
138+
nrfconnect nrf52840dk/nrf52840 all-clusters-app \
139+
examples/all-clusters-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
140140
/tmp/bloat_reports/
141141
- name: Build example nRF Connect SDK All Clusters Minimal App on nRF52840 DK
142142
run: |
143-
scripts/examples/nrfconnect_example.sh all-clusters-minimal-app nrf52840dk_nrf52840 -DCONF_FILE=prj_dfu.conf
143+
scripts/examples/nrfconnect_example.sh all-clusters-minimal-app nrf52840dk/nrf52840 -DCONF_FILE=prj_dfu.conf
144144
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
145-
nrfconnect nrf52840dk_nrf52840 all-clusters-minimal-app \
146-
examples/all-clusters-minimal-app/nrfconnect/build/zephyr/zephyr.elf \
145+
nrfconnect nrf52840dk/nrf52840 all-clusters-minimal-app \
146+
examples/all-clusters-minimal-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
147147
/tmp/bloat_reports/
148148
- name: Build example nRF Connect SDK Lock App on nRF5340 DK
149149
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
150150
run: |
151-
scripts/examples/nrfconnect_example.sh lock-app nrf5340dk_nrf5340_cpuapp
151+
scripts/examples/nrfconnect_example.sh lock-app nrf5340dk/nrf5340/cpuapp
152152
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
153-
nrfconnect nrf5340dk_nrf5340_cpuapp lock-app \
154-
examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \
153+
nrfconnect nrf5340dk/nrf5340/cpuapp lock-app \
154+
examples/lock-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
155155
/tmp/bloat_reports/
156156
- name: Build example nRF Connect SDK Lighting App on nRF5340 DK
157157
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
158158
run: |
159-
scripts/examples/nrfconnect_example.sh lighting-app nrf5340dk_nrf5340_cpuapp
159+
scripts/examples/nrfconnect_example.sh lighting-app nrf5340dk/nrf5340/cpuapp
160160
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
161-
nrfconnect nrf5340dk_nrf5340_cpuapp lighting-app \
162-
examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \
161+
nrfconnect nrf5340dk/nrf5340/cpuapp lighting-app \
162+
examples/lighting-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
163163
/tmp/bloat_reports/
164164
- name: Build example nRF Connect SDK Lock App on nRF7002 PDK
165165
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
166166
run: |
167-
scripts/examples/nrfconnect_example.sh lock-app nrf7002dk_nrf5340_cpuapp
167+
scripts/examples/nrfconnect_example.sh lock-app nrf7002dk/nrf5340/cpuapp
168168
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
169-
nrfconnect nrf7002dk_nrf5340_cpuapp lock-app \
170-
examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \
169+
nrfconnect nrf7002dk/nrf5340/cpuapp lock-app \
170+
examples/lock-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
171171
/tmp/bloat_reports/
172172
- name: Build example nRF Connect SDK Light Switch App on nRF7002 PDK
173173
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
174174
run: |
175-
scripts/examples/nrfconnect_example.sh light-switch-app nrf7002dk_nrf5340_cpuapp
175+
scripts/examples/nrfconnect_example.sh light-switch-app nrf7002dk/nrf5340/cpuapp
176176
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
177-
nrfconnect nrf7002dk_nrf5340_cpuapp light-switch-app \
178-
examples/light-switch-app/nrfconnect/build/zephyr/zephyr.elf \
177+
nrfconnect nrf7002dk/nrf5340/cpuapp light-switch-app \
178+
examples/light-switch-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
179179
/tmp/bloat_reports/
180180
- name: Build example nRF Connect SDK Lighting App on nRF7002 PDK
181181
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
182182
run: |
183-
scripts/examples/nrfconnect_example.sh lighting-app nrf7002dk_nrf5340_cpuapp
183+
scripts/examples/nrfconnect_example.sh lighting-app nrf7002dk/nrf5340/cpuapp
184184
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
185-
nrfconnect nrf7002dk_nrf5340_cpuapp lighting-app \
186-
examples/light-switch-app/nrfconnect/build/zephyr/zephyr.elf \
185+
nrfconnect nrf7002dk/nrf5340/cpuapp lighting-app \
186+
examples/light-switch-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
187187
/tmp/bloat_reports/
188188
- name: Build example nRF Connect SDK All Clusters App on nRF7002 PDK
189189
run: |
190-
scripts/examples/nrfconnect_example.sh all-clusters-app nrf7002dk_nrf5340_cpuapp -DCONF_FILE=prj_release.conf
190+
scripts/examples/nrfconnect_example.sh all-clusters-app nrf7002dk/nrf5340/cpuapp -DCONF_FILE=prj_release.conf
191191
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
192-
nrfconnect nrf7002dk_nrf5340_cpuapp all-clusters-app \
193-
examples/all-clusters-app/nrfconnect/build/zephyr/zephyr.elf \
192+
nrfconnect nrf7002dk/nrf5340/cpuapp all-clusters-app \
193+
examples/all-clusters-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
194194
/tmp/bloat_reports/
195195
- name: Run unit tests for Zephyr native_posix_64 platform
196196
if: github.event_name == 'push' || steps.changed_paths.outputs.tests == 'true' || steps.changed_paths.outputs.nrfconnect == 'true'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# Copyright (c) 2024 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
SB_CONFIG_MATTER=y
18+
SB_CONFIG_MATTER_OTA=y
19+
SB_CONFIG_BOOTLOADER_MCUBOOT=y
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# Copyright (c) 2024 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
SB_CONFIG_MATTER=y
18+
SB_CONFIG_MATTER_OTA=y
19+
SB_CONFIG_BOOTLOADER_MCUBOOT=y
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# Copyright (c) 2024 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
SB_CONFIG_MATTER=y
18+
SB_CONFIG_MATTER_OTA=y
19+
SB_CONFIG_BOOTLOADER_MCUBOOT=y
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# Copyright (c) 2024 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
SB_CONFIG_MATTER=y
18+
SB_CONFIG_MATTER_OTA=y
19+
SB_CONFIG_BOOTLOADER_MCUBOOT=y

examples/chef/chef.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ def bundle_nrfconnect(device_name: str) -> None:
199199
nrf_root = os.path.join(_CHEF_SCRIPT_PATH,
200200
"nrfconnect",
201201
"build",
202+
"nrfconnect",
202203
"zephyr")
203204
scripts_root = os.path.join(_REPO_BASE_PATH,
204205
"scripts",
@@ -723,9 +724,10 @@ def main() -> int:
723724
f"cp build/$(git rev-parse HEAD)-{options.sample_device_type_name}.tar.xz {_CHEF_SCRIPT_PATH}")
724725
elif options.build_target == "nrfconnect":
725726
shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/nrfconnect")
726-
nrf_build_cmds = ["west build -b nrf52840dk_nrf52840"]
727+
nrf_build_cmds = ["west build -b nrf52840dk/nrf52840"]
727728
if options.do_clean:
728729
nrf_build_cmds.append("-p always")
730+
nrf_build_cmds.append("--sysbuild")
729731
nrf_build_cmds.append("--")
730732
if options.do_rpc:
731733
nrf_build_cmds.append("-DOVERLAY_CONFIG=rpc.overlay")
@@ -736,11 +738,9 @@ def main() -> int:
736738
nrf_build_cmds.append(
737739
f"-DCONFIG_CHIP_DEVICE_PRODUCT_NAME='\"{options.pname}\"'")
738740
nrf_build_cmds.append(
739-
f"-DSAMPLE_NAME={options.sample_device_type_name}")
741+
f"-DCONFIG_CHEF_DEVICE_TYPE='\"{options.sample_device_type_name}\"'")
740742
nrf_build_cmds.append(
741743
f"-DCONFIG_CHIP_DEVICE_SOFTWARE_VERSION_STRING='\"{sw_ver_string}\"'")
742-
nrf_build_cmds.append(
743-
f"--sysbuild")
744744

745745
shell.run_cmd(" ".join(nrf_build_cmds))
746746

examples/chef/nrfconnect/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ get_filename_component(CHEF ${CMAKE_CURRENT_SOURCE_DIR}/../ REALPATH)
2121

2222
include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake)
2323

24-
get_filename_component(GEN_DIR ${CHEF}/out/${SAMPLE_NAME}/zap-generated REALPATH)
25-
2624
set(CONF_FILE prj.conf)
2725

2826
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
@@ -39,6 +37,8 @@ endif()
3937

4038
find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
4139

40+
get_filename_component(GEN_DIR ${CHEF}/out/${CONFIG_CHEF_DEVICE_TYPE}/zap-generated REALPATH)
41+
4242
project(chip-nrfconnect-chef-example)
4343

4444
include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake)
@@ -104,10 +104,10 @@ target_sources(app PRIVATE
104104
${CHEF}/nrfconnect/main.cpp
105105
)
106106

107-
message(STATUS ${CHEF}/devices/${SAMPLE_NAME}.zap)
107+
message(STATUS ${CHEF}/devices/${CONFIG_CHEF_DEVICE_TYPE}.zap)
108108
chip_configure_data_model(app
109109
INCLUDE_SERVER
110-
ZAP_FILE ${CHEF}/devices/${SAMPLE_NAME}.zap
110+
ZAP_FILE ${CHEF}/devices/${CONFIG_CHEF_DEVICE_TYPE}.zap
111111
)
112112

113113
include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake)

examples/chef/nrfconnect/Kconfig

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
#
1616
mainmenu "Matter nRF Connect Chef Example Application"
1717

18+
config CHEF_DEVICE_TYPE
19+
string "Chef app device type"
20+
default ""
21+
help
22+
Specifies the device type used to generate data model for the chef app. It should be the string literal matching one of the file names located in the chef's devices directory.
23+
1824
rsource "../../../config/nrfconnect/chip-module/Kconfig.defaults"
1925
rsource "../../../config/nrfconnect/chip-module/Kconfig.features"
2026
source "Kconfig.zephyr"

0 commit comments

Comments
 (0)