Skip to content

run my HIL on gcc build#3619

Merged
hathach merged 4 commits into
masterfrom
hil_hfp
Apr 29, 2026
Merged

run my HIL on gcc build#3619
hathach merged 4 commits into
masterfrom
hil_hfp

Conversation

@HiFiPhile
Copy link
Copy Markdown
Collaborator

No description provided.

Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: HiFiPhile <admin@hifiphile.com>
Copilot AI review requested due to automatic review settings April 26, 2026 10:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates HIL CI to build/test against multiple HIL configuration files (e.g., TinyUSB + HFP) and adjusts the GitHub Actions workflow to generate and consume a merged HIL build matrix.

Changes:

  • Extend hil_ci_set_matrix.py to accept multiple config JSON files, resolve paths robustly, and de-duplicate generated build args.
  • Update build.yml to generate a merged HIL matrix from test/hil/tinyusb.json and test/hil/hfp.json.
  • Expand the HIL test job to run on different self-hosted runners depending on which HIL config is being tested, and rename the IAR-specific HFP job.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
test/hil/hil_ci_set_matrix.py Accepts multiple HIL config files and merges/dedupes build args per toolchain.
.github/workflows/build.yml Generates merged HIL matrix; runs HIL tests across multiple self-hosted runners/configs; renames HFP IAR job.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 262 to +272
hil-tinyusb:
needs: hil-build
runs-on: [ self-hosted, X64, hathach, hardware-in-the-loop ]
strategy:
fail-fast: false
matrix:
include:
- runner: [ self-hosted, X64, hathach, hardware-in-the-loop ]
hil_json: test/hil/tinyusb.json
- runner: [ self-hosted, Linux, X64, hifiphile ]
hil_json: test/hil/hfp.json
runs-on: ${{ matrix.runner }}
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This job is still named hil-tinyusb, but the matrix now includes test/hil/hfp.json and runs on the hifiphile runner too. Consider renaming the job to reflect its broader scope (or splitting into separate jobs) to avoid confusing workflow status and log navigation.

Copilot uses AI. Check for mistakes.
Comment on lines +63 to 65
# HIL matrix (merged from tinyusb + hifiphile configs)
HIL_MATRIX_JSON=$(python test/hil/hil_ci_set_matrix.py test/hil/tinyusb.json test/hil/hfp.json)
echo "hil_matrix=$HIL_MATRIX_JSON"
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The HIL config paths are now hardcoded in multiple places (here and in the hil-tinyusb matrix). To reduce drift, consider defining the list once (e.g., via an env var or a single matrix definition) and reusing it for both matrix generation and job configuration.

Copilot uses AI. Check for mistakes.
Comment on lines 262 to +274
hil-tinyusb:
needs: hil-build
runs-on: [ self-hosted, X64, hathach, hardware-in-the-loop ]
strategy:
fail-fast: false
matrix:
include:
- runner: [ self-hosted, X64, hathach, hardware-in-the-loop ]
hil_json: test/hil/tinyusb.json
- runner: [ self-hosted, Linux, X64, hifiphile ]
hil_json: test/hil/hfp.json
runs-on: ${{ matrix.runner }}
env:
HIL_JSON: ${{ matrix.hil_json }}
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hil-tinyusb runs on self-hosted runners and executes code checked out from pull_request events. Without a fork guard, this job can run untrusted fork PR code on your self-hosted infrastructure. Consider adding an if: condition matching hil-hfp-iar (skip when github.event.pull_request.head.repo.fork == true) or otherwise requiring trusted context/approval before using self-hosted runners.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 26, 2026

Size Difference Report

Because TinyUSB code size varies by port and configuration, the metrics below represent the averaged totals across all example builds.

Note: If there is no change, only one value is shown.

Changes >1% in size

No entries.

Changes <1% in size

No entries.

No changes
file .text .rodata .data .bss size % diff
audio_device.c 2896 0 1259 1625 4515 +0.0%
cdc_device.c 1239 16 1092 735 1972 +0.0%
cdc_host.c 6381 487 15 985 7579 +0.0%
dcd_ch32_usbfs.c 1475 0 0 2444 3919 +0.0%
dcd_ch32_usbhs.c 1468 0 0 448 1916 +0.0%
dcd_ci_fs.c 1924 0 0 1290 3214 +0.0%
dcd_ci_hs.c 1758 0 0 1344 2535 +0.0%
dcd_da146xx.c 3067 0 0 144 3211 +0.0%
dcd_dwc2.c 4245 19 0 265 4529 +0.0%
dcd_eptri.c 2272 0 0 259 2531 +0.0%
dcd_ft9xx.c 3280 0 0 172 3452 +0.0%
dcd_khci.c 1952 0 0 1290 3242 +0.0%
dcd_lpc17_40.c 1478 0 0 648 1802 +0.0%
dcd_lpc_ip3511.c 1463 0 0 264 1683 +0.0%
dcd_mm32f327x_otg.c 1477 0 0 1290 2767 +0.0%
dcd_msp430x5xx.c 1799 0 0 176 1975 +0.0%
dcd_musb.c 2226 0 0 171 2396 +0.0%
dcd_nrf5x.c 2916 0 0 292 3208 +0.0%
dcd_nuc120.c 1095 0 0 78 1173 +0.0%
dcd_nuc121.c 1168 0 0 101 1270 +0.0%
dcd_nuc505.c 0 0 1532 157 1689 +0.0%
dcd_rp2040.c 841 0 764 653 2258 +0.0%
dcd_rusb2.c 2917 0 0 156 3073 +0.0%
dcd_samd.c 1036 0 0 266 1302 +0.0%
dcd_samg.c 1321 0 0 72 1393 +0.0%
dcd_stm32_fsdev.c 2558 0 0 291 2849 +0.0%
dfu_device.c 776 28 712 138 914 +0.0%
dfu_rt_device.c 157 0 134 0 157 +0.0%
dwc2_common.c 603 22 0 0 615 +0.0%
ecm_rndis_device.c 1044 0 1 2759 3803 +0.0%
ehci.c 2763 0 0 6043 7597 +0.0%
fsdev_common.c 180 0 0 0 180 +0.0%
hcd_ch32_usbfs.c 2485 0 0 498 2983 +0.0%
hcd_ci_hs.c 184 0 0 0 184 +0.0%
hcd_dwc2.c 5007 25 1 513 5545 +0.0%
hcd_khci.c 2442 0 0 449 2891 +0.0%
hcd_musb.c 3073 0 0 157 3230 +0.0%
hcd_pio_usb.c 262 0 240 0 502 +0.0%
hcd_rp2040.c 2000 17 4 321 2342 +0.0%
hcd_rusb2.c 2923 0 0 245 3168 +0.0%
hcd_samd.c 2220 0 0 324 2544 +0.0%
hcd_stm32_fsdev.c 3259 0 1 420 3680 +0.0%
hid_device.c 1125 44 997 119 1244 +0.0%
hid_host.c 1240 0 0 1251 2491 +0.0%
hub.c 1384 8 8 30 1418 +0.0%
midi_device.c 1151 0 1007 624 1773 +0.0%
midi_host.c 1341 7 7 3635 4979 +0.0%
msc_device.c 2517 108 2281 806 3323 +0.0%
msc_host.c 1587 0 0 394 1982 +0.0%
mtp_device.c 1696 22 735 588 2292 +0.0%
ncm_device.c 1534 28 718 4452 6000 +0.0%
ohci.c 1940 0 0 2414 4353 +0.0%
printer_device.c 830 0 706 566 1394 +0.0%
rp2040_usb.c 366 35 647 11 1060 +0.0%
rusb2_common.c 160 0 16 0 176 +0.0%
tusb.c 469 0 397 3 470 +0.0%
tusb_fifo.c 850 0 483 0 845 +0.0%
typec_stm32.c 820 8 2 12 842 +0.0%
usbc.c 420 2 20 166 608 +0.0%
usbd.c 3231 58 88 275 3571 +0.0%
usbd_control.c 537 0 484 79 616 +0.0%
usbh.c 4652 55 99 1034 5807 +0.0%
usbtmc_device.c 2196 24 68 316 2544 +0.0%
vendor_device.c 641 0 534 565 1204 +0.0%
video_device.c 4443 5 1235 479 4914 +0.0%
TOTAL 118760 1018 16287 45302 165694 +0.0%

HiFiPhile and others added 2 commits April 26, 2026 14:10
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: HiFiPhile <admin@hifiphile.com>
@HiFiPhile
Copy link
Copy Markdown
Collaborator Author

On 1st run it always stuck I don't know why, rerun works.
image

@hathach
Copy link
Copy Markdown
Owner

hathach commented Apr 29, 2026

@HiFiPhile it is probably hanged in one of the usb io. watch sudo ./svc.sh status usually can give a hint

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 29, 2026

MemBrowse Memory Report

No memory changes detected across 2233 targets. View Project Dashboard →

Copy link
Copy Markdown
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect, thank you

@hathach hathach merged commit 939c2f9 into master Apr 29, 2026
411 of 413 checks passed
@hathach hathach deleted the hil_hfp branch April 29, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants