Skip to content

Commit

Permalink
[Telink] Handle building Lighting app with RPC feature by CI (#25300)
Browse files Browse the repository at this point in the history
* github_ci: Enable RPC builds

It enables RPC builds in targets.py.

Signed-off-by: Krystian Jankowski <krystian.jankowski@telink-semi.com>

* github_ci: Add Lighting App with RPC

It adds to Github CI Lighting app with RPC feature.

Signed-off-by: Krystian Jankowski <krystian.jankowski@telink-semi.com>

---------

Signed-off-by: Krystian Jankowski <krystian.jankowski@telink-semi.com>
  • Loading branch information
TelinkKrystian authored and pull[bot] committed Oct 20, 2023
1 parent 0109c0f commit 1175059
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/examples-telink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 2 additions & 0 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,8 @@ def BuildTelinkTarget():
TargetPart('thermostat', app=TelinkApp.THERMOSTAT),
])

target.AppendModifier('rpc', enable_rpcs=True)

return target


Expand Down
7 changes: 6 additions & 1 deletion scripts/build/builders/telink.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)}")

Expand Down
2 changes: 1 addition & 1 deletion scripts/build/testdata/all_targets_linux_x64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit 1175059

Please sign in to comment.