-
Notifications
You must be signed in to change notification settings - Fork 171
103 lines (90 loc) · 2.99 KB
/
windows.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: windows
on:
push:
branches:
- master
paths-ignore:
- '**.md'
- 'docs/**'
pull_request:
branches:
- master
paths-ignore:
- '**.md'
- 'docs/**'
jobs:
msvc:
# windows-2016 and windows-2019 have MSVC 2017 and 2019 installed
# respectively: https://github.com/actions/virtual-environments.
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-2022 ]
platform: [ x64 ]
build_type: [ Debug, Release ]
std: [ 17, 20 ]
with_tests: [ ON ]
include:
# Builds the examples with no exceptions
- os: windows-2022
platform: x64
build_type: Release
std: 17
with_tests: "OFF"
cmake_options: -DQUILL_NO_EXCEPTIONS=ON -DQUILL_BUILD_TESTS=ON
# Builds for ARM
- os: windows-2022
platform: ARM64
build_type: Release
std: 17
with_tests: "OFF"
- os: windows-2022
platform: ARM
build_type: Release
std: 17
with_tests: "OFF"
steps:
- uses: actions/checkout@v4
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure
shell: bash # Use a bash shell for $GITHUB_WORKSPACE.
working-directory: ${{runner.workspace}}/build
run: |
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{matrix.cmake_options}} \
-A ${{matrix.platform}} -DCMAKE_CXX_STANDARD=${{matrix.std}} -DQUILL_BUILD_TESTS=${{matrix.with_tests}} \
-DQUILL_BUILD_EXAMPLES=ON -DQUILL_VERBOSE_MAKEFILE=ON $GITHUB_WORKSPACE
- name: Build
working-directory: ${{runner.workspace}}/build
run: |
$threads = (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors
cmake --build . --config ${{matrix.build_type}} --parallel $threads
- name: Test
working-directory: ${{runner.workspace}}/build
run: |
$threads = (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors
ctest --build-config ${{matrix.build_type}} --parallel $threads --output-on-failure
mingw:
runs-on: windows-2022
defaults:
run:
shell: msys2 {0}
strategy:
matrix:
sys: [mingw64, ucrt64]
build_type: [Release]
std: [17]
with_tests: [ ON ]
steps:
- uses: msys2/setup-msys2@v2
with:
release: false
msystem: ${{matrix.sys}}
pacboy: cc:p cmake:p ninja:p
- uses: actions/checkout@v4
- name: Configure
run: cmake -B ../build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_STANDARD=${{matrix.std}} -DQUILL_BUILD_TESTS=${{matrix.with_tests}} -DQUILL_BUILD_EXAMPLES=ON -DQUILL_VERBOSE_MAKEFILE=ON
- name: Build
run: cmake --build ../build
# - name: Test
# run: ctest --test-dir ../build --output-on-failure