summaryrefslogtreecommitdiff
path: root/test/hil/hil_ci_set_matrix.py
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2026-06-16 17:42:31 +0700
committerGitHub <[email protected]>2026-06-16 17:42:31 +0700
commitd9f736dcf9c6b71aac470d281cd2fc05a3f7e793 (patch)
tree0df086e51d56d2c3bdbf40567e6d5c3536d0da66 /test/hil/hil_ci_set_matrix.py
parent7b791916a702c28f8f39e9bfc5eb8455d0942865 (diff)
hil: enable nanoch32v203 in CI with fsdev + usbfs variants (#3707)
* hil: enable nanoch32v203 in CI with fsdev + usbfs variants nanoch32v203 was parked in boards-skip; move it into the active pool now that the board is wired to the ci.lan rig. Cover both USB device IPs as build variants: - nanoch32v203-fsdev: RHPORT_DEVICE=0 (USBD / stm32 FSDev IP) - nanoch32v203-usbfs: RHPORT_DEVICE=1 (WCH USBFS IP)
Diffstat (limited to 'test/hil/hil_ci_set_matrix.py')
-rw-r--r--test/hil/hil_ci_set_matrix.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/test/hil/hil_ci_set_matrix.py b/test/hil/hil_ci_set_matrix.py
index baa24afb1..13f7f1882 100644
--- a/test/hil/hil_ci_set_matrix.py
+++ b/test/hil/hil_ci_set_matrix.py
@@ -19,8 +19,12 @@ def main():
parser.add_argument('config_files', nargs='+', help='Configuration JSON file(s)')
args = parser.parse_args()
+ # Toolchain buckets must match the toolchains instantiated by the hil-build
+ # job in .github/workflows/build.yml. Keep all keys present (even if empty)
+ # so `fromJSON(hil_json)[toolchain]` always resolves to a list.
matrix = {
'arm-gcc': [],
+ 'riscv-gcc': [],
'esp-idf': []
}
@@ -38,22 +42,28 @@ def main():
for board in config['boards']:
name = board['name']
flasher = board['flasher']
+ # esptool boards must build under esp-idf; others default to arm-gcc
+ # but may opt into another bucket via an explicit "toolchain" field
+ # (e.g. RISC-V boards like ch32v20x need "riscv-gcc").
if flasher['name'] == 'esptool':
toolchain = 'esp-idf'
else:
- toolchain = 'arm-gcc'
+ toolchain = board.get('toolchain', 'arm-gcc')
build_board = f'-b {name}'
if 'build' in board and 'args' in board['build']:
build_board += ' ' + ' '.join(f'-D{a}' for a in board['build']['args'])
- # Each variant builds into cmake-build-<variant.name> with its raw CFLAGS.
- # No 'variant' -> a single build named after the board.
+ # Each variant builds into cmake-build-<variant.name> with its own cmake
+ # -D defines and raw CFLAGS. No 'variant' -> a single build named after
+ # the board.
variants = board.get('variant') or [{'name': name, 'flags': ''}]
for v in variants:
arg = build_board
if v['name'] != name:
arg += f' --build-name {v["name"]}'
+ for d in v.get('defines', []):
+ arg += f' -D{d}'
for tok in v.get('flags', '').split():
arg += f' --cflag={tok}'
append_build_arg(toolchain, arg)