Skip to content

Commit 37504bc

Browse files
committed
.
1 parent 1c8362c commit 37504bc

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

.github/workflows/wheels.yml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,38 @@ jobs:
3737
CIBW_PLATFORM: 'auto'
3838
CIBW_BEFORE_BUILD_WINDOWS: |
3939
echo "Attempting to set up MSVC ARM64 environment..."
40-
rem Assuming Visual Studio 2022 Enterprise edition. Adjust path if different (e.g., Community, BuildTools).
41-
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" arm64
42-
echo "Setting CC, CXX, CL, and _CL_ environment variables for Meson"
43-
set CC=cl
44-
set CXX=cl
45-
rem /Brepro helps with build reproducibility
46-
set CL=/Brepro
47-
set _CL_=/Brepro
48-
echo "Environment setup complete. PATH is: %PATH%"
49-
echo "CC is: %CC%, CXX is: %CXX%"
50-
echo "Verifying cl.exe is in PATH:"
40+
set VCVARS_PATH_ENTERPRISE="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
41+
set VCVARS_PATH_BUILDTOOLS="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat"
42+
set CHOSEN_VCVARS_PATH=
43+
44+
if exist %VCVARS_PATH_ENTERPRISE% (
45+
echo "Found VS Enterprise vcvarsall.bat: %VCVARS_PATH_ENTERPRISE%"
46+
set CHOSEN_VCVARS_PATH=%VCVARS_PATH_ENTERPRISE%
47+
) else if exist %VCVARS_PATH_BUILDTOOLS% (
48+
echo "Found VS Build Tools vcvarsall.bat: %VCVARS_PATH_BUILDTOOLS%"
49+
set CHOSEN_VCVARS_PATH=%VCVARS_PATH_BUILDTOOLS%
50+
) else (
51+
echo "ERROR: vcvarsall.bat not found at expected locations."
52+
exit /b 1
53+
)
54+
55+
echo "Calling %CHOSEN_VCVARS_PATH% arm64"
56+
call %CHOSEN_VCVARS_PATH% arm64
57+
if errorlevel 1 (
58+
echo "ERROR: vcvarsall.bat execution failed."
59+
exit /b 1
60+
)
61+
echo "MSVC environment setup complete."
62+
echo "Verifying cl.exe:"
5163
where cl
64+
if errorlevel 1 (
65+
echo "ERROR: cl.exe not found in PATH after vcvarsall.bat."
66+
exit /b 1
67+
)
68+
echo "PATH is: %PATH%"
69+
echo "INCLUDE is: %INCLUDE%"
70+
echo "LIB is: %LIB%"
71+
CIBW_ENVIRONMENT_WINDOWS: 'CC=cl CXX=cl CL=/Brepro _CL_=/Brepro'
5272

5373
- name: Set up Python for validation
5474
uses: mamba-org/setup-micromamba@v2

0 commit comments

Comments
 (0)