From 128ca0b418871ed6eb68f085dc80af446d9ec351 Mon Sep 17 00:00:00 2001 From: Matthew Hazley Date: Tue, 24 Oct 2023 11:31:44 +0100 Subject: [PATCH] Adding air purifier example to buiuld scripts for cc32xx and also to cc32xx CI action --- .github/workflows/examples-cc32xx.yaml | 9 ++++++++- scripts/build/build/targets.py | 1 + scripts/build/builders/cc32xx.py | 7 +++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index 6c8d0362c38fff..5a77c801447b6e 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -57,7 +57,7 @@ jobs: run: | scripts/run_in_build_env.sh "\ ./scripts/build/build_examples.py \ - --target cc32xx-lock build \ + --target cc32xx-lock --target cc32xx-air-purifier build \ --copy-artifacts-to out/artifacts \ " - name: Get lock app size stats @@ -67,6 +67,13 @@ jobs: out/artifacts/cc32xx-lock/chip-CC3235SF_LAUNCHXL-lock-example.out \ /tmp/bloat_reports/ + - name: Get air purifier app size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cc32xx CC3235SF_LAUNCHXL air-purifier \ + out/artifacts/cc32xx-air-purifier/chip-CC3235SF_LAUNCHXL-air-purifier-example.out \ + /tmp/bloat_reports/ + - name: Uploading Size Reports uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 481a4c0a3f58ee..890895528b40dc 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -535,6 +535,7 @@ def Buildcc32xxTarget(): # apps target.AppendFixedTargets([ TargetPart('lock', app=cc32xxApp.LOCK), + TargetPart('air-purifier', app=cc32xxApp.AIR_PURIFIER), ]) diff --git a/scripts/build/builders/cc32xx.py b/scripts/build/builders/cc32xx.py index 7685b6a66af0fd..f54b7531eecc81 100644 --- a/scripts/build/builders/cc32xx.py +++ b/scripts/build/builders/cc32xx.py @@ -20,16 +20,21 @@ class cc32xxApp(Enum): LOCK = auto() + AIR_PURIFIER = auto() def ExampleName(self): if self == cc32xxApp.LOCK: return 'lock-app' + elif self == cc32xxApp.AIR_PURIFIER: + return 'air-purifier-app' else: raise Exception('Unknown app type: %r' % self) def AppNamePrefix(self): if self == cc32xxApp.LOCK: return 'chip-CC3235SF_LAUNCHXL-lock-example' + elif self == cc32xxApp.AIR_PURIFIER: + return 'chip-CC3235SF_LAUNCHXL-air-purifier-example' else: raise Exception('Unknown app type: %r' % self) @@ -60,6 +65,8 @@ def build_outputs(self): items = {} if (self.app == cc32xxApp.LOCK): extensions = [".out", ".bin", ".out.map"] + elif (self.app == cc32xxApp.AIR_PURIFIER): + extensions = [".out", ".bin", ".out.map"] else: raise Exception('Unknown app type: %r' % self.app)