visualboyadvance-m/.github/workflows/visual-studio-build.yml

51 lines
1.8 KiB
YAML
Raw Normal View History

name: Visual Studio Build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
msvc_arch: ['x64', 'amd64_x86', 'amd64_arm64']
# TODO: Re-add "Visual Studio 17 2022" once it's working.
cmake_generator: ['Ninja']
build_type: [release, debug]
build_options: [default, link_off, translations_only]
include:
- cmake_build: '-DCMAKE_BUILD_TYPE=Release'
build_type: release
- cmake_build: '-DCMAKE_BUILD_TYPE=Debug'
build_type: debug
- cmake_options: '-DENABLE_LINK=OFF'
build_options: link_off
- cmake_options: '-DTRANSLATIONS_ONLY=ON'
build_options: translations_only
runs-on: windows-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Prepare Visual Studio environment
uses: ilammy/msvc-dev-cmd@v1.13.0
with:
arch: ${{ matrix.msvc_arch }}
- if: matrix.msvc_arch == 'x64'
name: Configure (x64)
run: >-
cmake -B build -G ${{ matrix.cmake_generator }} -DVCPKG_TARGET_TRIPLET=x64-windows-static ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
- if: matrix.msvc_arch == 'amd64_x86'
name: Configure (x86)
run: >-
cmake -B build -G ${{ matrix.cmake_generator }} -DVCPKG_TARGET_TRIPLET=x86-windows-static ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
- if: matrix.msvc_arch == 'amd64_arm64'
name: Configure (arm64)
run: >-
cmake -B build -G ${{ matrix.cmake_generator }} -DVCPKG_TARGET_TRIPLET=arm64-windows-static ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
- name: Build
run: cmake --build build