Skip to content

Commit c354bfe

Browse files
MSVC CI SDL3 (#366)
1 parent 253e46c commit c354bfe

File tree

1 file changed

+56
-2
lines changed

1 file changed

+56
-2
lines changed

.github/workflows/ci.yml

+56-2
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ jobs:
233233
-DSDL2_LIBRARIES="SDL2;SDL2main"
234234
235235
- name: Build (Debug)
236-
run: cmake --build debug
236+
run: cmake --build debug --config Debug
237237

238238
- name: CMake configure (Release)
239239
run: |
@@ -244,7 +244,7 @@ jobs:
244244
-DSDL2_LIBRARIES="SDL2;SDL2main"
245245
246246
- name: Build (Release)
247-
run: cmake --build release
247+
run: cmake --build release --config Release
248248

249249
freebsd:
250250
runs-on: ubuntu-latest
@@ -411,6 +411,60 @@ jobs:
411411
name: FAudio-SDL3-x64
412412
path: release-x64/FAudio.dll
413413

414+
windows-msvc-SDL3:
415+
name: Windows (MSVC) SDL3
416+
runs-on: windows-latest
417+
steps:
418+
- uses: actions/checkout@v4
419+
with:
420+
submodules: true
421+
422+
- name: Cache SDL
423+
uses: actions/cache@v4
424+
env:
425+
cache-name: cache-sdl
426+
with:
427+
path: C:\SDL
428+
key: ${{ runner.os }}-build-${{ env.cache-name }}
429+
430+
- name: Download SDL if not cached
431+
run: |
432+
if (-Not (Test-Path C:\SDL))
433+
{
434+
Invoke-WebRequest "https://github.com/libsdl-org/SDL/releases/download/preview-$env:SDL3_VERSION/SDL3-devel-$env:SDL3_VERSION-VC.zip" -OutFile C:\SDL.zip
435+
Expand-Archive C:\SDL.zip -DestinationPath C:\
436+
}
437+
438+
- name: CMake configure (Debug)
439+
run: |
440+
$env:LDFLAGS = "/LIBPATH:C:\SDL3-$env:SDL3_VERSION\lib\x64 "
441+
cmake -B debug -G "Visual Studio 17 2022" . -DCMAKE_BUILD_TYPE:STRING=Debug `
442+
-A x64 `
443+
-DBUILD_SDL3=ON `
444+
-DSDL3_INCLUDE_DIRS="C:\SDL3-$env:SDL3_VERSION\include" `
445+
-DSDL3_LIBRARIES="SDL3"
446+
447+
- name: Build (Debug)
448+
run: cmake --build debug --config Debug
449+
450+
- name: CMake configure (Release)
451+
run: |
452+
$env:LDFLAGS = "/LIBPATH:C:\SDL3-$env:SDL3_VERSION\lib\x64 "
453+
cmake -B release -G "Visual Studio 17 2022" . -DCMAKE_BUILD_TYPE:STRING=Release `
454+
-A x64 `
455+
-DBUILD_SDL3=ON `
456+
-DSDL3_INCLUDE_DIRS="C:\SDL3-$env:SDL3_VERSION\include" `
457+
-DSDL3_LIBRARIES="SDL3"
458+
459+
- name: Build (Release)
460+
run: cmake --build release --config Release
461+
462+
- name: Archive build result
463+
uses: actions/upload-artifact@v4
464+
with:
465+
name: FAudio-SDL3-msvc-x64
466+
path: release/Release/FAudio.dll
467+
414468
macos-SDL3:
415469
name: macOS (Universal) SDL3
416470
runs-on: macos-latest

0 commit comments

Comments
 (0)