Skip to content

Commit 541e750

Browse files
committed
Trying again...
1 parent 332217f commit 541e750

1 file changed

Lines changed: 13 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,34 +61,33 @@ jobs:
6161
if: matrix.os == 'windows-latest'
6262
shell: cmd
6363
run: |
64-
:: 1. Initialize Visual Studio
6564
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
6665
67-
:: 2. Define our paths clearly
6866
set "SWIFT_ROOT=C:\Users\runneradmin\AppData\Local\Programs\Swift"
6967
set "SDKROOT=%SWIFT_ROOT%\Platforms\6.0.3\Windows.platform\Developer\SDKs\Windows.sdk"
70-
set "RESOURCE_DIR=%SWIFT_ROOT%\Toolchains\6.0.3+Asserts\usr\lib\swift"
7168
72-
echo Starting Build with final path mapping...
69+
:: Adjusting to the platform-specific lib folder
70+
set "RESOURCE_DIR=%SWIFT_ROOT%\Toolchains\6.0.3+Asserts\usr\lib\swift\windows"
7371
74-
:: 3. Execute build with both Resource Dir and SDK Include flags
72+
echo Verifying Paths...
73+
if not exist "%RESOURCE_DIR%\shims" (
74+
echo "Shims not found in %RESOURCE_DIR%, trying parent..."
75+
set "RESOURCE_DIR=%SWIFT_ROOT%\Toolchains\6.0.3+Asserts\usr\lib\swift"
76+
)
77+
78+
dir "%RESOURCE_DIR%\shims"
79+
80+
echo Starting Build with Corrected Paths...
7581
swift build -c release -v ^
7682
-Xswiftc -resource-dir -Xswiftc "%RESOURCE_DIR%" ^
7783
-Xswiftc -I -Xswiftc "%RESOURCE_DIR%\shims" ^
78-
-Xswiftc -I -Xswiftc "%SDKROOT%\usr\lib\swift" ^
84+
-Xswiftc -L -Xswiftc "%RESOURCE_DIR%" ^
7985
-Xcc -fno-implicit-modules ^
8086
-Xcc -fno-modules ^
8187
-Xcc -D_CRT_USE_BUILTIN_OFF ^
8288
-Xswiftc -Xfrontend -Xswiftc -disable-implicit-concurrency-module-import
8389
84-
if %ERRORLEVEL% NEQ 0 (
85-
echo "Build failed. Checking for existence of Shims..."
86-
dir "%RESOURCE_DIR%\shims"
87-
exit /b %ERRORLEVEL%
88-
)
89-
90-
echo Build successful! Finding your DLL...
91-
dir /s /b .build\*.dll
90+
if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
9291
9392
- name: Verify library was built
9493
shell: bash

0 commit comments

Comments
 (0)