Skip to content

Commit 8f77525

Browse files
authored
[action] attachconfig adapts yml syntax features (#9629)
1 parent 38caf02 commit 8f77525

File tree

3 files changed

+115
-18
lines changed

3 files changed

+115
-18
lines changed

.github/workflows/bsp_buildings.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -303,14 +303,9 @@ jobs:
303303
- "apm32/apm32e103ze-evalboard"
304304
- "apm32/apm32e103ze-tinyboard"
305305
- "apm32/apm32s103vb-miniboard"
306-
- RTT_BSP: "nordic_Infineon_TI_microchip"
306+
- RTT_BSP: "Infineon_TI_microchip"
307307
RTT_TOOL_CHAIN: "sourcery-arm"
308308
SUB_RTT_BSP:
309-
- "nrf5x/nrf51822"
310-
- "nrf5x/nrf52832"
311-
- "nrf5x/nrf52833"
312-
- "nrf5x/nrf52840"
313-
- "nrf5x/nrf5340"
314309
- "Infineon/psoc6-cy8ckit-062S2-43012"
315310
- "Infineon/psoc6-cy8ckit-062-BLE"
316311
- "Infineon/psoc6-cy8ckit-062s4"
@@ -387,6 +382,14 @@ jobs:
387382
RTT_TOOL_CHAIN: "sourcery-i386-unknown-elf"
388383
SUB_RTT_BSP:
389384
- "x86"
385+
- RTT_BSP: "nordic(yml)"
386+
RTT_TOOL_CHAIN: "sourcery-arm"
387+
SUB_RTT_BSP:
388+
- "nrf5x/nrf51822"
389+
- "nrf5x/nrf52832"
390+
- "nrf5x/nrf52833"
391+
- "nrf5x/nrf52840"
392+
- "nrf5x/nrf5340"
390393
steps:
391394
- uses: actions/checkout@v4
392395
- name: Set up Python
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
scons.args: &scons
2+
scons_arg:
3+
- '--strict'
4+
devices.gpio:
5+
<<: *scons
6+
kconfig:
7+
- CONFIG_BSP_USING_GPIO=y
8+
devices.adc:
9+
kconfig:
10+
- CONFIG_BSP_USING_SAADC=y
11+
devices.flash:
12+
kconfig:
13+
- CONFIG_BSP_USING_ON_CHIP_FLASH=y
14+
devices.i2c:
15+
kconfig:
16+
- CONFIG_BSP_USING_I2C=y
17+
devices.spi:
18+
kconfig:
19+
- CONFIG_RT_USING_SPI=y
20+
- CONFIG_BSP_USING_SPI=y
21+
devices.uart:
22+
kconfig:
23+
- CONFIG_BSP_USING_UART=y
24+
devices.watchdog:
25+
kconfig:
26+
- CONFIG_BSP_USING_WDT=y
27+
devices.qspi_flash:
28+
kconfig:
29+
- CONFIG_BSP_USING_QSPI_FLASH=y
30+
devices.pwm:
31+
kconfig:
32+
- CONFIG_BSP_USING_PWM=y
33+
devices.rtc:
34+
kconfig:
35+
- CONFIG_BSP_USING_ONCHIP_RTC=y
36+
devices.hwtimer:
37+
kconfig:
38+
- CONFIG_BSP_USING_TIM=y
39+
- CONFIG_BSP_USING_TIM0=y
40+
# ------ NimBLE-v1.0.0 CI ------
41+
nimble:
42+
kconfig:
43+
- CONFIG_BSP_USING_NIMBLE=y
44+
- CONFIG_PKG_USING_NIMBLE_V100=y
45+
nimble.advertiser:
46+
<<: *scons
47+
depends:
48+
- nimble
49+
kconfig:
50+
- CONFIG_PKG_NIMBLE_SAMPLE_ADVERTISER=y
51+
nimble.beacon:
52+
depends:
53+
- nimble
54+
kconfig:
55+
- CONFIG_PKG_NIMBLE_SAMPLE_BEACON=y
56+
nimble.blecsc:
57+
depends:
58+
- nimble
59+
kconfig:
60+
- CONFIG_PKG_NIMBLE_SAMPLE_BLECSC=y
61+
nimble.central:
62+
depends:
63+
- nimble
64+
kconfig:
65+
- CONFIG_PKG_NIMBLE_SAMPLE_CENTRAL=y
66+
nimble.ext.advertiser:
67+
depends:
68+
- nimble
69+
kconfig:
70+
- CONFIG_PKG_NIMBLE_SAMPLE_EXT_ADVERTISER=y
71+
- CONFIG_PKG_NIMBLE_EXT_ADV=y
72+
nimble.mesh:
73+
depends:
74+
- nimble
75+
kconfig:
76+
- CONFIG_PKG_NIMBLE_SAMPLE_BLEMESH=y
77+
nimble.per.hr:
78+
depends:
79+
- nimble
80+
kconfig:
81+
- CONFIG_PKG_NIMBLE_SAMPLE_PER_HR=y
82+
nimble.peripheral:
83+
depends:
84+
- nimble
85+
kconfig:
86+
- CONFIG_PKG_NIMBLE_SAMPLE_PERIPHERAL=y
87+
nimble.btshell:
88+
depends:
89+
- nimble
90+
kconfig:
91+
- CONFIG_PKG_NIMBLE_SAMPLE_BTSHELL=y
92+
nimble.uart:
93+
depends:
94+
- nimble
95+
kconfig:
96+
- CONFIG_PKG_NIMBLE_SAMPLE_BLEUART=y
97+
# ------ SEGGER CI ------
98+
segger:
99+
kconfig:
100+
- CONFIG_PKG_USING_SEGGER_RTT=y
101+
- CONFIG_RT_USING_SERIAL_V2=y

tools/ci/bsp_buildings.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -104,28 +104,22 @@ def get_details_and_dependencies(details, projects, seen=None):
104104
if seen is None:
105105
seen = set()
106106
detail_list = []
107-
scons_arg_list = []
108107
if details is not None:
109108
for dep in details:
110109
if dep not in seen:
111110
dep_details=projects.get(dep)
112111
seen.add(dep)
113112
if dep_details is not None:
114113
if dep_details.get('depends') is not None:
115-
detail_temp,scons_arg_temp=get_details_and_dependencies(dep_details.get('depends'), projects, seen)
114+
detail_temp=get_details_and_dependencies(dep_details.get('depends'), projects, seen)
116115
for line in detail_temp:
117116
detail_list.append(line)
118-
for line in scons_arg_temp:
119-
scons_arg_list.append(line)
120117
if dep_details.get('kconfig') is not None:
121118
for line in dep_details.get('kconfig'):
122119
detail_list.append(line)
123-
if dep_details.get('depend_scons_arg') is not None:
124-
for line in dep_details.get('depend_scons_arg'):
125-
scons_arg_list.append(line)
126120
else:
127121
print(f"::error::There are some problems with attachconfig depend: {dep}");
128-
return detail_list,scons_arg_list
122+
return detail_list
129123

130124
def build_bsp_attachconfig(bsp, attach_file):
131125
"""
@@ -214,17 +208,16 @@ def build_bsp_attachconfig(bsp, attach_file):
214208
config_bacakup = config_file+'.origin'
215209
shutil.copyfile(config_file, config_bacakup)
216210
with open(config_file, 'a') as destination:
211+
if details.get("kconfig") is None:
212+
continue
217213
if(projects.get(name) is not None):
218-
detail_list,scons_arg_list=get_details_and_dependencies([name],projects)
214+
detail_list=get_details_and_dependencies([name],projects)
219215
for line in detail_list:
220216
destination.write(line + '\n')
221217
scons_arg=[]
222218
if details.get('scons_arg') is not None:
223219
for line in details.get('scons_arg'):
224220
scons_arg.append(line)
225-
if scons_arg_list is not None:
226-
for line in scons_arg_list:
227-
scons_arg.append(line)
228221
scons_arg_str=' '.join(scons_arg) if scons_arg else ' '
229222
print(f"::group::\tCompiling yml project: =={count}==={name}=scons_arg={scons_arg_str}==")
230223
res = build_bsp(bsp, scons_arg_str)

0 commit comments

Comments
 (0)