[action] attachconfig adapts yml syntax features (#9629)
This commit is contained in:
parent
38caf02bb4
commit
8f77525b5d
|
@ -303,14 +303,9 @@ jobs:
|
|||
- "apm32/apm32e103ze-evalboard"
|
||||
- "apm32/apm32e103ze-tinyboard"
|
||||
- "apm32/apm32s103vb-miniboard"
|
||||
- RTT_BSP: "nordic_Infineon_TI_microchip"
|
||||
- RTT_BSP: "Infineon_TI_microchip"
|
||||
RTT_TOOL_CHAIN: "sourcery-arm"
|
||||
SUB_RTT_BSP:
|
||||
- "nrf5x/nrf51822"
|
||||
- "nrf5x/nrf52832"
|
||||
- "nrf5x/nrf52833"
|
||||
- "nrf5x/nrf52840"
|
||||
- "nrf5x/nrf5340"
|
||||
- "Infineon/psoc6-cy8ckit-062S2-43012"
|
||||
- "Infineon/psoc6-cy8ckit-062-BLE"
|
||||
- "Infineon/psoc6-cy8ckit-062s4"
|
||||
|
@ -387,6 +382,14 @@ jobs:
|
|||
RTT_TOOL_CHAIN: "sourcery-i386-unknown-elf"
|
||||
SUB_RTT_BSP:
|
||||
- "x86"
|
||||
- RTT_BSP: "nordic(yml)"
|
||||
RTT_TOOL_CHAIN: "sourcery-arm"
|
||||
SUB_RTT_BSP:
|
||||
- "nrf5x/nrf51822"
|
||||
- "nrf5x/nrf52832"
|
||||
- "nrf5x/nrf52833"
|
||||
- "nrf5x/nrf52840"
|
||||
- "nrf5x/nrf5340"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
|
|
|
@ -0,0 +1,101 @@
|
|||
scons.args: &scons
|
||||
scons_arg:
|
||||
- '--strict'
|
||||
devices.gpio:
|
||||
<<: *scons
|
||||
kconfig:
|
||||
- CONFIG_BSP_USING_GPIO=y
|
||||
devices.adc:
|
||||
kconfig:
|
||||
- CONFIG_BSP_USING_SAADC=y
|
||||
devices.flash:
|
||||
kconfig:
|
||||
- CONFIG_BSP_USING_ON_CHIP_FLASH=y
|
||||
devices.i2c:
|
||||
kconfig:
|
||||
- CONFIG_BSP_USING_I2C=y
|
||||
devices.spi:
|
||||
kconfig:
|
||||
- CONFIG_RT_USING_SPI=y
|
||||
- CONFIG_BSP_USING_SPI=y
|
||||
devices.uart:
|
||||
kconfig:
|
||||
- CONFIG_BSP_USING_UART=y
|
||||
devices.watchdog:
|
||||
kconfig:
|
||||
- CONFIG_BSP_USING_WDT=y
|
||||
devices.qspi_flash:
|
||||
kconfig:
|
||||
- CONFIG_BSP_USING_QSPI_FLASH=y
|
||||
devices.pwm:
|
||||
kconfig:
|
||||
- CONFIG_BSP_USING_PWM=y
|
||||
devices.rtc:
|
||||
kconfig:
|
||||
- CONFIG_BSP_USING_ONCHIP_RTC=y
|
||||
devices.hwtimer:
|
||||
kconfig:
|
||||
- CONFIG_BSP_USING_TIM=y
|
||||
- CONFIG_BSP_USING_TIM0=y
|
||||
# ------ NimBLE-v1.0.0 CI ------
|
||||
nimble:
|
||||
kconfig:
|
||||
- CONFIG_BSP_USING_NIMBLE=y
|
||||
- CONFIG_PKG_USING_NIMBLE_V100=y
|
||||
nimble.advertiser:
|
||||
<<: *scons
|
||||
depends:
|
||||
- nimble
|
||||
kconfig:
|
||||
- CONFIG_PKG_NIMBLE_SAMPLE_ADVERTISER=y
|
||||
nimble.beacon:
|
||||
depends:
|
||||
- nimble
|
||||
kconfig:
|
||||
- CONFIG_PKG_NIMBLE_SAMPLE_BEACON=y
|
||||
nimble.blecsc:
|
||||
depends:
|
||||
- nimble
|
||||
kconfig:
|
||||
- CONFIG_PKG_NIMBLE_SAMPLE_BLECSC=y
|
||||
nimble.central:
|
||||
depends:
|
||||
- nimble
|
||||
kconfig:
|
||||
- CONFIG_PKG_NIMBLE_SAMPLE_CENTRAL=y
|
||||
nimble.ext.advertiser:
|
||||
depends:
|
||||
- nimble
|
||||
kconfig:
|
||||
- CONFIG_PKG_NIMBLE_SAMPLE_EXT_ADVERTISER=y
|
||||
- CONFIG_PKG_NIMBLE_EXT_ADV=y
|
||||
nimble.mesh:
|
||||
depends:
|
||||
- nimble
|
||||
kconfig:
|
||||
- CONFIG_PKG_NIMBLE_SAMPLE_BLEMESH=y
|
||||
nimble.per.hr:
|
||||
depends:
|
||||
- nimble
|
||||
kconfig:
|
||||
- CONFIG_PKG_NIMBLE_SAMPLE_PER_HR=y
|
||||
nimble.peripheral:
|
||||
depends:
|
||||
- nimble
|
||||
kconfig:
|
||||
- CONFIG_PKG_NIMBLE_SAMPLE_PERIPHERAL=y
|
||||
nimble.btshell:
|
||||
depends:
|
||||
- nimble
|
||||
kconfig:
|
||||
- CONFIG_PKG_NIMBLE_SAMPLE_BTSHELL=y
|
||||
nimble.uart:
|
||||
depends:
|
||||
- nimble
|
||||
kconfig:
|
||||
- CONFIG_PKG_NIMBLE_SAMPLE_BLEUART=y
|
||||
# ------ SEGGER CI ------
|
||||
segger:
|
||||
kconfig:
|
||||
- CONFIG_PKG_USING_SEGGER_RTT=y
|
||||
- CONFIG_RT_USING_SERIAL_V2=y
|
|
@ -104,7 +104,6 @@ def get_details_and_dependencies(details, projects, seen=None):
|
|||
if seen is None:
|
||||
seen = set()
|
||||
detail_list = []
|
||||
scons_arg_list = []
|
||||
if details is not None:
|
||||
for dep in details:
|
||||
if dep not in seen:
|
||||
|
@ -112,20 +111,15 @@ def get_details_and_dependencies(details, projects, seen=None):
|
|||
seen.add(dep)
|
||||
if dep_details is not None:
|
||||
if dep_details.get('depends') is not None:
|
||||
detail_temp,scons_arg_temp=get_details_and_dependencies(dep_details.get('depends'), projects, seen)
|
||||
detail_temp=get_details_and_dependencies(dep_details.get('depends'), projects, seen)
|
||||
for line in detail_temp:
|
||||
detail_list.append(line)
|
||||
for line in scons_arg_temp:
|
||||
scons_arg_list.append(line)
|
||||
if dep_details.get('kconfig') is not None:
|
||||
for line in dep_details.get('kconfig'):
|
||||
detail_list.append(line)
|
||||
if dep_details.get('depend_scons_arg') is not None:
|
||||
for line in dep_details.get('depend_scons_arg'):
|
||||
scons_arg_list.append(line)
|
||||
else:
|
||||
print(f"::error::There are some problems with attachconfig depend: {dep}");
|
||||
return detail_list,scons_arg_list
|
||||
return detail_list
|
||||
|
||||
def build_bsp_attachconfig(bsp, attach_file):
|
||||
"""
|
||||
|
@ -214,17 +208,16 @@ if __name__ == "__main__":
|
|||
config_bacakup = config_file+'.origin'
|
||||
shutil.copyfile(config_file, config_bacakup)
|
||||
with open(config_file, 'a') as destination:
|
||||
if details.get("kconfig") is None:
|
||||
continue
|
||||
if(projects.get(name) is not None):
|
||||
detail_list,scons_arg_list=get_details_and_dependencies([name],projects)
|
||||
detail_list=get_details_and_dependencies([name],projects)
|
||||
for line in detail_list:
|
||||
destination.write(line + '\n')
|
||||
scons_arg=[]
|
||||
if details.get('scons_arg') is not None:
|
||||
for line in details.get('scons_arg'):
|
||||
scons_arg.append(line)
|
||||
if scons_arg_list is not None:
|
||||
for line in scons_arg_list:
|
||||
scons_arg.append(line)
|
||||
scons_arg_str=' '.join(scons_arg) if scons_arg else ' '
|
||||
print(f"::group::\tCompiling yml project: =={count}==={name}=scons_arg={scons_arg_str}==")
|
||||
res = build_bsp(bsp, scons_arg_str)
|
||||
|
|
Loading…
Reference in New Issue