2023-10-28 14:44:02 +00:00
|
|
|
name: Visual Studio Build
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-04-02 04:02:19 +00:00
|
|
|
msvc_arch: ['x64', 'amd64_x86', 'amd64_arm64']
|
|
|
|
# TODO: Re-add "Visual Studio 17 2022" once it's working.
|
2023-10-28 14:44:02 +00:00
|
|
|
cmake_generator: ['Ninja']
|
2024-04-02 04:02:19 +00:00
|
|
|
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
|
2023-10-28 14:44:02 +00:00
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout the code
|
2024-04-02 04:02:19 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-10-28 14:44:02 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Prepare Visual Studio environment
|
2024-04-02 04:02:19 +00:00
|
|
|
uses: ilammy/msvc-dev-cmd@v1.13.0
|
2023-10-28 14:44:02 +00:00
|
|
|
with:
|
|
|
|
arch: ${{ matrix.msvc_arch }}
|
|
|
|
|
2024-04-02 04:02:19 +00:00
|
|
|
- if: matrix.msvc_arch == 'x64'
|
|
|
|
name: Configure (x64)
|
2023-10-28 14:44:02 +00:00
|
|
|
run: >-
|
|
|
|
cmake -B build -G ${{ matrix.cmake_generator }} -DVCPKG_TARGET_TRIPLET=x64-windows-static ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
|
|
|
|
|
2024-04-02 04:02:19 +00:00
|
|
|
- if: matrix.msvc_arch == 'amd64_x86'
|
|
|
|
name: Configure (x86)
|
2023-10-28 14:44:02 +00:00
|
|
|
run: >-
|
|
|
|
cmake -B build -G ${{ matrix.cmake_generator }} -DVCPKG_TARGET_TRIPLET=x86-windows-static ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
|
|
|
|
|
2024-04-02 04:02:19 +00:00
|
|
|
- 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 }}
|
|
|
|
|
2023-10-28 14:44:02 +00:00
|
|
|
- name: Build
|
|
|
|
run: cmake --build build
|