From 072efd5f2449df025f35c2d6d7ae3750abfcd54b Mon Sep 17 00:00:00 2001 From: TelinkKrystian <121804296+TelinkKrystian@users.noreply.github.com> Date: Sat, 25 Feb 2023 15:04:48 +0100 Subject: [PATCH] [Telink] Handle building Lighting app with RPC feature by CI (#25300) * github_ci: Enable RPC builds It enables RPC builds in targets.py. Signed-off-by: Krystian Jankowski * github_ci: Add Lighting App with RPC It adds to Github CI Lighting app with RPC feature. Signed-off-by: Krystian Jankowski --------- Signed-off-by: Krystian Jankowski --- .github/workflows/examples-telink.yaml | 9 +++++++++ scripts/build/build/targets.py | 2 ++ scripts/build/builders/telink.py | 7 ++++++- scripts/build/testdata/all_targets_linux_x64.txt | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 2d03c8ef1549af..6c1865e4ad227d 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -106,6 +106,15 @@ jobs: out/telink-tlsr9518adk80d-light/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: Build example Telink Lighting App with RPC + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-light-rpc' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9518adk80d lighting-app-rpc \ + out/telink-tlsr9518adk80d-light/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + - name: Build example Telink Light Switch App run: | ./scripts/run_in_build_env.sh \ diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index dbaae497aa0aee..3b6e6b03805934 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -559,6 +559,8 @@ def BuildTelinkTarget(): TargetPart('thermostat', app=TelinkApp.THERMOSTAT), ]) + target.AppendModifier('rpc', enable_rpcs=True) + return target diff --git a/scripts/build/builders/telink.py b/scripts/build/builders/telink.py index e86c3712b9f185..d4434019874ef5 100644 --- a/scripts/build/builders/telink.py +++ b/scripts/build/builders/telink.py @@ -97,10 +97,12 @@ def __init__(self, root, runner, app: TelinkApp = TelinkApp, - board: TelinkBoard = TelinkBoard.TLSR9518ADK80D): + board: TelinkBoard = TelinkBoard.TLSR9518ADK80D, + enable_rpcs: bool = False): super(TelinkBuilder, self).__init__(root, runner) self.app = app self.board = board + self.enable_rpcs = enable_rpcs def get_cmd_prefixes(self): if not self._runner.dry_run: @@ -121,6 +123,9 @@ def generate(self): return flags = [] + if self.enable_rpcs: + flags.append("-DOVERLAY_CONFIG=rpc.overlay") + if self.options.pregen_dir: flags.append(f"-DCHIP_CODEGEN_PREGEN_DIR={shlex.quote(self.options.pregen_dir)}") diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index 4c89f3fb3a0bf3..ae69c14420f112 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -19,5 +19,5 @@ nrf-{nrf5340dk,nrf52840dk,nrf52840dongle}-{all-clusters,all-clusters-minimal,loc nrf-native-posix-64-tests qpg-qpg6105-{lock,light,shell,persistent-storage} tizen-arm-{all-clusters,all-clusters-minimal,chip-tool,light}[-no-ble][-no-wifi][-asan][-ubsan] -telink-tlsr9518adk80d-{all-clusters,all-clusters-minimal,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,thermostat} +telink-tlsr9518adk80d-{all-clusters,all-clusters-minimal,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,thermostat}[-rpc] openiotsdk-{shell,lock}