forked from p2pderivatives/cfd-core
-
Notifications
You must be signed in to change notification settings - Fork 2
246 lines (231 loc) · 7.05 KB
/
check_pre-merge_master.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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
name: master pre-merge check
on:
push:
branches:
- master
- stable_v*
pull_request:
branches:
- master
- stable_v*
jobs:
cmake-win-test:
name: cmake build-win
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2019, windows-2022]
generator: ['MSYS Makefiles']
shared: [on, off]
include:
- os: windows-2019
shared: on
generator: 'Visual Studio 16 2019'
- os: windows-2019
shared: off
generator: 'Visual Studio 16 2019'
- os: windows-2022
shared: on
generator: 'Visual Studio 17 2022'
- os: windows-2022
shared: off
generator: 'Visual Studio 17 2022'
steps:
- uses: actions/checkout@v4
- name: setup python
# for libwally-core test
uses: actions/setup-python@v5
with:
python-version: '3.x'
architecture: x64
- name: cmake_version
run: cmake --version
- name: cmake_generage msys
if: matrix.generator == 'MSYS Makefiles'
run: cmake -S . -B build -G "${{ matrix.generator }}" -DENABLE_SHARED=${{ matrix.shared }} -DENABLE_TESTS=on
- name: cmake_generage vs
if: matrix.generator != 'MSYS Makefiles'
run: cmake -S . -B build -G "${{ matrix.generator }}" -A x64 -DENABLE_SHARED=${{ matrix.shared }} -DENABLE_TESTS=on
- name: cmake_build
run: cmake --build build --config Release --parallel 4
- name: ctest
run: |
cd build
ctest -C Release --output-on-failure
cmake-mac-test:
name: cmake build-mac
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, macos-14, macos-15]
include:
- os: macos-13
xcode_version: '14.3.1'
- os: macos-14
xcode_version: '15.4'
- os: macos-15
xcode_version: '16.1'
steps:
- uses: actions/checkout@v4
- name: Select Xcode version
run: sudo xcode-select -s '/Applications/Xcode_${{matrix.xcode_version}}.app/Contents/Developer'
- name: Show Xcode version
run: xcodebuild -version
- name: cmake_version
run: cmake --version
- name: cmake_generage-macos
run: cmake -S . -B build -G "Unix Makefiles" -DENABLE_SHARED=on -DENABLE_ELEMENTS=on
- name: cmake_build
run: cmake --build build --config Release --parallel 4
- name: ctest
run: |
cd build
ctest -C Release --output-on-failure
- name: lint_check
run: ./tools/lint_quiet.sh
cmake-ubuntu-test:
name: cmake build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04]
shared: [on, off]
elements: [on]
include:
- os: ubuntu-22.04
elements: off
steps:
- uses: actions/checkout@v4
- name: dump version
run: |
cmake --version
gcc --version
- name: cmake_configure
run: cmake -S . -B build -G "Unix Makefiles" -DENABLE_SHARED=${{ matrix.shared }} -DENABLE_ELEMENTS=${{ matrix.elements }} -DTARGET_RPATH=./build/Release
- name: cmake-build
run: cmake --build build --config Release --parallel 4
- name: lint_check
run: ./tools/lint_quiet.sh
- name: test
run: |
cd build
ctest -C Release --output-on-failure
cd ..
cmake-cpp-version-test:
name: cmake cpp version check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022, ubuntu-22.04]
cppver: [11, 14, 17, 20]
include:
- os: windows-2022
generator: 'Visual Studio 17 2022'
steps:
- uses: actions/checkout@v4
- name: setup python
# for libwally-core test
uses: actions/setup-python@v5
with:
python-version: '3.x'
architecture: x64
- name: dump version
run: |
cmake --version
gcc --version
- name: cmake_configure
if: matrix.os != 'windows-2022'
run: cmake -S . -B build -G "Unix Makefiles" -DENABLE_SHARED=on -DENABLE_ELEMENTS=on -DENABLE_TESTS=on -DSTD_CPP_VERSION=${{ matrix.cppver }} -DTARGET_RPATH=./build/Release
- name: cmake_generage vs
if: matrix.os == 'windows-2022'
run: cmake -S . -B build -G "${{ matrix.generator }}" -A x64 -DENABLE_SHARED=on -DENABLE_TESTS=on -DSTD_CPP_VERSION=${{ matrix.cppver }}
- name: cmake_build
run: cmake --build build --config Release --parallel 4
- name: test
run: |
cd build
ctest -C Release --output-on-failure
cmake-ubuntu-coverage:
name: cmake build-ubuntu
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
shared: [on]
elements: [on]
steps:
- uses: actions/checkout@v4
- name: dump version
run: |
cmake --version
gcc --version
- name: ubuntu-apt-install
run: |
cat /etc/os-release
sudo apt install lcov
- name: cmake-build
run: |
cmake --version
cmake -S . -B build -G "Unix Makefiles" -DENABLE_SHARED=${{ matrix.shared }} -DENABLE_ELEMENTS=${{ matrix.elements }} -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=${{ matrix.elements }} -DTARGET_RPATH=./build/Debug
cmake --build build --config Debug --parallel 4
- name: lint_check
run: ./tools/lint_quiet.sh
- name: test
run: |
cd build
ctest -C Debug --output-on-failure
cd ..
- name: collect coverage
run: |
cd build
make lcov_cfdcore
zip -r lcov_cfdcore_output.zip lcov_cfdcore_output
cd ..
- name: upload coverage
uses: actions/upload-artifact@v3
with:
name: output-lcov-cfdcore-${{ matrix.os }}
path: ./build/lcov_cfdcore_output.zip
ubuntu-valgrind:
name: valgrind-ubuntu
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
shared: [on]
steps:
- uses: actions/checkout@v4
- name: dump version
run: |
cmake --version
gcc --version
- name: ubuntu-apt-install
run: |
cat /etc/os-release
sudo apt-get update
sudo apt-get install -y valgrind
- name: cmake-build
run: |
cmake --version
cmake -S . -B build -G "Unix Makefiles" -DENABLE_SHARED=${{ matrix.shared }} -DCMAKE_BUILD_TYPE=Debug -DTARGET_RPATH=./build/Debug
cmake --build build --config Debug --parallel 4
- name: valgrind
run: |
# --valgrind-stacksize=1048576 --num-callers=12
valgrind -v --tool=memcheck --leak-check=full --valgrind-stacksize=10485760 --log-file=./valgrind.log --time-stamp=yes ./build/Debug/cfdcore_test
- name: upload coverage
uses: actions/upload-artifact@v4
with:
name: valgrind-log
path: ./valgrind.log
doxygen-ubuntu:
name: doxygen-check
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: install_doxygen
run: sudo apt install doxygen graphviz
- name: doxygen_check
run: |
cd doc
doxygen Doxyfile_quiet_all