The trick is add before cibuildwheel job:
- name: "VS setup env"
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64
It just run vcvars64.bat and Does nothing on Linux/Mac.
For the record none of is working:
CIBW_BEFORE_BUILD_WINDOWS to call C:\"Program Files"\"Microsoft Visual Studio"\2022\Enterprise\VC\Auxiliary\Build\vcvars64.batCIBW_BEFORE_ALL_WINDOWS to call C:\"Program Files"\"Microsoft Visual Studio"\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat