Skip to content

Commit

Permalink
pw_presubmit: Add substeps to Arduino presubmits
Browse files Browse the repository at this point in the history
Bug: b/253021172
Change-Id: I4d062726aec21497c131ee96a032f808a2155c2f
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/126005
Reviewed-by: Erik Gilling <[email protected]>
Commit-Queue: Rob Mohr <[email protected]>
Pigweed-Auto-Submit: Rob Mohr <[email protected]>
  • Loading branch information
mohrr authored and CQ Bot Account committed Jan 4, 2023
1 parent 603eab7 commit 44f053c
Showing 1 changed file with 27 additions and 23 deletions.
50 changes: 27 additions & 23 deletions pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,30 +278,34 @@ def stm32f429i(ctx: PresubmitContext):
),
)

gn_teensy_build = build.GnGenNinja(
name='gn_teensy_build',
path_filter=_BUILD_FILE_FILTER,
packages=('teensy',),
gn_args={
'pw_arduino_build_CORE_PATH': lambda ctx: '"{}"'.format(
str(ctx.package_root)
),
'pw_arduino_build_CORE_NAME': 'teensy',
'pw_arduino_build_PACKAGE_NAME': 'teensy/avr',
'pw_arduino_build_BOARD': 'teensy40',
'pw_C_OPTIMIZATION_LEVELS': _OPTIMIZATION_LEVELS,
},
ninja_targets=_at_all_optimization_levels('arduino'),
)

@_BUILD_FILE_FILTER.apply_to_check()
def gn_teensy_build(ctx: PresubmitContext):
build.install_package(ctx, 'teensy')
build.gn_gen(
ctx,
pw_arduino_build_CORE_PATH='"{}"'.format(str(ctx.package_root)),
pw_arduino_build_CORE_NAME='teensy',
pw_arduino_build_PACKAGE_NAME='teensy/avr',
pw_arduino_build_BOARD='teensy40',
pw_C_OPTIMIZATION_LEVELS=_OPTIMIZATION_LEVELS,
)
build.ninja(ctx, *_at_all_optimization_levels('arduino'))


@_BUILD_FILE_FILTER.apply_to_check()
def gn_pico_build(ctx: PresubmitContext):
build.install_package(ctx, 'pico_sdk')
build.gn_gen(
ctx,
PICO_SRC_DIR='"{}"'.format(str(ctx.package_root / 'pico_sdk')),
pw_C_OPTIMIZATION_LEVELS=_OPTIMIZATION_LEVELS,
)
build.ninja(ctx, 'pi_pico')
gn_pico_build = build.GnGenNinja(
name='gn_pico_build',
path_filter=_BUILD_FILE_FILTER,
packages=('pico_sdk',),
gn_args={
'PICO_SRC_DIR': lambda ctx: '"{}"'.format(
str(ctx.package_root / 'pico_sdk')
),
'pw_C_OPTIMIZATION_LEVELS': _OPTIMIZATION_LEVELS,
},
ninja_targets=('pi_pico',),
)


gn_software_update_build = build.GnGenNinja(
Expand Down

0 comments on commit 44f053c

Please sign in to comment.