Skip to content

Commit

Permalink
[NXP][scripts] Switch RW61X to use common NXP builder and workflow (#…
Browse files Browse the repository at this point in the history
…34510)

* [NXP][scripts] Switch RW61X to use common NXP builder

Signed-off-by: Martin Girardot <martin.girardot@nxp.com>

* Restyled by autopep8

* Restyled by isort

---------

Signed-off-by: Martin Girardot <martin.girardot@nxp.com>
Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
Martin-NXP and restyled-commits authored Jul 31, 2024
1 parent d5f3db3 commit f45fdb8
Show file tree
Hide file tree
Showing 7 changed files with 161 additions and 262 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/examples-nxp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,71 @@ jobs:
if: ${{ !env.ACT }}
with:
platform-name: K32W
rw61x:
name: RW61X

env:
BUILD_TYPE: gn_rw61x

runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-rw61x:66
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout submodules & Bootstrap
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: nxp
extra-submodule-parameters: --recursive

- name: Set up environment for size reports
uses: ./.github/actions/setup-size-reports
if: ${{ !env.ACT }}
with:
gh-context: ${{ toJson(github) }}

- name: Build RW61X all clusters example app
run: |
scripts/run_in_build_env.sh "\
./scripts/build/build_examples.py \
--target nxp-rw61x-freertos-all-clusters-wifi \
--target nxp-rw61x-freertos-all-clusters-thread \
--target nxp-rw61x-freertos-all-clusters-thread-wifi \
build \
--copy-artifacts-to out/artifacts \
"
- name: Build RW61X thermostat example app
run: |
scripts/run_in_build_env.sh "\
./scripts/build/build_examples.py \
--target nxp-rw61x-freertos-thermostat-wifi \
--target nxp-rw61x-freertos-thermostat-thread \
--target nxp-rw61x-freertos-thermostat-thread-wifi \
build \
--copy-artifacts-to out/artifacts \
"
- name: Build RW61X laundry-washer example app
run: |
scripts/run_in_build_env.sh "\
./scripts/build/build_examples.py \
--target nxp-rw61x-freertos-laundry-washer-wifi \
--target nxp-rw61x-freertos-laundry-washer-thread \
--target nxp-rw61x-freertos-laundry-washer-thread-wifi \
build \
--copy-artifacts-to out/artifacts \
"
- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
if: ${{ !env.ACT }}
with:
platform-name: RW61X
zephyr:
name: ZEPHYR_RW61X

Expand Down
96 changes: 0 additions & 96 deletions .github/workflows/examples-rw61x.yaml

This file was deleted.

1 change: 0 additions & 1 deletion scripts/build/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ pw_python_package("build_examples") {
"builders/nxp.py",
"builders/openiotsdk.py",
"builders/qpg.py",
"builders/rw61x.py",
"builders/telink.py",
"builders/tizen.py",
"runner/__init__.py",
Expand Down
27 changes: 5 additions & 22 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from builders.nxp import NxpApp, NxpBoard, NxpBuilder, NxpOsUsed
from builders.openiotsdk import OpenIotSdkApp, OpenIotSdkBuilder, OpenIotSdkCryptoBackend
from builders.qpg import QpgApp, QpgBoard, QpgBuilder
from builders.rw61x import RW61XApp, RW61XBuilder
from builders.stm32 import stm32App, stm32Board, stm32Builder
from builders.telink import TelinkApp, TelinkBoard, TelinkBuilder
from builders.ti import TIApp, TIBoard, TIBuilder
Expand Down Expand Up @@ -506,7 +505,7 @@ def BuildNxpTarget():
# OS
target.AppendFixedTargets([
TargetPart('zephyr', os_env=NxpOsUsed.ZEPHYR).OnlyIfRe('rw61x'),
TargetPart('freertos', os_env=NxpOsUsed.FREERTOS).ExceptIfRe('rw61x'),
TargetPart('freertos', os_env=NxpOsUsed.FREERTOS),
])

# apps
Expand All @@ -526,6 +525,10 @@ def BuildNxpTarget():
target.AppendModifier(name="dac-conversion", convert_dac_pk=True).OnlyIfRe('factory').ExceptIfRe('(k32w0|rw61x)')
target.AppendModifier(name="rotating-id", enable_rotating_id=True).ExceptIfRe('rw61x')
target.AppendModifier(name="sw-v2", has_sw_version_2=True)
target.AppendModifier(name="ota", enable_ota=True).ExceptIfRe('zephyr')
target.AppendModifier(name="wifi", enable_wifi=True).OnlyIfRe('rw61x')
target.AppendModifier(name="thread", enable_thread=True).ExceptIfRe('zephyr')
target.AppendModifier(name="matter-shell", enable_shell=True).ExceptIfRe('k32w0|k32w1')

return target

Expand Down Expand Up @@ -720,25 +723,6 @@ def BuildMW320Target():
return target


def BuildRW61XTarget():
target = BuildTarget('rw61x', RW61XBuilder)

# apps
target.AppendFixedTargets([
TargetPart('all-clusters-app', app=RW61XApp.ALL_CLUSTERS, release=True),
TargetPart('thermostat', app=RW61XApp.THERMOSTAT, release=True),
TargetPart('laundry-washer', app=RW61XApp.LAUNDRY_WASHER, release=True),
])

target.AppendModifier(name="ota", enable_ota=True)
target.AppendModifier(name="wifi", enable_wifi=True)
target.AppendModifier(name="thread", enable_thread=True)
target.AppendModifier(name="factory-data", enable_factory_data=True)
target.AppendModifier(name="matter-shell", enable_shell=True)

return target


def BuildGenioTarget():
target = BuildTarget('genio', GenioBuilder)
target.AppendFixedTargets([TargetPart('lighting-app', app=GenioApp.LIGHT)])
Expand Down Expand Up @@ -820,7 +804,6 @@ def BuildOpenIotSdkTargets():
BuildHostTestRunnerTarget(),
BuildIMXTarget(),
BuildInfineonTarget(),
BuildRW61XTarget(),
BuildNxpTarget(),
BuildMbedTarget(),
BuildMW320Target(),
Expand Down
Loading

0 comments on commit f45fdb8

Please sign in to comment.