Skip to content

Commit

Permalink
Fix efr32 builds (detected by cloudbuild, now added to CI) (#12708)
Browse files Browse the repository at this point in the history
* Cleanup test code: use strcpy for copying string instead of sprintf. Fix casts to make sprintf  always work

* Add required include

* Add builds using build_examples in CI

* Add builds using build_examples in CI

* Fix wrong sprintf to strcpy changes

* Fix efr32 wheels output

* Restyle fixes
  • Loading branch information
andy31415 authored and pull[bot] committed Jun 1, 2023
1 parent 35626e8 commit 3323237
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 114 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,23 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Build example EFR32 Lock App for BRD4161A
timeout-minutes: 10
- name: Build some BRD4161A variants
timeout-minutes: 30
run: |
scripts/examples/gn_efr32_example.sh examples/lock-app/efr32/ out/lock_app_debug BRD4161A
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A lock-app \
out/lock_app_debug/BRD4161A/chip-efr32-lock-example.out /tmp/bloat_reports/
- name: Build example EFR32 Lighting App for BRD4161A
timeout-minutes: 10
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--enable-flashbundle \
--target-glob '*-brd4161a-{lock,light,unit-test}' \
build \
--copy-artifacts-to out/artifacts \
"
- name: Prepare bloat report for light app
run: |
scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/lighting_app_debug BRD4161A
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A lighting-app \
out/lighting_app_debug/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
efr32 BRD4161A lighting-app \
out/efr32-brd4161a-light/chip-efr32-lighting-example.out \
/tmp/bloat_reports/
- name: Build example EFR32 Lighting App for BRD4161A with RPCs
timeout-minutes: 10
run: |
Expand Down
7 changes: 4 additions & 3 deletions scripts/build/builders/efr32.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,10 @@ def build_outputs(self):

if self.app == Efr32App.UNIT_TEST:
# Include test runner python wheels
items["chip_nl_test_runner_wheels"] = os.path.join(
self.output_dir, 'chip_nl_test_runner_wheels')

for root, dirs, files in os.walk(os.path.join(self.output_dir, 'chip_nl_test_runner_wheels')):
for file in files:
items["chip_nl_test_runner_wheels/" +
file] = os.path.join(root, file)
# Figure out flash bundle files and build accordingly
with open(os.path.join(self.output_dir, self.app.FlashBundleName())) as f:
for line in f.readlines():
Expand Down
2 changes: 0 additions & 2 deletions scripts/build/builders/mbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
import logging
import os
import platform
import glob
import shlex
import pathlib

from enum import Enum, auto
from .builder import Builder
Expand Down
Loading

0 comments on commit 3323237

Please sign in to comment.