Skip to content

os: add support for windows (2/2) - #2

Merged
AmyJeanes merged 1 commit into
windowsfrom
windows-ci
Sep 7, 2026
Merged

os: add support for windows (2/2)#2
AmyJeanes merged 1 commit into
windowsfrom
windows-ci

Conversation

@AmyJeanes

@AmyJeanes AmyJeanes commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Follow-up to the msgq Windows backend PR, commaai#709: after that change lets openpilot build and run msgq on Windows, this one makes msgq itself build and test there, with a windows-latest CI entry to keep it that way.

Why this lives on my fork for now. It is stacked on the Windows backend branch, so it targets that branch here and the diff shows only the follow-up. It cannot go upstream until that PR has merged. Nothing here needs the comma-deps Windows wheels: msgq's dev dependencies are all on PyPI for win_amd64 (the cppcheck wheel ships a Windows binary), so there is no fork-only commit and this can be recreated against comma as soon as the base merges.

What changes

  • SConstruct: the mingw tool with clang on Windows (the default tool picks MSVC), libc++ linked statically so the test runner and the modules run outside the MSYS2 shell, winsock linked in for visionipc's sockets (the common list now chooses per platform, rt on Linux as before), and the Cython modules linked against the interpreter's import library.
  • setup.py copies the .pyd the cython tool names on Windows.
  • setup.sh pins uv to a native CPython in an MSYS2 shell (the toolchain's own python comes first on PATH, and its wheels are incompatible) and activates the venv from Scripts/; test.sh's install test uses the same layout.
  • tests.yml: a windows-latest entry running the same ./test.sh from an MSYS2 CLANG64 shell (only clang is installed on top of the runner's MSYS2), with a five-minute budget where the others keep one. Only that entry names its shell; the others keep bash -e {0}, GitHub's implicit default.

Testing

  • ./test.sh on Windows: build, ruff, ty, codespell, cppcheck, cpplint, the C++ runner (14/14), the unit tests (29) and the install test (3) pass, 13 s on a workstation.
  • This workflow on all four platforms, on this PR.

The changes in this PR were generated by Claude Fable 5.1 but were human reviewed and fully tested end to end both locally and in CI.

The standalone build picks the mingw tool with clang (the default tool
picks MSVC), links libc++ statically so the binaries run outside the
MSYS2 shell, and links mman-win32 and winsock for mmap and visionipc's
sockets; the extension modules link against the interpreter's import
library. setup.py copies the .pyd the cython tool names. setup.sh pins
uv to a native CPython (the MSYS2 toolchain's own python comes first on
PATH and its wheels are incompatible) and activates the venv from
Scripts/; test.sh's install test uses the same layout. tests.yml gains a
windows-latest entry running in the CLANG64 shell from setup-msys2, with
a five-minute budget for ./test.sh on the 4-core runner.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
@AmyJeanes AmyJeanes changed the title Build and test on Windows (MSYS2 CLANG64) os: add support for windows (2/2) Sep 7, 2026
@AmyJeanes
AmyJeanes merged commit c7e8369 into windows Sep 7, 2026
18 checks passed
@AmyJeanes
AmyJeanes deleted the windows-ci branch September 7, 2026 23:22
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