Skip to content

Commit

Permalink
ci: add Visual Studio workflow
Browse files Browse the repository at this point in the history
Add a Visual Studio build workflow to the CI, test building using ninja
(msbuild support needs to be fixed) for both 64 and 32 bit.

Signed-off-by: Rafael Kitover <[email protected]>
  • Loading branch information
rkitover committed Oct 28, 2023
1 parent 3a1b577 commit 99923dd
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/visual-studio-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Visual Studio Build
on: [push, pull_request]

jobs:
build:
strategy:
matrix:
msvc_arch: ['x64', 'x64_x86']
cmake_generator: ['Ninja']
# cmake_generator: ['Ninja', '"Visual Studio 17 2022"']
cmake_build: ['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_BUILD_TYPE=Debug']
cmake_options: ['', '-DENABLE_LINK=OFF', '-DENABLE_SDL=ON']
runs-on: windows-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
with:
submodules: recursive

- name: Prepare Visual Studio environment
uses: ilammy/[email protected]
with:
arch: ${{ matrix.msvc_arch }}

- name: Configure (x64)
if: matrix.msvc_arch == 'x64'
run: >-
cmake -B build -G ${{ matrix.cmake_generator }} -DVCPKG_TARGET_TRIPLET=x64-windows-static ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
- name: Configure (x86)
if: matrix.msvc_arch == 'x64_x86'
run: >-
cmake -B build -G ${{ matrix.cmake_generator }} -DVCPKG_TARGET_TRIPLET=x86-windows-static ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
- name: Build
run: cmake --build build

0 comments on commit 99923dd

Please sign in to comment.