From cce7b4556071f6441f74b04de0bb033a06d60e27 Mon Sep 17 00:00:00 2001 From: Alex Tsitsiura Date: Thu, 14 Sep 2023 22:05:59 +0300 Subject: [PATCH] [Telink] Cleanup CI (#29247) * [Telink] remove unused tools build files during app build * [Telink] restore required checkout_submodules * [Telink] rework due to CI syntax error * [Telink] use GLOBIGNORE instead of regular expression * [Telink] use separate folder (GLOBIGNORE doesn't work in CI) * [Telink] use just out folder --- .github/workflows/examples-telink.yaml | 12 +++++++++++- .../telink/chip-module/generate_factory_data.cmake | 6 +++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index f7ddf8dc340e1d..ce56a06b25db37 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -102,11 +102,18 @@ jobs: - name: clean out build output run: rm -rf ./out - - name: Build example Telink (B91) Lighting App with RPC, Shell and Factory Data + - name: Build tools required for Factory Data run: | ./scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux ./scripts/build/gn_gen.sh ./scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE chip-cert chip-tool spake2p" + mv ./out/$BUILD_TYPE/chip-cert ./out/$BUILD_TYPE/chip-tool ./out/$BUILD_TYPE/spake2p ./out + + - name: clean out build output (keep tools) + run: rm -rf ./out/telink* + + - name: Build example Telink (B91) Lighting App with RPC, Shell and Factory Data + run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-light-rpc-shell-factory-data' build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -114,6 +121,9 @@ jobs: out/telink-tlsr9518adk80d-light-rpc-shell-factory-data/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: clean out build output (keep tools) + run: rm -rf ./out/telink* + - name: Build example Telink (B92) Lighting App with RPC, Shell and Factory Data run: | ./scripts/run_in_build_env.sh \ diff --git a/config/telink/chip-module/generate_factory_data.cmake b/config/telink/chip-module/generate_factory_data.cmake index 7798f101982787..9ba1903266c2dc 100644 --- a/config/telink/chip-module/generate_factory_data.cmake +++ b/config/telink/chip-module/generate_factory_data.cmake @@ -69,7 +69,7 @@ else() endif() # find chip cert tool -find_program(chip_cert_exe NAMES chip-cert PATHS ${CHIP_ROOT}/out/telink REQUIRED) +find_program(chip_cert_exe NAMES chip-cert PATHS ${CHIP_ROOT}/out REQUIRED) string(APPEND script_args "--chip-cert-path ${chip_cert_exe}\n") # for development purpose user can use default certs instead of generating or providing them @@ -99,7 +99,7 @@ else() endif() # find chip tool requied for generating QRCode -find_program(chip_tool_exe NAMES chip-tool PATHS ${CHIP_ROOT}/out/telink REQUIRED) +find_program(chip_tool_exe NAMES chip-tool PATHS ${CHIP_ROOT}/out REQUIRED) string(APPEND script_args "--chip-tool-path ${chip_tool_exe}\n") # add Password-Authenticated Key Exchange parameters @@ -108,7 +108,7 @@ string(APPEND script_args "--discriminator ${CONFIG_CHIP_DEVICE_DISCRIMINATOR}\n string(APPEND script_args "--passcode ${CONFIG_CHIP_DEVICE_SPAKE2_PASSCODE}\n") # request spake2p to generate a new spake2_verifier -find_program(spake_exe NAMES spake2p PATHS ${CHIP_ROOT}/out/telink REQUIRED) +find_program(spake_exe NAMES spake2p PATHS ${CHIP_ROOT}/out REQUIRED) string(APPEND script_args "--spake2-path ${spake_exe}\n") if(CONFIG_CHIP_DEVICE_ENABLE_KEY)