Skip to content

Add Windows build to GitHub Actions - #22

Merged
amoseui merged 4 commits into
mainfrom
250426-win
Jun 21, 2026
Merged

amoseui merged 4 commits into
mainfrom
250426-win

Conversation

@amoseui

@amoseui amoseui commented Apr 26, 2025 •

Copy link
Copy Markdown
Owner

Summary

Add windows-latest to the CI matrix and make the Windows build actually
pass, rebased onto the latest main (2026-06 DEPS update).

Changes

  • DEPS: add buildtools/win (gn windows-amd64 CIPD, host_os == "win").
    ninja is already ${platform}-based, so it covers Windows automatically.
  • build/BUILDCONFIG.gn: select the toolchain by OS — msvc_toolchain_$current_cpu
    on Windows, gcc_like_toolchain elsewhere (crashpad's pattern). The old code
    forced gcc_like_toolchain everywhere, so clang++ was handed MSVC-style flags
    (/W4, /Zi, /std:c++23preview) and failed.
  • .github/workflows/main.yml:
    • matrix: add windows-latest (fail-fast: false keeps mac/linux independent).
    • run all jobs under shell: bash (Git Bash on Windows) — one set of steps.
    • DEPOT_TOOLS_WIN_TOOLCHAIN=0 + mini_chromium_is_clang=false on Windows so the
      build uses the runner's Visual Studio cl.exe and skips the large clang download.
    • handle the .exe suffix when running the binaries.
    • bump actions to Node 24 majors (checkout@v5, setup-python@v6, cache@v5) to clear
      the "Node.js 20 is deprecated" warning.

Verification (GitHub Actions)

All three matrix jobs pass:

  • ubuntu-latest ✅
  • macOS-latest ✅
  • windows-latest ✅ — LINK hello.exe → Hello, world 1, [ PASSED ] 2 tests.

No Node.js 20 deprecation warning.

🤖 Generated with Claude Code

Add buildtools/win (gn windows-amd64) to DEPS, run all jobs under
bash, set DEPOT_TOOLS_WIN_TOOLCHAIN=0, and handle the .exe suffix so
windows-latest builds and runs hello/hello_unittest.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
amoseui and others added 3 commits June 21, 2026 23:42
mini_chromium emits MSVC-style flags (/W4, /Zi, /std:c++23preview) on
Windows, which the gcc_like (clang++) driver rejects. Pick
msvc_toolchain_$current_cpu when current_os == "win", like crashpad.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pass mini_chromium_is_clang=false on Windows so the build uses the
autodetected Visual Studio cl.exe and skips the clang-only flags,
avoiding a large clang toolchain download.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move checkout@v5, setup-python@v6, cache@v5 so the workflow no longer
triggers the "Node.js 20 is deprecated" Actions warning.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@amoseui amoseui changed the title Add Windows build in GitHub Actions Add Windows build to GitHub Actions Jun 21, 2026
@amoseui
amoseui merged commit 75794ef into main Jun 21, 2026
3 checks passed
@amoseui
amoseui deleted the 250426-win branch June 21, 2026 14:57
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