-
Notifications
You must be signed in to change notification settings - Fork 365
292 lines (261 loc) · 7.36 KB
/
ci.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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# GitHub Actions for GEOS
#
# Paul Ramsey <pramsey at cleverelephant dot ca>
# Based on AZP configuration by Mateusz Loskot <mateusz at loskot dot net>
name: 'CI'
on:
push:
paths-ignore:
- 'web/**'
pull_request: ~
jobs:
linux:
name: 'Linux'
strategy:
matrix:
ci:
- {
compiler: g++,
build_type: Coverage,
cxxstd: 11,
arch: 64,
packages: 'g++',
cmake: 3.15.*,
cmake_extra: '-DBUILD_BENCHMARKS=ON',
os: ubuntu-18.04
}
- {
compiler: g++,
build_type: Release,
cxxstd: 11,
arch: 32,
packages: 'g++-4.8-multilib gcc-4.8-multilib g++-multilib gcc-multilib',
cmake: 3.13.*,
os: ubuntu-18.04
}
- {
compiler: clang++,
build_type: Release,
cxxstd: 11,
arch: 64,
packages: 'clang',
cmake: 3.13.*,
os: ubuntu-18.04
}
- {
compiler: clang++,
build_type: Release,
cxxstd: 11,
arch: 64,
packages: 'g++',
cmake: 3.15.*,
cmake_extra: '-DDISABLE_GEOS_INLINE=ON',
os: ubuntu-20.04
}
- {
compiler: clang++,
build_type: Debug,
cxxstd: 11,
arch: 64,
packages: 'clang',
cmake: 3.17.*,
os: ubuntu-20.04,
}
- {
compiler: clang++,
build_type: Release,
cxxstd: 14,
arch: 64,
packages: 'clang',
cmake: 3.17.*,
os: ubuntu-20.04
}
- {
compiler: g++,
build_type: Release,
cxxstd: 11,
arch: 64,
packages: 'g++',
cmake: 3.22.*,
os: ubuntu-22.04
}
runs-on: ${{ matrix.ci.os }}
steps:
- name: 'Install'
run: |
set -e
uname -a
sudo -E apt-get update
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install make doxygen python3-pip valgrind ${{ matrix.ci.packages }}
python3 -m pip install --disable-pip-version-check --user cmake==${{ matrix.ci.cmake }}
echo "$(python3 -m site --user-base)/bin" >> $GITHUB_PATH
- name: 'Check Out'
uses: actions/checkout@v2
- name: 'Build'
env:
CFLAGS: "-m${{ matrix.ci.arch }}"
CXXFLAGS: "-m${{ matrix.ci.arch }}"
run: |
set -e
mkdir build.cmake
cd build.cmake
cmake --version
cmake ${{ matrix.ci.cmake_extra }} -DCMAKE_CXX_COMPILER=${{ matrix.ci.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.ci.cxxstd }} -DBUILD_DOCUMENTATION=YES -DCMAKE_BUILD_TYPE=${{ matrix.ci.build_type }} ..
make -j 2
cmake --build . --target docs
- name: Test
run: |
set -e
cd build.cmake
ctest --output-on-failure .
# Run the all-unit-tests under
# the memory checker when we have Debug symbols
# available. Change to ^all to also check all-xml-tests
- name: Valgrind
if: matrix.ci.build_type == 'Debug'
run: |
set -e
cd build.cmake
ctest --output-on-failure \
--overwrite MemoryCheckCommandOptions="--leak-check=full --error-exitcode=100" \
-R ^all-unit -C Valgrind -T memcheck
- name: 'Upload Valgrind Log'
if: failure()
uses: actions/upload-artifact@v2
with:
name: valgrind-log
path: build.cmake/Testing/Temporary/MemoryChecker.**.log
retention-days: 1
- name: Upload Coverage to Codecov
if: matrix.ci.build_type == 'Coverage'
run: |
curl -o codecov.sh https://codecov.io/bash
bash codecov.sh
shell: bash
windows-mingw:
name: 'Windows (mingw-w64, Debug, 11, x86_64, windows-2019)'
runs-on: windows-2019
defaults:
run:
shell: msys2 {0}
steps:
- name: 'Check Out'
uses: actions/checkout@v2
- name: 'Setup'
uses: msys2/setup-msys2@v2
with:
install: mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake make
update: true
- name: 'Build'
run: |
mkdir build
cd build
cmake --version
cmake -DCMAKE_BUILD_TYPE=Debug -G"MSYS Makefiles" ..
cmake --build . -j 2
- name: 'Test'
run: |
cd build
ctest --output-on-failure .
windows-mingw-release:
name: 'Windows (mingw-w64, Release, 11, x86_64, windows-2019)'
runs-on: windows-2019
defaults:
run:
shell: msys2 {0}
steps:
- name: 'Check Out'
uses: actions/checkout@v2
- name: 'Setup'
uses: msys2/setup-msys2@v2
with:
install: mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake make
update: true
- name: 'Build'
run: |
mkdir build
cd build
cmake --version
cmake -DCMAKE_BUILD_TYPE=Release -G"MSYS Makefiles" ..
cmake --build . -j 2
- name: 'Test'
run: |
cd build
ctest --output-on-failure .
windows-msvc-22:
name: 'Windows (Visual Studio 2022, Debug, windows-2022)'
runs-on: windows-2022
steps:
- name: 'Check Out'
uses: actions/checkout@v2
- name: 'Build'
run: |
mkdir build
cd build
cmake --version
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=14 -DBUILD_SHARED_LIBS=ON ..
cmake --build . --config Debug -j 2
- name: 'Test'
run: |
cd build
ctest --output-on-failure -C Debug
windows-msvc-19:
name: 'Windows (Visual Studio 2019, Release, windows-2019)'
runs-on: windows-2019
steps:
- name: 'Check Out'
uses: actions/checkout@v2
- name: 'Build'
run: |
mkdir build
cd build
cmake --version
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=14 -DBUILD_SHARED_LIBS=ON ..
cmake --build . --config Release -j 2
- name: 'Test'
run: |
cd build
ctest --output-on-failure -C Release
# windows-msvc-17:
# name: 'Windows (Visual Studio 2017, Release, windows-2016)'
# runs-on: windows-2016
# steps:
# - name: 'Check Out'
# uses: actions/checkout@v2
# - name: 'Build'
# run: |
# mkdir build
# cd build
# cmake --version
# cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=11 -DBUILD_SHARED_LIBS=ON ..
# cmake --build . --config Release -j 2
# - name: 'Test'
# run: |
# cd build
# ctest --output-on-failure -C Release
cmake-subproject:
name: 'CMake Subproject'
runs-on: ubuntu-18.04
steps:
- name: 'Install'
run: |
set -e
uname -a
sudo -E apt-get update
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install make python3-pip g++
python3 -m pip install --disable-pip-version-check --user cmake==3.13.*
echo "$(python3 -m site --user-base)/bin" >> $GITHUB_PATH
- name: 'Check Out'
uses: actions/checkout@v2
with:
path: geos
- name: 'CMake Superbuild'
run: |
set -e
cp geos/tests/superbuild.CMakeLists.txt ./CMakeLists.txt
cp geos/examples/capi_read.c .
cmake --version
cmake -S . -B build
cmake --build build -j 2
build/capi_read
test ! -f build/geos/bin/test_geos_unit || { echo "Error: GEOS tests were built" 1>&2 ; exit 1; }