[workflows] enable mingw #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: windows | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{matrix.config.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
# https://github.com/actions/virtual-environments/tree/main/images/win | |
- { os: "windows-2019", cc: "msvc2019", arch: "x86" } | |
- { os: "windows-2019", cc: "msvc2019", arch: "x64" } | |
- { os: "windows-2022", cc: "msvc2022", arch: "x86" } | |
- { os: "windows-2022", cc: "msvc2022", arch: "x64" } | |
- { os: "windows-2022", cc: "mingw", arch: "x64" } | |
#name: "${{matrix.config.cc}} ${{matrix.config.arch}}" | |
steps: | |
- name: Setup | |
run: choco install cmake ninja | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup MSVC | |
if: matrix.config.cc != 'mingw' | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Setup MinGW | |
if: matrix.config.cc == 'mingw' | |
uses: egor-tensin/setup-mingw@v2 | |
- name: Build | |
run: | | |
cmake --preset windows-${{matrix.config.arch}}-${{matrix.config.cc}} | |
cmake --build --preset windows-${{matrix.config.arch}}-${{matrix.config.cc}}-release | |
- name: Test | |
run: | | |
ctest --preset windows-${{matrix.config.arch}}-${{matrix.config.cc}}-release |