Skip to content

CI: update actions for Node 24 and fix Windows SDK extraction - #81

Open
tridge wants to merge 3 commits into
am32-firmware:masterfrom
tridge:CI-fix
Open

tridge wants to merge 3 commits into
am32-firmware:masterfrom
tridge:CI-fix

Conversation

@tridge

@tridge tridge commented Nov 30, 2026

Copy link
Copy Markdown
Member

GitHub now runs the older Node 20 actions under Node 24. Update checkout, setup-python, and upload-artifact to v7 across the build and SITL workflows. Update the Cygwin installer to v7 and explicitly select the path used by the test shell.

The native Windows build on master also fails while unpacking the SDK. Use the Windows system tar to extract the ZIP so an extraction error propagates to make.

Workflow validation passed with one existing ShellCheck warning in the Linux build. Tested SDK extraction locally with bsdtar and verified that the archive installs make.exe and arm-none-eabi-gcc.exe at the paths used by CI.

@tridge
tridge marked this pull request as draft November 30, 2026 20:37
@AP-Review

AP-Review commented Nov 30, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-11-30)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: REQUEST CHANGES

Reviewed at head 2466a67997.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/am32-firmware/am32-bootloader/81/1.html#prAM32-bootloader-81

The Node 24 action bumps and the Cygwin install-dir look right, but the switch to tar.exe breaks the MSYS2 build and still leaves native Windows installs exiting with an error.

Blocking

  1. make/tools_install.mk:15: under MSYS2 UCRT64, tar.exe is GNU tar, which can't read ZIP, so make arm_sdk_install fails with "This does not look like a tar archive". The MSYS2 CI job passed on master and now fails. Use unzip when MSYSTEM is UCRT64 (the workflow already installs it), or call the System32 tar explicitly.

Should fix

  • make/tools_install.mk:15: on native Windows, tar.exe skips two archive entries (probably the two Cyrillic-named openocd target configs) and make exits with Error 1. CI stays green only because the pwsh step doesn't check the exit status of make arm_sdk_install. Repack windows-tools.zip without those files, and make the workflow fail when the install step fails.

@AP-Review

AP-Review commented Dec 1, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-12-01)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: ACCEPT

Reviewed at head 4839bba87a.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/am32-firmware/am32-bootloader/81/2.html#prAM32-bootloader-81

The Node 24 action bumps and the Windows SDK extraction fix look good, and nothing in the bootloader itself changes.

Since the last review at 2466a67997, MSYS2 UCRT64 extracts with unzip (that was the blocker), and native Windows checks for the compiler instead of tar's exit status. make arm_sdk_install also runs as its own CI step now. Both Windows jobs pass at 4839bba87a.

Minor (1)
  • make/tools_install.mk:15: optional. Every native install prints tar.exe's error for the two Cyrillic-named openocd configs and Error 1 (ignored). The only completeness check is arm-none-eabi-gcc.exe (line 29), which is roughly a third of the way into the archive. Repacking windows-tools.zip without those two files would let tar's status be trusted again.

The failing sitl-bootloader-tests (macos-15-intel) job ('stays during 4way session') isn't caused by this PR. The same test fails on other PRs still using the v4 actions.

Expand-Archive fails on the hosted Windows runner when Windows
PowerShell loads the PowerShell 7 archive module. Use the system tar.exe
to extract the ZIP, or unzip under MSYS2 where tar is GNU tar and cannot
read ZIP files.

tar.exe cannot extract two openocd target scripts with non-ASCII names
in windows-tools.zip, so its exit status is ignored. Instead, remove the
compiler before extracting and fail if extraction did not restore it.

Check the settings copy in the setup script with "if errorlevel 1", as
%errorlevel% inside the block is expanded before the copy runs and would
still hold the tar.exe status.
GitHub now forces the Node 20 actions to run under Node 24. Use releases
that declare the new runtime and select the Cygwin installation path
used by the test shell.

Install the Windows tools in their own step, so a failed install is not
hidden by the exit status of the build command that follows it.
The tests sent the first 4-way probe a fixed 0.3s after starting the
bootloader. When the process starts late, as on the macOS runners, the
probe either arrives before the input port is bound and is lost, or lands
while checkForSignal() samples the pin, where it reads as a low line and
can force a jump. Sent too late, it misses the 250ms no-CAN fallback,
which boots the app once the eeprom is programmed. Either way "stays
during 4way session" and the DroneCAN setup failed.

Have the SITL bootloader report when it enters the receive loop, wait for
that before probing, fail clearly if it exits or never gets there, and
retry the probe until the existing timeout.
@AP-Review

Copy link
Copy Markdown

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: COMMENT

Reviewed at head 524ad6d379.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/am32-firmware/am32-bootloader/81/3.html#prAM32-bootloader-81

The SITL startup fix in the new commit works, and the CI and SDK extraction changes are unchanged and still pass. The only thing left is a stale PR description.

Since the last review at 4839bba87a, 524ad6d replaces the fixed 0.3s sleep with a wait for the bootloader's new SITL-only "ready for 4way input" message, plus a retrying connect. That addresses the macos-15-intel 'stays during 4way session' flake, and that job passes at this head. The bootloader/main.c change is SITL-only: all MCU .bin/.hex images are byte-identical to the base.

Should fix

  • PR description: it still says the Windows system tar is used "so an extraction error propagates to make". The code now deliberately ignores tar's status (make/tools_install.mk:15) and checks for the compiler instead (line 29). It also doesn't mention the SITL test commit or the bootloader/main.c marker. Please update the body.
Minor (1)

The only red CI job is sitl-bootloader-tests (macos-15). It was cancelled because no hosted runner picked it up, so the SITL fix hasn't run on macOS arm64.

@tridge
tridge marked this pull request as ready for review December 1, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants