From acaec4239ebd6fe316d6d73c5a623a0d7eeb9a37 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Fri, 8 Nov 2024 16:06:06 -0800 Subject: [PATCH 1/2] MSVC CI SDL3 build --- .github/workflows/ci.yml | 54 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba591a40d..f8d9921be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -411,6 +411,60 @@ jobs: name: FAudio-SDL3-x64 path: release-x64/FAudio.dll + windows-msvc-SDL3: + name: Windows (MSVC) SDL3 + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Cache SDL + uses: actions/cache@v4 + env: + cache-name: cache-sdl + with: + path: C:\SDL + key: ${{ runner.os }}-build-${{ env.cache-name }} + + - name: Download SDL if not cached + run: | + if (-Not (Test-Path C:\SDL)) + { + 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 + Expand-Archive C:\SDL.zip -DestinationPath C:\ + } + + - name: CMake configure (Debug) + run: | + $env:LDFLAGS = "/LIBPATH:C:\SDL3-$env:SDL3_VERSION\lib\x64 " + cmake -B debug -G "Visual Studio 17 2022" . -DCMAKE_BUILD_TYPE:STRING=Debug ` + -A x64 ` + -DBUILD_SDL3=ON ` + -DSDL3_INCLUDE_DIRS="C:\SDL3-$env:SDL3_VERSION\include" ` + -DSDL3_LIBRARIES="SDL3" + + - name: Build (Debug) + run: cmake --build debug --config Debug + + - name: CMake configure (Release) + run: | + $env:LDFLAGS = "/LIBPATH:C:\SDL3-$env:SDL3_VERSION\lib\x64 " + cmake -B release -G "Visual Studio 17 2022" . -DCMAKE_BUILD_TYPE:STRING=Release ` + -A x64 ` + -DBUILD_SDL3=ON ` + -DSDL3_INCLUDE_DIRS="C:\SDL3-$env:SDL3_VERSION\include" ` + -DSDL3_LIBRARIES="SDL3" + + - name: Build (Release) + run: cmake --build release --config Release + + - name: Archive build result + uses: actions/upload-artifact@v4 + with: + name: FAudio-SDL3-msvc-x64 + path: release/Release/FAudio.dll + macos-SDL3: name: macOS (Universal) SDL3 runs-on: macos-latest From dce8184f7ffb40880fbb21f9ef018a6fb503ef14 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Sat, 9 Nov 2024 12:00:43 -0800 Subject: [PATCH 2/2] Fix SDL2 MSVC debug and release --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8d9921be..45effd232 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -233,7 +233,7 @@ jobs: -DSDL2_LIBRARIES="SDL2;SDL2main" - name: Build (Debug) - run: cmake --build debug + run: cmake --build debug --config Debug - name: CMake configure (Release) run: | @@ -244,7 +244,7 @@ jobs: -DSDL2_LIBRARIES="SDL2;SDL2main" - name: Build (Release) - run: cmake --build release + run: cmake --build release --config Release freebsd: runs-on: ubuntu-latest