From 5a5c25b8d1525ee3cb1d966cf61828614bc6c05b Mon Sep 17 00:00:00 2001 From: ExPikaPaka Date: Tue, 28 Jul 2026 09:00:25 +0200 Subject: [PATCH] ci(windows): fix config codegen on Windows ARM64 (drop grpcio-tools) The Windows build's "Install codegen tools" step ran `pip install grpcio-tools`, whose grpcio C-extension has no Windows/ARM64 wheel for current Python and fails to build from source on windows-11-arm, so protoc was unavailable and run_codegen aborted at the compile step. The codegen only needs a protoc binary + the protobuf runtime + pyyaml. Install those directly on Windows instead: pip install protobuf (>=6.33.5, matching the committed config_metadata_pb2.py runtime check) + pyyaml, and download a standalone protoc (win64; runs under x64 emulation on arm64). run_codegen prefers a standalone protoc on PATH, so grpcio-tools is no longer needed on Windows. Linux/macOS steps keep grpcio-tools (wheels available there). Verified locally: run_codegen with a protobuf-only venv (no grpcio-tools) + standalone protoc 28.3 -> Lint passed (712 fields), Validation PASSED. --- .github/workflows/build_orca.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index aa5f326a10..a9e9a90710 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -58,8 +58,18 @@ jobs: useCloudCache: true - name: Install codegen tools and generate config sources + # grpcio-tools has no Windows/ARM64 wheel for current Python and fails to build its + # grpcio C-extension from source there. The codegen only needs a protoc binary plus the + # protobuf runtime and pyyaml, so install those directly (works on x64 and arm64 Windows; + # the x64 protoc runs under emulation on arm64). protobuf must be >= the version the + # committed config_metadata_pb2.py was generated with (see its runtime-version check). run: | - pip install grpcio-tools + pip install "protobuf>=6.33.5,<7" pyyaml + $protocVer = "28.3" + $url = "https://github.com/protocolbuffers/protobuf/releases/download/v$protocVer/protoc-$protocVer-win64.zip" + Invoke-WebRequest -Uri $url -OutFile "$env:RUNNER_TEMP\protoc.zip" + Expand-Archive -Path "$env:RUNNER_TEMP\protoc.zip" -DestinationPath "$env:RUNNER_TEMP\protoc" -Force + $env:PATH = "$env:RUNNER_TEMP\protoc\bin;$env:PATH" python tools/run_codegen.py if: runner.os == 'Windows' shell: pwsh