-
Notifications
You must be signed in to change notification settings - Fork 283
186 lines (164 loc) · 5.13 KB
/
on_PR_windows_matrix.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
name: On PRs - Windows Matrix
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
pull_request:
paths-ignore:
- "*.md"
workflow_dispatch:
push:
branches:
- main
tags:
- '!*'
paths-ignore:
- "*.md"
jobs:
windows:
name: 'Win10 Arch: ${{matrix.platform}} BuildType:${{matrix.build_type}} - SHARED:${{matrix.shared_libraries}}'
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
build_type: [Release, Debug]
shared_libraries: [ON, OFF]
platform: [ x64, x86 ]
steps:
- uses: actions/checkout@v4
- name: Set up Visual Studio shell
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.platform}}
- name: Restore Conan cache
uses: actions/cache@v3
with:
path: ${{github.workspace}}/conanCache
key: ${{runner.os}}-${{matrix.platform}}-${{matrix.build_type}}-Shared${{matrix.shared_libraries}}-${{ hashFiles('conanfile.py') }}
- name: Install Conan & Common config
run: |
python -m pip install conan==1.59.0
conan config install https://github.com/conan-io/conanclientcert.git
conan profile new --detect default
conan profile update settings.build_type=${{matrix.build_type}} default
conan profile update settings.compiler="Visual Studio" default
conan profile update settings.compiler.version=17 default
conan config set storage.path=$Env:GITHUB_WORKSPACE/conanCache
- name: Conan Arch conditional config
if: ${{matrix.platform == 'x86'}}
run: |
conan profile update settings.arch=x86 default
conan profile update settings.arch_build=x86 default
- name: Run Conan
run: |
md build
cd build
conan profile list
conan install .. --build missing
- name: Build
run: |
cmake --preset base_windows -S . -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}}
cmake --build build --parallel
- name: Install
run: |
cmake --install build
- name: Test
run: |
ctest --test-dir build --output-on-failure
msys2:
runs-on: windows-latest
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
build_type: [Release, Debug]
shared_libraries: [ON, OFF]
sys: [UCRT64]
name: MSYS2 ${{matrix.sys}} - BuildType:${{matrix.build_type}} - SHARED:${{matrix.shared_libraries}}
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
path-type: strict
msystem: ${{matrix.sys}}
update: true
pacboy: >-
cc:p
gcc-libs:p
libwinpthread:p
cmake:p
ninja:p
python:p
gtest:p
brotli:p
curl:p
expat:p
libiconv:p
libinih:p
zlib:p
- name: Build
run: |
cmake --preset base_windows \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} \
-DCONAN_AUTO_INSTALL=OFF \
-DEXIV2_TEAM_WARNINGS_AS_ERRORS=OFF \
-DPython3_EXECUTABLE=${MINGW_PREFIX}/bin/python.exe \
-S . -B build && \
cmake --build build --parallel
- name: Test
run: |
ctest --test-dir build --output-on-failure
cygwin:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
build_type: [Release]
shared_libraries: [ON]
platform: [x86_64]
name: Cygwin ${{matrix.platform}} - BuildType:${{matrix.build_type}} - SHARED:${{matrix.shared_libraries}}
env:
SHELLOPTS: igncr
defaults:
run:
shell: C:\cygwin\bin\bash.exe -eo pipefail '{0}'
steps:
# Make sure we don't check out scripts using Windows CRLF line endings
- run: git config --global core.autocrlf input
shell: pwsh
- uses: actions/checkout@v4
- name: Set up Cygwin
uses: cygwin/cygwin-install-action@v4
with:
platform: ${{matrix.platform}}
packages: >-
gcc-g++
cmake
ninja
pkg-config
python3
libbrotli-devel
libcurl-devel
libexpat-devel
libiconv-devel
libinih-devel
zlib-devel
- name: Build
run: |
cmake --preset base_windows \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} \
-DCONAN_AUTO_INSTALL=OFF \
-DEXIV2_BUILD_SAMPLES=OFF \
-DEXIV2_BUILD_UNIT_TESTS=OFF \
-DEXIV2_TEAM_WARNINGS_AS_ERRORS=OFF \
-S . -B build && \
cmake --build build --parallel
- name: Test
run: |
ctest --test-dir build --output-on-failure