Skip to content

ci(windows): unblock hidapi source build under CMake 4.x runner image#3509

Merged
ten9876 merged 2 commits into
mainfrom
fix/ci-windows-hidapi-cmake4
Jun 10, 2026
Merged

ci(windows): unblock hidapi source build under CMake 4.x runner image#3509
ten9876 merged 2 commits into
mainfrom
fix/ci-windows-hidapi-cmake4

Conversation

@ten9876

@ten9876 ten9876 commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Repo-wide CI blocker. Every check-windows run since 2026-06-10 ~14:36 UTC fails at the Setup hidapi step, before any AetherSDR code compiles. Last green run on main: 04:10 UTC. Every PR branch since fails identically (#3508, the AetherClaude bot's aetherclaude/issue-3506 branch).

Root cause

GitHub's windows-latest runner image updated to CMake 4.x, which removed compatibility with cmake_minimum_required(<3.5). hidapi 0.14.0's CMakeLists declares an older minimum, so scripts/setup/setup-hidapi.ps1's source build now hard-fails at configure:

CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.
  ...
  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

Fix

One flag on the configure line — the exact override CMake's own error message recommends:

cmake -B $buildDir -S $srcDir.FullName -G "Ninja" `
    -DCMAKE_BUILD_TYPE=Release `
    -DBUILD_SHARED_LIBS=ON `
    -DCMAKE_POLICY_VERSION_MINIMUM=3.5

Configure proceeds with 3.5 policy semantics; the compiled artifact is unaffected. Inline comment documents when the flag can be dropped (hidapi version bump with a modern minimum).

Sibling-script audit

Checked the other Windows setup scripts for the same latent failure:

Script cmake source build? Declared minimum At risk?
setup-hidapi.ps1 yes — hidapi 0.14.0 < 3.5 this PR
setup-opus.ps1 yes — opus 1.5.2 3.16 no (verified: builds locally under CMake 4.3.3)
setup-onnxruntime.ps1 no (informational echo only) n/a no

Validation

This PR's own check-windows run exercises the fixed script — green CI on this PR is the validation.

Once merged, #3508 (and the bot's PR) just need a CI re-run.

Every check-windows run since 2026-06-10 ~14:36 UTC fails at the "Setup
hidapi" step — before any AetherSDR code compiles. GitHub's
windows-latest runner image updated to CMake 4.x, which removed
compatibility with cmake_minimum_required(<3.5); hidapi 0.14.0's
CMakeLists declares an older minimum, so its configure now hard-fails:

  CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.5 has been removed from CMake.

Last green main run was 04:10 UTC; every PR branch since (including the
AetherClaude bot's) fails identically, so this blocks the whole queue.

Fix: pass -DCMAKE_POLICY_VERSION_MINIMUM=3.5 in setup-hidapi.ps1 — the
exact override CMake's error message recommends. Configure proceeds with
3.5 policy semantics; the build itself is unaffected. Drop the flag when
hidapi is bumped to a release with a modern declared minimum.

Audited the sibling setup scripts for the same latent failure: opus
1.5.2 declares cmake_minimum_required(3.16) (fine under 4.x — builds
locally with CMake 4.3.3 daily), and setup-onnxruntime.ps1's cmake
mention is an informational echo, not an invocation. hidapi is the only
affected script.

Principle XI.
@ten9876 ten9876 requested a review from a team as a code owner June 10, 2026 18:20
…=3.5 at the dot

The first attempt passed -DCMAKE_POLICY_VERSION_MINIMUM=3.5 unquoted.
PowerShell's native-argument tokenizer splits that token at the dot, so
CMake received "3" and rejected it:

  CMake Error: Invalid CMAKE_POLICY_VERSION_MINIMUM value "3".

Quoting the whole argument delivers "3.5" intact. The script's other -D
flags only survive unquoted because their values contain no dot; comment
updated so the next person adding a dotted -D value doesn't trip the
same wire.

Principle XI.
@ten9876 ten9876 self-assigned this Jun 10, 2026
@ten9876 ten9876 merged commit 753eb68 into main Jun 10, 2026
6 checks passed
@ten9876 ten9876 deleted the fix/ci-windows-hidapi-cmake4 branch June 10, 2026 19:53
ea5wa added a commit to ea5wa/AetherSDR that referenced this pull request Jun 12, 2026
…CI fix)

Conflict resolution in src/gui/MainWindow.cpp followed the aethersdr#3351
extraction: took upstream's refactored constructor and ported the two
WFM-branch additions to their new homes — the VfoWidget::wfmActivated
connect into wireVfoWidget() (MainWindow_Wiring.cpp) and the
HAVE_HIDAPI guard around the FlexControl isTMate2() call
(MainWindow_Controllers.cpp).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
G6PWY-Chris pushed a commit to G6PWY-Chris/AetherSDR that referenced this pull request Jun 22, 2026
…aethersdr#3509)

## Summary

**Repo-wide CI blocker.** Every `check-windows` run since 2026-06-10
~14:36 UTC fails at the **Setup hidapi** step, before any AetherSDR code
compiles. Last green run on main: 04:10 UTC. Every PR branch since fails
identically (aethersdr#3508, the AetherClaude bot's `aetherclaude/issue-3506`
branch).

## Root cause

GitHub's `windows-latest` runner image updated to **CMake 4.x**, which
removed compatibility with `cmake_minimum_required(<3.5)`. hidapi
0.14.0's CMakeLists declares an older minimum, so
`scripts/setup/setup-hidapi.ps1`'s source build now hard-fails at
configure:

```
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.
  ...
  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
```

## Fix

One flag on the configure line — the exact override CMake's own error
message recommends:

```powershell
cmake -B $buildDir -S $srcDir.FullName -G "Ninja" `
    -DCMAKE_BUILD_TYPE=Release `
    -DBUILD_SHARED_LIBS=ON `
    -DCMAKE_POLICY_VERSION_MINIMUM=3.5
```

Configure proceeds with 3.5 policy semantics; the compiled artifact is
unaffected. Inline comment documents when the flag can be dropped
(hidapi version bump with a modern minimum).

## Sibling-script audit

Checked the other Windows setup scripts for the same latent failure:

| Script | cmake source build? | Declared minimum | At risk? |
|---|---|---|---|
| `setup-hidapi.ps1` | yes — hidapi 0.14.0 | < 3.5 | **this PR** |
| `setup-opus.ps1` | yes — opus 1.5.2 | 3.16 | no (verified: builds
locally under CMake 4.3.3) |
| `setup-onnxruntime.ps1` | no (informational echo only) | n/a | no |

## Validation

This PR's own `check-windows` run exercises the fixed script — green CI
on this PR **is** the validation.

Once merged, aethersdr#3508 (and the bot's PR) just need a CI re-run.
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