Skip to content

Add labgrid-driven hardware CI (adi-lg-matlab)#201

Merged
tfcollins merged 4 commits into
masterfrom
labgrid-hw-testing
May 22, 2026
Merged

Add labgrid-driven hardware CI (adi-lg-matlab)#201
tfcollins merged 4 commits into
masterfrom
labgrid-hw-testing

Conversation

@tfcollins

Copy link
Copy Markdown
Collaborator

What

Lets labgrid (adi-labgrid-plugins) provision a board — power it, boot the FPGA/SoC, and hand MATLAB the booted board's libIIO URI — so the existing runHWTests run against it, both locally and in GitHub Actions.

runHWTests already honours IIO_URI, so no MATLAB source change is needed: the adi-lg-matlab launcher boots the board, sets IIO_URI/board, runs the tests, and copies the JUnit output.

Contents

  • test/hw_ci/board_map.yaml — maps labgrid place tags (carrier / daughter-board / hdl-config) to the MATLAB board reference names in runHWTests.m's switch. Keep in sync with that switch.
  • .github/workflows/hw-matlab.yml — bespoke workflow: a discover job on a coordinator-adjacent runner builds the matrix; per-place shards on hw-<place> self-hosted runners (MATLAB + libiio) acquire the place, run adi-lg-matlab, release on always(), and upload JUnit.
  • README — local + CI usage.

Prerequisites / notes

  • Depends on the adi-lg-matlab launcher in adi-labgrid-plugins (Add adi-lg-matlab: labgrid HW launcher for MATLAB toolboxes tfcollins/labgrid-plugins#31). The workflow pins @v2, so that change must land on the v2 ref first.
  • The daughter-board/carrier values in board_map.yaml must match the tags the lab admin sets on each coordinator place — adjust to your lab's convention.
  • hw-<place> runners must have MATLAB (R2025b on nemo) + a batch license + libiio. The workflow's MATLAB_BIN defaults to /opt/MATLAB/R2025b/bin/matlab.

Lets labgrid (adi-labgrid-plugins) provision a board — power it, boot
the FPGA/SoC, and hand MATLAB the booted board's libIIO URI — so the
existing runHWTests run against it, locally and in GitHub Actions.

runHWTests already honours IIO_URI, so no MATLAB source change is
needed; the adi-lg-matlab launcher sets IIO_URI/board, runs the tests,
and copies the JUnit output.

- test/hw_ci/board_map.yaml: map labgrid place tags (carrier /
  daughter-board / hdl-config) to the MATLAB board reference names in
  runHWTests.m's switch. Keep in sync with that switch.
- .github/workflows/hw-matlab.yml: bespoke workflow — a discover job on
  a coordinator-adjacent runner builds the matrix; per-place shards on
  hw-<place> self-hosted runners (MATLAB + libiio) acquire the place,
  run adi-lg-matlab, release on always(), and upload JUnit.
- README: local + CI usage.
Comment thread .github/workflows/hw-matlab.yml Fixed
Comment thread .github/workflows/hw-matlab.yml Fixed
Comment thread .github/workflows/hw-matlab.yml Fixed
tfcollins added 3 commits May 22, 2026 12:54
Address CodeQL 'Workflow does not contain permissions' findings: add a
minimal top-level 'contents: read' default and widen only the publish
job (checks: write, pull-requests: write) for the test-result action.
The publish job ran on [self-hosted, hw-coordinator] with if: always(),
so on PRs without the hw-test label (where discover/hw are skipped) it
sat pending forever waiting for a HW runner. Gate it on the hw job not
being skipped so it is skipped cleanly on those PRs.
The windows-2019 hosted runner image was retired (EOL mid-2025), so the
Build libad9361-iio for Windows job queued forever with no runner. Move
it to windows-2022 and bump the setup-msbuild vs-version to the VS 2022
range. The prebuilt libiio v0.25 (VS2019) links fine into a VS2022 build
(MSVC v142/v143 are ABI-compatible).
@tfcollins tfcollins merged commit 852f5cd into master May 22, 2026
17 checks passed
@tfcollins tfcollins deleted the labgrid-hw-testing branch May 22, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants