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 ef36347
Show file tree
Hide file tree
Showing 10 changed files with 126 additions and 40 deletions.
60 changes: 30 additions & 30 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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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
20 changes: 20 additions & 0 deletions examples/all-clusters-app/nrfconnect/sysbuild_dfu.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# 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
SB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y
20 changes: 20 additions & 0 deletions examples/all-clusters-app/nrfconnect/sysbuild_release.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# 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
SB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y
20 changes: 20 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,20 @@
#
# 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
SB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y
20 changes: 20 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,20 @@
#
# 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
SB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y
8 changes: 4 additions & 4 deletions examples/chef/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ def bundle_nrfconnect(device_name: str) -> None:
nrf_root = os.path.join(_CHEF_SCRIPT_PATH,
"nrfconnect",
"build",
"nrfconnect",
"zephyr")
scripts_root = os.path.join(_REPO_BASE_PATH,
"scripts",
Expand Down Expand Up @@ -723,9 +724,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 +738,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
6 changes: 6 additions & 0 deletions examples/chef/nrfconnect/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
#
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's devices directory.

rsource "../../../config/nrfconnect/chip-module/Kconfig.defaults"
rsource "../../../config/nrfconnect/chip-module/Kconfig.features"
source "Kconfig.zephyr"
2 changes: 1 addition & 1 deletion scripts/build/builders/nrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def generate(self):
export ZEPHYR_SDK_INSTALL_DIR={zephyr_sdk_dir};'''

cmd += '''
west build --cmake-only -d {outdir} -b {board} {sourcedir}{build_flags} --sysbuild
west build --cmake-only -d {outdir} -b {board} --sysbuild {sourcedir}{build_flags}
'''.format(
outdir=shlex.quote(self.output_dir),
board=self.board.GnArgName(),
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/testdata/dry_run_nrf-nrf52840dk-pump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cd "{root}"
# Generating nrf-nrf52840dk-pump
bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh";
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr;
west build --cmake-only -d {out}/nrf-nrf52840dk-pump -b nrf52840dk_nrf52840 {root}/examples/pump-app/nrfconnect'
west build --cmake-only -d {out}/nrf-nrf52840dk-pump -b nrf52840dk_nrf52840 --sysbuild {root}/examples/pump-app/nrfconnect'

# Building nrf-nrf52840dk-pump
ninja -C {out}/nrf-nrf52840dk-pump

0 comments on commit ef36347

Please sign in to comment.