@@ -61,22 +61,31 @@ jobs:
6161 if : matrix.os == 'windows-latest'
6262 shell : cmd
6363 run : |
64- :: 1. Load the VS Environment
64+ :: 1. Initialize Visual Studio Environment
6565 call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
6666
67- :: 2. Set necessary Swift environment variables
67+ :: 2. Set the SDK Root
6868 set "SDKROOT=C:\Users\runneradmin\AppData\Local\Programs\Swift\Platforms\5.10.1\Windows.platform\Developer\SDKs\Windows.sdk"
69- set "SWIFT_BIN=C:\Users\runneradmin\AppData\Local\Programs\Swift\Toolchains\5.10.1+Asserts\usr\bin"
7069
71- :: 3. Explicitly add Swift and YOUR dlibs to the PATH
72- set "PATH=%SWIFT_BIN%;%GITHUB_WORKSPACE%\loop_to_python_api\dlibs\windows;%PATH%"
73-
74- :: 4. Run the build using the ABSOLUTE path to swift.exe
70+ :: 3. Verify Swift location and run build
71+ echo Searching for swift.exe...
72+ where swift.exe
73+ if %ERRORLEVEL% NEQ 0 (
74+ echo "ERROR: swift.exe not found in PATH. Checking manual locations..."
75+ dir /s /b C:\Users\runneradmin\AppData\Local\Programs\Swift\swift.exe
76+ )
77+
7578 echo Starting Fresh Swift Build...
76- "%SWIFT_BIN%\ swift.exe" build -c release -v
79+ swift build -c release -v
7780
78- :: 5. Locate the result
79- dir /s .build\*.dll
81+ if %ERRORLEVEL% NEQ 0 (
82+ echo "Swift build failed with exit code %ERRORLEVEL%"
83+ exit /b %ERRORLEVEL%
84+ )
85+
86+ :: 4. Show the results
87+ echo Build finished. Searching for DLL...
88+ dir /s /b .build\*.dll
8089
8190 - name : Verify library was built
8291 shell : bash
0 commit comments