Skip to content

Commit

Permalink
Adding air purifier example to buiuld scripts for cc32xx and also to …
Browse files Browse the repository at this point in the history
…cc32xx CI action
  • Loading branch information
mhazley committed Oct 24, 2023
1 parent 07d0417 commit 128ca0b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/examples-cc32xx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ def Buildcc32xxTarget():
# apps
target.AppendFixedTargets([
TargetPart('lock', app=cc32xxApp.LOCK),
TargetPart('air-purifier', app=cc32xxApp.AIR_PURIFIER),

])

Expand Down
7 changes: 7 additions & 0 deletions scripts/build/builders/cc32xx.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 128ca0b

Please sign in to comment.