From 7f70b3bbd3d427210372189357bdfc19674d2225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Mon, 1 Aug 2022 17:02:14 +0200 Subject: [PATCH] [nrfconnect] Fix Chef build (#21481) Remove obsolete OpenThread workaround causing the build failure. Signed-off-by: Damian Krolik --- .github/workflows/chef.yaml | 51 ++++++++++++------------ examples/chef/nrfconnect/CMakeLists.txt | 11 ----- examples/chef/nrfconnect/prj.conf | 2 +- examples/shell/nrfconnect/CMakeLists.txt | 10 ----- examples/shell/nrfconnect/prj.conf | 2 +- 5 files changed, 27 insertions(+), 49 deletions(-) diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index 892ccc9dc99ba7..c52c158b75c14f 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -79,31 +79,30 @@ jobs: run: | ./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t esp32" - # https://github.com/project-chip/connectedhomeip/issues/21465 - # chef_nrfconnect: - # name: Chef - NRFConnect CI Examples - # runs-on: ubuntu-latest - # if: github.actor != 'restyled-io[bot]' + chef_nrfconnect: + name: Chef - NRFConnect CI Examples + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' - # container: - # image: connectedhomeip/chip-build-nrf-platform:0.5.91 - # options: --user root + container: + image: connectedhomeip/chip-build-nrf-platform:0.5.91 + options: --user root - # steps: - # - uses: Wandalen/wretry.action@v1.0.15 - # name: Checkout - # with: - # action: actions/checkout@v3 - # with: | - # token: ${{ github.token }} - # attempt_limit: 3 - # attempt_delay: 2000 - # - name: Checkout submodules - # run: scripts/checkout_submodules.py --shallow --platform nrfconnect - # - name: Bootstrap - # timeout-minutes: 10 - # run: scripts/build/gn_bootstrap.sh - # - name: CI Examples NRFConnect - # shell: bash - # run: | - # ./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t nrfconnect" + steps: + - uses: Wandalen/wretry.action@v1.0.15 + name: Checkout + with: + action: actions/checkout@v3 + with: | + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 + - name: Checkout submodules + run: scripts/checkout_submodules.py --shallow --platform nrfconnect + - name: Bootstrap + timeout-minutes: 10 + run: scripts/build/gn_bootstrap.sh + - name: CI Examples NRFConnect + shell: bash + run: | + ./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t nrfconnect" diff --git a/examples/chef/nrfconnect/CMakeLists.txt b/examples/chef/nrfconnect/CMakeLists.txt index 81ab4e81285132..2b412e439a897d 100644 --- a/examples/chef/nrfconnect/CMakeLists.txt +++ b/examples/chef/nrfconnect/CMakeLists.txt @@ -98,17 +98,6 @@ chip_configure_data_model(app GEN_DIR ${GEN_DIR} ) - -# 1) The example needs be linked with openthread command line interpreter (required by cmd_otcli.cpp) -# 2) Zephyr shell must be disabled not to interfere with the example -# We can't achieve 1 and 2 with Kconfig since CONFIG_OPENTHREAD_SHELL implies CONFIG_SHELL. -# Hence the workaround below. -if(CONFIG_OPENTHREAD_FTD) - target_link_libraries(app INTERFACE openthread-cli-ftd) -elseif(CONFIG_OPENTHREAD_MTD) - target_link_libraries(app INTERFACE openthread-cli-mtd) -endif() - include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) diff --git a/examples/chef/nrfconnect/prj.conf b/examples/chef/nrfconnect/prj.conf index e43fdf593a7388..1f9c8a8c0a7a09 100644 --- a/examples/chef/nrfconnect/prj.conf +++ b/examples/chef/nrfconnect/prj.conf @@ -58,7 +58,7 @@ CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y # Configure CHIP shell CONFIG_CHIP_LIB_SHELL=y -CONFIG_OPENTHREAD_SHELL=n +CONFIG_OPENTHREAD_SHELL=y # Disable factory data support. CONFIG_CHIP_FACTORY_DATA=n diff --git a/examples/shell/nrfconnect/CMakeLists.txt b/examples/shell/nrfconnect/CMakeLists.txt index 7b05bd217c0486..06e929d309830a 100644 --- a/examples/shell/nrfconnect/CMakeLists.txt +++ b/examples/shell/nrfconnect/CMakeLists.txt @@ -52,14 +52,4 @@ target_sources(app PRIVATE ${APP_ROOT}/standalone/main.cpp ) -# 1) The example needs be linked with openthread command line interpreter (required by cmd_otcli.cpp) -# 2) Zephyr shell must be disabled not to interfere with the example -# We can't achieve 1 and 2 with Kconfig since CONFIG_OPENTHREAD_SHELL implies CONFIG_SHELL. -# Hence the workaround below. -if(CONFIG_OPENTHREAD_FTD) - target_link_libraries(app INTERFACE openthread-cli-ftd) -elseif(CONFIG_OPENTHREAD_MTD) - target_link_libraries(app INTERFACE openthread-cli-mtd) -endif() - include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) diff --git a/examples/shell/nrfconnect/prj.conf b/examples/shell/nrfconnect/prj.conf index 92eebfd349e607..c00eacaa34c0ae 100644 --- a/examples/shell/nrfconnect/prj.conf +++ b/examples/shell/nrfconnect/prj.conf @@ -26,7 +26,7 @@ CONFIG_DK_LIBRARY=y # Configure CHIP shell CONFIG_CHIP_LIB_SHELL=y -CONFIG_OPENTHREAD_SHELL=n +CONFIG_OPENTHREAD_SHELL=y # Some shell commands require OpenThread FTD configuration CONFIG_OPENTHREAD_MTD=n