mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-29 05:42:33 +00:00
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.
This commit is contained in:
12
.github/workflows/build_orca.yml
vendored
12
.github/workflows/build_orca.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user