From ee327d7807babd872e54c5f2a9f253b5be544f1c Mon Sep 17 00:00:00 2001
From: Leandro Nini <[EMAIL REDACTED]>
Date: Wed, 4 Oct 2023 18:52:43 +0200
Subject: [PATCH] Added Windows CI build
---
.github/workflows/CI-Windows.yml | 40 ++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 .github/workflows/CI-Windows.yml
diff --git a/.github/workflows/CI-Windows.yml b/.github/workflows/CI-Windows.yml
new file mode 100644
index 0000000..1922508
--- /dev/null
+++ b/.github/workflows/CI-Windows.yml
@@ -0,0 +1,40 @@
+name: CI Windows
+
+on:
+ push:
+ branches: [ "master" ]
+ pull_request:
+ branches: [ "master" ]
+
+jobs:
+ build:
+ name: Windows (${{ matrix.configuration }})
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ configuration: [Debug, Release]
+ include:
+ - generator: Visual Studio 17 2022
+ os: windows-latest
+ env:
+ VS_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2022\Community\
+ MSBUILD_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Install dependencies
+ run: |
+ choco install -y --no-progress cmake --install-arguments="ADD_CMAKE_TO_PATH=System"
+ choco install -y --no-progress visualstudio2022community
+ - name: Install SDL2
+ shell: powershell
+ run: |
+ Invoke-WebRequest -Uri "https://www.libsdl.org/release/SDL2-devel-2.26.5-VC.zip" -OutFile "SDL2-devel-2.26.5-VC.zip"
+ Expand-Archive -Path SDL2-devel-2.26.5-VC.zip
+ echo "SDL2_DIR=$(pwd)\SDL2-devel-2.26.5-VC\SDL2-2.26.5\" >>${env:GITHUB_ENV}
+ - name: Build
+ run: |
+ mkdir build
+ cd build
+ cmake -G "${{ matrix.generator }}" -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} ..
+ cmake --build .