Skip to content

Commit

Permalink
[workflows] Fixed nrfconnect workflows
Browse files Browse the repository at this point in the history
* Fixed paths to build artifacts in nrfconnect workflow
* Fixed passing device type name to the chef app
  • Loading branch information
kkasperczyk-no committed Jul 22, 2024
1 parent f69cff3 commit 48ef754
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 53 deletions.
90 changes: 45 additions & 45 deletions .github/workflows/examples-nrfconnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,119 +78,119 @@ jobs:
- name: Build example nRF Connect SDK Lock App on nRF52840 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
run: |
scripts/examples/nrfconnect_example.sh lock-app nrf52840dk_nrf52840
scripts/examples/nrfconnect_example.sh lock-app nrf52840dk/nrf52840
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf52840dk_nrf52840 lock-app \
examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \
nrfconnect nrf52840dk/nrf52840 lock-app \
examples/lock-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lighting App on nRF52840 Dongle
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
run: |
scripts/examples/nrfconnect_example.sh lighting-app nrf52840dongle_nrf52840 -DCONFIG_CHIP_ROTATING_DEVICE_ID=y
scripts/examples/nrfconnect_example.sh lighting-app nrf52840dongle/nrf52840 -DCONFIG_CHIP_ROTATING_DEVICE_ID=y
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf52840dongle_nrf52840 lighting-app \
examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \
nrfconnect nrf52840dongle/nrf52840 lighting-app \
examples/lighting-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lighting App on nRF52840 DK with RPC
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
run: |
scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk_nrf52840 -DOVERLAY_CONFIG=rpc.overlay
scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk/nrf52840 -DOVERLAY_CONFIG=rpc.overlay
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf52840dk_nrf52840+rpc lighting-app \
examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \
nrfconnect nrf52840dk/nrf52840+rpc lighting-app \
examples/lighting-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Light Switch App on nRF52840 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
run: |
scripts/examples/nrfconnect_example.sh light-switch-app nrf52840dk_nrf52840
scripts/examples/nrfconnect_example.sh light-switch-app nrf52840dk/nrf52840
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf52840dk_nrf52840 light-switch-app \
examples/light-switch-app/nrfconnect/build/zephyr/zephyr.elf \
nrfconnect nrf52840dk/nrf52840 light-switch-app \
examples/light-switch-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Shell on nRF52840 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.shell == 'true'
run: |
scripts/examples/nrfconnect_example.sh shell nrf52840dk_nrf52840
scripts/examples/nrfconnect_example.sh shell nrf52840dk/nrf52840
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf52840dk_nrf52840 shell \
examples/shell/nrfconnect/build/zephyr/zephyr.elf \
nrfconnect nrf52840dk/nrf52840 shell \
examples/shell/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Pump App on nRF52840 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
run: |
scripts/examples/nrfconnect_example.sh pump-app nrf52840dk_nrf52840
scripts/examples/nrfconnect_example.sh pump-app nrf52840dk/nrf52840
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf52840dk_nrf52840 pump-app \
examples/pump-app/nrfconnect/build/zephyr/zephyr.elf \
nrfconnect nrf52840dk/nrf52840 pump-app \
examples/pump-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Pump Controller App on nRF52840 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
run: |
scripts/examples/nrfconnect_example.sh pump-controller-app nrf52840dk_nrf52840
scripts/examples/nrfconnect_example.sh pump-controller-app nrf52840dk/nrf52840
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf52840dk_nrf52840 pump-controller-app \
examples/pump-controller-app/nrfconnect/build/zephyr/zephyr.elf \
nrfconnect nrf52840dk/nrf52840 pump-controller-app \
examples/pump-controller-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK All Clusters App on nRF52840 DK
run: |
scripts/examples/nrfconnect_example.sh all-clusters-app nrf52840dk_nrf52840
scripts/examples/nrfconnect_example.sh all-clusters-app nrf52840dk/nrf52840
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf52840dk_nrf52840 all-clusters-app \
examples/all-clusters-app/nrfconnect/build/zephyr/zephyr.elf \
nrfconnect nrf52840dk/nrf52840 all-clusters-app \
examples/all-clusters-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK All Clusters Minimal App on nRF52840 DK
run: |
scripts/examples/nrfconnect_example.sh all-clusters-minimal-app nrf52840dk_nrf52840 -DCONF_FILE=prj_dfu.conf
scripts/examples/nrfconnect_example.sh all-clusters-minimal-app nrf52840dk/nrf52840 -DCONF_FILE=prj_dfu.conf
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf52840dk_nrf52840 all-clusters-minimal-app \
examples/all-clusters-minimal-app/nrfconnect/build/zephyr/zephyr.elf \
nrfconnect nrf52840dk/nrf52840 all-clusters-minimal-app \
examples/all-clusters-minimal-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lock App on nRF5340 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
run: |
scripts/examples/nrfconnect_example.sh lock-app nrf5340dk_nrf5340_cpuapp
scripts/examples/nrfconnect_example.sh lock-app nrf5340dk/nrf5340/cpuapp
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf5340dk_nrf5340_cpuapp lock-app \
examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \
nrfconnect nrf5340dk/nrf5340/cpuapp lock-app \
examples/lock-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lighting App on nRF5340 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
run: |
scripts/examples/nrfconnect_example.sh lighting-app nrf5340dk_nrf5340_cpuapp
scripts/examples/nrfconnect_example.sh lighting-app nrf5340dk/nrf5340/cpuapp
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf5340dk_nrf5340_cpuapp lighting-app \
examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \
nrfconnect nrf5340dk/nrf5340/cpuapp lighting-app \
examples/lighting-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lock App on nRF7002 PDK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
run: |
scripts/examples/nrfconnect_example.sh lock-app nrf7002dk_nrf5340_cpuapp
scripts/examples/nrfconnect_example.sh lock-app nrf7002dk/nrf5340/cpuapp
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf7002dk_nrf5340_cpuapp lock-app \
examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \
nrfconnect nrf7002dk/nrf5340/cpuapp lock-app \
examples/lock-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Light Switch App on nRF7002 PDK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
run: |
scripts/examples/nrfconnect_example.sh light-switch-app nrf7002dk_nrf5340_cpuapp
scripts/examples/nrfconnect_example.sh light-switch-app nrf7002dk/nrf5340/cpuapp
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf7002dk_nrf5340_cpuapp light-switch-app \
examples/light-switch-app/nrfconnect/build/zephyr/zephyr.elf \
nrfconnect nrf7002dk/nrf5340/cpuapp light-switch-app \
examples/light-switch-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lighting App on nRF7002 PDK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
run: |
scripts/examples/nrfconnect_example.sh lighting-app nrf7002dk_nrf5340_cpuapp
scripts/examples/nrfconnect_example.sh lighting-app nrf7002dk/nrf5340/cpuapp
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf7002dk_nrf5340_cpuapp lighting-app \
examples/light-switch-app/nrfconnect/build/zephyr/zephyr.elf \
nrfconnect nrf7002dk/nrf5340/cpuapp lighting-app \
examples/light-switch-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK All Clusters App on nRF7002 PDK
run: |
scripts/examples/nrfconnect_example.sh all-clusters-app nrf7002dk_nrf5340_cpuapp -DCONF_FILE=prj_release.conf
scripts/examples/nrfconnect_example.sh all-clusters-app nrf7002dk/nrf5340/cpuapp -DCONF_FILE=prj_release.conf
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf7002dk_nrf5340_cpuapp all-clusters-app \
examples/all-clusters-app/nrfconnect/build/zephyr/zephyr.elf \
nrfconnect nrf7002dk/nrf5340/cpuapp all-clusters-app \
examples/all-clusters-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Run unit tests for Zephyr native_posix_64 platform
if: github.event_name == 'push' || steps.changed_paths.outputs.tests == 'true' || steps.changed_paths.outputs.nrfconnect == 'true'
Expand Down
19 changes: 19 additions & 0 deletions examples/all-clusters-app/nrfconnect/sysbuild_dfu.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# Copyright (c) 2024 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.
#

SB_CONFIG_MATTER=y
SB_CONFIG_MATTER_OTA=y
SB_CONFIG_BOOTLOADER_MCUBOOT=y
19 changes: 19 additions & 0 deletions examples/all-clusters-app/nrfconnect/sysbuild_release.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# Copyright (c) 2024 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.
#

SB_CONFIG_MATTER=y
SB_CONFIG_MATTER_OTA=y
SB_CONFIG_BOOTLOADER_MCUBOOT=y
19 changes: 19 additions & 0 deletions examples/all-clusters-minimal-app/nrfconnect/sysbuild_dfu.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# Copyright (c) 2024 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.
#

SB_CONFIG_MATTER=y
SB_CONFIG_MATTER_OTA=y
SB_CONFIG_BOOTLOADER_MCUBOOT=y
19 changes: 19 additions & 0 deletions examples/all-clusters-minimal-app/nrfconnect/sysbuild_release.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# Copyright (c) 2024 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.
#

SB_CONFIG_MATTER=y
SB_CONFIG_MATTER_OTA=y
SB_CONFIG_BOOTLOADER_MCUBOOT=y
7 changes: 3 additions & 4 deletions examples/chef/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,9 +723,10 @@ def main() -> int:
f"cp build/$(git rev-parse HEAD)-{options.sample_device_type_name}.tar.xz {_CHEF_SCRIPT_PATH}")
elif options.build_target == "nrfconnect":
shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/nrfconnect")
nrf_build_cmds = ["west build -b nrf52840dk_nrf52840"]
nrf_build_cmds = ["west build -b nrf52840dk/nrf52840"]
if options.do_clean:
nrf_build_cmds.append("-p always")
nrf_build_cmds.append("--sysbuild")
nrf_build_cmds.append("--")
if options.do_rpc:
nrf_build_cmds.append("-DOVERLAY_CONFIG=rpc.overlay")
Expand All @@ -736,11 +737,9 @@ def main() -> int:
nrf_build_cmds.append(
f"-DCONFIG_CHIP_DEVICE_PRODUCT_NAME='\"{options.pname}\"'")
nrf_build_cmds.append(
f"-DSAMPLE_NAME={options.sample_device_type_name}")
f"-DCONFIG_CHEF_DEVICE_TYPE='\"{options.sample_device_type_name}\"'")
nrf_build_cmds.append(
f"-DCONFIG_CHIP_DEVICE_SOFTWARE_VERSION_STRING='\"{sw_ver_string}\"'")
nrf_build_cmds.append(
f"--sysbuild")

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

Expand Down
8 changes: 4 additions & 4 deletions examples/chef/nrfconnect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ get_filename_component(CHEF ${CMAKE_CURRENT_SOURCE_DIR}/../ REALPATH)

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

get_filename_component(GEN_DIR ${CHEF}/out/${SAMPLE_NAME}/zap-generated REALPATH)

set(CONF_FILE prj.conf)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
Expand All @@ -39,6 +37,8 @@ endif()

find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})

get_filename_component(GEN_DIR ${CHEF}/out/${CONFIG_CHEF_DEVICE_TYPE}/zap-generated REALPATH)

project(chip-nrfconnect-chef-example)

include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake)
Expand Down Expand Up @@ -104,10 +104,10 @@ target_sources(app PRIVATE
${CHEF}/nrfconnect/main.cpp
)

message(STATUS ${CHEF}/devices/${SAMPLE_NAME}.zap)
message(STATUS ${CHEF}/devices/${CONFIG_CHEF_DEVICE_TYPE}.zap)
chip_configure_data_model(app
INCLUDE_SERVER
ZAP_FILE ${CHEF}/devices/${SAMPLE_NAME}.zap
ZAP_FILE ${CHEF}/devices/${CONFIG_CHEF_DEVICE_TYPE}.zap
)

include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake)
Expand Down
8 changes: 8 additions & 0 deletions examples/chef/nrfconnect/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
#
mainmenu "Matter nRF Connect Chef Example Application"

config CHEF_DEVICE_TYPE
string "Chef app device type"
default ""
help
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/devices directory.

rsource "../../../config/nrfconnect/chip-module/Kconfig.defaults"
rsource "../../../config/nrfconnect/chip-module/Kconfig.features"
source "Kconfig.zephyr"

0 comments on commit 48ef754

Please sign in to comment.