Skip to content

ci: publish .uf2 test builds (RP2350) alongside .hex in PR releases - #11860

Merged
sensei-hacker merged 1 commit into
iNavFlight:release/9.1from
sensei-hacker:ci/uf2-pr-test-build-assets-91
Sep 3, 2026
Merged

ci: publish .uf2 test builds (RP2350) alongside .hex in PR releases#11860
sensei-hacker merged 1 commit into
iNavFlight:release/9.1from
sensei-hacker:ci/uf2-pr-test-build-assets-91

Conversation

@sensei-hacker

Copy link
Copy Markdown
Member

Summary

Backport of #11856 (already merged to maintenance-10.x) to release/9.1.

The PR Test Builds workflow is triggered by workflow_run, which executes from the default branch (master). Since master is fed from release/9.1, this change must land on 9.1 (and then ride 9.1 → master) before PR test-build releases can attach .uf2 images.

RP2350_PICO targets (see #11854) generate a .uf2 for BOOTSEL drag-and-drop flashing in addition to the .hex that pr-test-builds publishes.

Changes

.github/workflows/ci.yml

  • Upload ./build/*.uf2 alongside ./build/*.hex in the firmware matrix and single-target jobs (multiline path; upload-artifact@v4 unions the globs and defaults if-no-files-found: warn, so jobs without a .uf2 are unaffected).

.github/workflows/pr-test-builds.yml

  • Attach hexes/*.uf2 to the PR test-build release when present, guarded so PRs without a .uf2 don't pass a literal unmatched glob to gh release create.
  • Mention .uf2 in the release notes.

The .uf2 is produced by RP2350 targets via the in-tree elf2uf2.py (python3, always on runners) — no picotool / apt dependency (picotool isn't packaged in Ubuntu 24.04).

Notes

  • Byte-identical to the maintenance-10.x version of the change for pr-test-builds.yml; ci.yml carries only the .uf2 upload-glob hunks.
  • Safe on branches without a .uf2-producing target: upload glob matches nothing (warn-only), release asset list stays .hex-only.

Backport of iNavFlight#11856 (merged to maintenance-10.x) to release/9.1. The PR
Test Builds workflow is triggered by workflow_run, which executes from the
default branch (master); master is fed from release/9.1, so this must land
here (and ride 9.1 -> master) for PR test-build releases to attach .uf2.

- ci.yml: upload ./build/*.uf2 alongside *.hex in the firmware matrix and
  single-target jobs (upload-artifact unions the globs and defaults
  if-no-files-found: warn, so jobs without a .uf2 are unaffected).
- pr-test-builds.yml: attach hexes/*.uf2 to the PR test-build release when
  present (guarded so PRs with no .uf2 don't pass a literal unmatched glob),
  and mention it in the release notes.

The .uf2 itself is produced by RP2350 targets via the in-tree elf2uf2.py
(python3, always on runners); no picotool dependency.
@qodo-code-review

Copy link
Copy Markdown
Contributor

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Publish RP2350 UF2 assets in PR test-build releases

✨ Enhancement ⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

AI Description

• Backport UF2 artifact publishing to release/9.1 for default-branch workflow execution.
• Upload optional UF2 outputs from matrix and single-target firmware builds.
• Attach available UF2 files to PR releases with BOOTSEL guidance.
Diagram

graph TD
  MATRIX["Matrix build"] --> ARTIFACTS["Firmware artifacts"] --> PUBLISHER["PR publisher"] --> CHECK{"UF2 present?"}
  SINGLE["Single-target build"] --> ARTIFACTS
  CHECK -->|"Yes: HEX + UF2"| RELEASE["PR release"]
  CHECK -->|"No: HEX only"| RELEASE
Loading
High-Level Assessment

The current approach is appropriate: build jobs expose every generated firmware format, while the publishing workflow explicitly adds optional UF2 assets only when present. Shell glob modes or find-based asset discovery would add complexity without improving reliability for this narrow requirement.

Files changed (2) +15 / -4

Other (2) +15 / -4
ci.ymlUpload optional UF2 outputs from both firmware build paths +6/-2

Upload optional UF2 outputs from both firmware build paths

• Changes the matrix and single-target artifact upload paths to include generated '.uf2' files alongside '.hex' images. Targets that do not produce UF2 files remain unaffected because the upload action treats unmatched paths as warnings.

.github/workflows/ci.yml

pr-test-builds.ymlPublish available UF2 images in PR test-build releases +9/-2

Publish available UF2 images in PR test-build releases

• Builds an explicit release asset array containing all HEX files and conditionally appends UF2 files when present, avoiding literal unmatched globs. Release notes now explain RP2350 BOOTSEL drag-and-drop flashing.

.github/workflows/pr-test-builds.yml

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. UF2 assets are never produced 🐞 Bug ≡ Correctness
Description
The new upload globs depend on build/*.uf2, but this branch contains no RP2350_PICO target,
elf2uf2.py, or CMake rule that emits UF2 output. Every build therefore leaves these globs
unmatched, and PR releases never attach the advertised UF2 image.
Code

.github/workflows/ci.yml[132]

+            ./build/*.uf2
Evidence
The matrix and single-target jobs invoke CMake/Ninja at .github/workflows/ci.yml[122-132] and
.github/workflows/ci.yml[164-174]. The ci target only depends on registered release targets,
while the existing post-link rules produce HEX/BIN; repository-wide inspection found no RP2350
target or UF2 generator, proving that the newly uploaded file type cannot be generated on this
branch.

.github/workflows/ci.yml[122-132]
.github/workflows/ci.yml[164-174]
cmake/ci.cmake[4-15]
cmake/main.cmake[93-108]
cmake/stm32.cmake[195-213]
cmake/stm32.cmake[262-268]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The CI and release workflows now publish `build/*.uf2`, but this branch has no RP2350 target or conversion rule that creates such files. Backport or implement the prerequisite RP2350 UF2 build support so both full-matrix and single-target builds emit the expected root-level UF2 artifact.

## Issue Context
Matrix builds run the `ci` target, which only builds registered release targets, while single-target builds invoke registered target names directly. Existing post-link conversion support emits HEX and BIN only, and the repository has no `RP2350_PICO` definition or `elf2uf2.py` implementation.

## Fix Focus Areas
- .github/workflows/ci.yml[122-132]
- .github/workflows/ci.yml[164-174]
- cmake/ci.cmake[4-15]
- cmake/main.cmake[93-108]
- cmake/stm32.cmake[195-213]
- cmake/stm32.cmake[262-268]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread .github/workflows/ci.yml
path: ./build/*.hex
path: |
./build/*.hex
./build/*.uf2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Uf2 assets are never produced 🐞 Bug ≡ Correctness

The new upload globs depend on build/*.uf2, but this branch contains no RP2350_PICO target,
elf2uf2.py, or CMake rule that emits UF2 output. Every build therefore leaves these globs
unmatched, and PR releases never attach the advertised UF2 image.
Agent Prompt
## Issue description
The CI and release workflows now publish `build/*.uf2`, but this branch has no RP2350 target or conversion rule that creates such files. Backport or implement the prerequisite RP2350 UF2 build support so both full-matrix and single-target builds emit the expected root-level UF2 artifact.

## Issue Context
Matrix builds run the `ci` target, which only builds registered release targets, while single-target builds invoke registered target names directly. Existing post-link conversion support emits HEX and BIN only, and the repository has no `RP2350_PICO` definition or `elf2uf2.py` implementation.

## Fix Focus Areas
- .github/workflows/ci.yml[122-132]
- .github/workflows/ci.yml[164-174]
- cmake/ci.cmake[4-15]
- cmake/main.cmake[93-108]
- cmake/stm32.cmake[195-213]
- cmake/stm32.cmake[262-268]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

RAM / Flash usage vs. base branch — commit f44e250

No size baseline is available yet for this PR's base commit (no per-commit baseline has been published for it). This comment will show deltas once one exists — rebasing the PR refreshes its base commit.

Target Flash Δ RAM Δ
MATEKF405 624935 B (no baseline) 133256 B (no baseline)
MATEKF722 468307 B (no baseline) 123312 B (no baseline)
MATEKF765 645875 B (no baseline) 138768 B (no baseline)
MATEKH743 664139 B (no baseline) 139776 B (no baseline)

See RAM/flash optimization guide for techniques to reduce usage.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Test firmware build ready — commit f44e250

Download firmware for PR #11860

245 targets built. Find your board's .hex file by name on that page (e.g. MATEKF405SE.hex). Files are individually downloadable — no GitHub login required.

Development build for testing only. Use Full Chip Erase when flashing.

@sensei-hacker
sensei-hacker merged commit c26316e into iNavFlight:release/9.1 Sep 3, 2026
23 checks passed
sensei-hacker added a commit to sensei-hacker/inav that referenced this pull request Sep 3, 2026
No source change. Re-runs CI now that the .uf2 release-attach change (iNavFlight#11860)
has landed on release/9.1 and master, where the workflow_run-triggered PR
Test Builds job executes.
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.

1 participant