-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.3 KB
/
windows.yml
File metadata and controls
41 lines (39 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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 ninja
- name: Checkout
uses: actions/checkout@v4
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
with:
version: 12.2.0
static: false
- 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