-
Notifications
You must be signed in to change notification settings - Fork 27
514 lines (508 loc) · 20.3 KB
/
cmake-build-ci.yml
File metadata and controls
514 lines (508 loc) · 20.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
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
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# Generated file; do not edit!
name: cmake-build-ci
on:
workflow_dispatch:
release:
types: [published]
push:
paths:
- ".github/workflows/cmake-build-ci*"
- "CMake*"
- "CPack*"
- "contrib/**"
- "include/**"
- "src/**"
- "test/**"
branches-ignore:
- gh-pages
pull_request:
branches:
- master
- v1.x
env:
# defaults
INSTALL_MEMCACHED: memcached
ENABLE_SASL: "OFF" # ^ almost no memcached distribution package has built in sasl support
ENABLE_HASH_HSIEH: "ON"
ENABLE_DTRACE: "OFF"
OS_VND: Linux #
OS_VER: ubuntu-24.04 #
CC_VND: gnu #
CC_VER: cur
jobs:
# sanitizer
debug-sanitizer:
name: debug sanitizer
runs-on: ubuntu-24.04 #
strategy:
matrix:
sanitizer: ['address;undefined', 'thread']
env:
CMAKE_BUILD_TYPE: "Debug"
BUILD_TESTING: "ON"
VERBOSE: "ON"
ENABLE_SANITIZERS: ${{ matrix.sanitizer }}
permissions:
contents: read
steps:
- uses: actions/checkout@v5
- name: Prepare environment (for cur gnu on ubuntu-24.04)
if: (env.OS_VER=='ubuntu-24.04') && (env.CC_VND=='gnu') && (env.CC_VER=='cur')
run: |
echo CC="gcc-13" >> ${GITHUB_ENV}
echo CXX="g++-13" >> ${GITHUB_ENV}
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update -y
sudo apt-get install -my \
libevent-dev \
libsasl2-dev \
libtbb-dev \
python3-sphinx \
${INSTALL_MEMCACHED} \
${INSTALL_CC} ${INSTALL_CXX}
sudo systemctl stop memcached || true
- name: Build memcached
if: runner.os != 'Windows'
run: |
if test -d memcached
then
cd memcached
./autogen.sh
cp configure{,.old} && sed -e 's/-Werror//g' <configure.old >configure
./configure CFLAGS="-O2 -pipe -fcommon" \
--prefix=${MEMCACHED_PREFIX} \
--enable-sasl \
--enable-sasl-pwdb \
--disable-coverage \
--disable-dependency-tracking \
--disable-docs \
--disable-extstore \
--disable-option-checking \
;
make -j4
make install
cd ..
echo MEMCACHED_BINARY="${MEMCACHED_PREFIX}/bin/memcached" >> ${GITHUB_ENV}
fi
- name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
run: cmake -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -S . -B build
- name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4
- name: Test
if: env.BUILD_TESTING == 'ON'
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target test
- name: Install
if: env.BUILD_TESTING == 'ON'
run: cmake --install build --config ${{ env.CMAKE_BUILD_TYPE }} --prefix /tmp
- name: Failed tests log
if: ${{ env.BUILD_TESTING == 'ON' && failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
- name: Package
env:
PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
if: env.PUSH_ARTIFACTS_ID != '' && env.CMAKE_BUILD_TYPE == 'Release'
run: |
cmake -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -S . -B build
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target package
cmake -DCPACK_COMPONENT_INSTALL=ON build
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target package
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target push-artifacts
# memcached
debug-memcached:
name: debug memcached
runs-on: ubuntu-24.04 #
continue-on-error: true
strategy:
matrix:
memcached:
- 'master'
- '1.6.40'
- '1.6.38' # Debian 13, FreeBSD 14
# - '1.6.37' # Ubuntu 25.04
- '1.6.24' # Ubuntu 24.04
# - '1.6.23' # Enterprise Linux 10
- '1.6.18' # Debian 12
- '1.6.14' # Ubuntu 22.04, Amazon Linux 2023
- '1.6.9' # Debian 11, Enterprise Linux 9
- '1.5.22' # Last 1.5 release
env:
CMAKE_BUILD_TYPE: "Debug"
BUILD_TESTING: "ON"
VERBOSE: "ON"
INSTALL_MEMCACHED: ""
MEMCACHED_PREFIX: "/tmp"
ENABLE_SASL: "ON"
permissions:
contents: read
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v5
with:
repository: memcached/memcached
path: memcached
ref: ${{ matrix.memcached }}
fetch-depth: ${{ matrix.memcached != 'master' }}
- name: Prepare environment (for cur gnu on ubuntu-24.04)
if: (env.OS_VER=='ubuntu-24.04') && (env.CC_VND=='gnu') && (env.CC_VER=='cur')
run: |
echo CC="gcc-13" >> ${GITHUB_ENV}
echo CXX="g++-13" >> ${GITHUB_ENV}
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update -y
sudo apt-get install -my \
libevent-dev \
libsasl2-dev \
libtbb-dev \
python3-sphinx \
${INSTALL_MEMCACHED} \
${INSTALL_CC} ${INSTALL_CXX}
sudo systemctl stop memcached || true
- name: Build memcached
if: runner.os != 'Windows'
run: |
if test -d memcached
then
cd memcached
./autogen.sh
cp configure{,.old} && sed -e 's/-Werror//g' <configure.old >configure
./configure CFLAGS="-O2 -pipe -fcommon" \
--prefix=${MEMCACHED_PREFIX} \
--enable-sasl \
--enable-sasl-pwdb \
--disable-coverage \
--disable-dependency-tracking \
--disable-docs \
--disable-extstore \
--disable-option-checking \
;
make -j4
make install
cd ..
echo MEMCACHED_BINARY="${MEMCACHED_PREFIX}/bin/memcached" >> ${GITHUB_ENV}
fi
- name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
run: cmake -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -S . -B build
- name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4
- name: Test
if: env.BUILD_TESTING == 'ON'
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target test
- name: Install
if: env.BUILD_TESTING == 'ON'
run: cmake --install build --config ${{ env.CMAKE_BUILD_TYPE }} --prefix /tmp
- name: Failed tests log
if: ${{ env.BUILD_TESTING == 'ON' && failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
- name: Package
env:
PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
if: env.PUSH_ARTIFACTS_ID != '' && env.CMAKE_BUILD_TYPE == 'Release'
run: |
cmake -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -S . -B build
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target package
cmake -DCPACK_COMPONENT_INSTALL=ON build
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target package
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target push-artifacts
# mac release builds
mac:
name: release
strategy:
fail-fast: false
matrix:
os_ver: [macos-14, macos-15]
runs-on: ${{ matrix.os_ver }}
env:
CMAKE_BUILD_TYPE: "Release"
BUILD_DOCS_MANGZ: "ON"
OS_VND: macOS #
OS_VER: macos-15 #
CC_VND: clang #
CC_VER: cur
permissions:
contents: read
continue-on-error: true
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install bison flex libevent pkg-config rsync sphinx-doc ${INSTALL_MEMCACHED}
brew services stop memcached || true
echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
- name: Build memcached
if: runner.os != 'Windows'
run: |
if test -d memcached
then
cd memcached
./autogen.sh
cp configure{,.old} && sed -e 's/-Werror//g' <configure.old >configure
./configure CFLAGS="-O2 -pipe -fcommon" \
--prefix=${MEMCACHED_PREFIX} \
--enable-sasl \
--enable-sasl-pwdb \
--disable-coverage \
--disable-dependency-tracking \
--disable-docs \
--disable-extstore \
--disable-option-checking \
;
make -j4
make install
cd ..
echo MEMCACHED_BINARY="${MEMCACHED_PREFIX}/bin/memcached" >> ${GITHUB_ENV}
fi
- name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
run: cmake -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -S . -B build
- name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4
- name: Test
if: env.BUILD_TESTING == 'ON'
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target test
- name: Install
if: env.BUILD_TESTING == 'ON'
run: cmake --install build --config ${{ env.CMAKE_BUILD_TYPE }} --prefix /tmp
- name: Failed tests log
if: ${{ env.BUILD_TESTING == 'ON' && failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
- name: Package
env:
PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
if: env.PUSH_ARTIFACTS_ID != '' && env.CMAKE_BUILD_TYPE == 'Release'
run: |
cmake -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -S . -B build
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target package
cmake -DCPACK_COMPONENT_INSTALL=ON build
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target package
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target push-artifacts
# windows release builds
windows:
name: release
strategy:
fail-fast: false
matrix:
os_ver: [windows-2022, windows-2025]
cc_vnd: [msvc, mingw]
cc_ver: [cur]
runs-on: ${{ matrix.os_ver }}
continue-on-error: true
env:
CMAKE_BUILD_TYPE: "Release"
OS_VND: Windows
OS_VER: ${{ matrix.os_ver }}
CC_VND: ${{ matrix.cc_vnd }}
CC_VER: ${{ matrix.cc_ver }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Prepare environment (Windows)
run: |
echo "c:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "c:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Prepare environment (for cur msvc on windows-2022)
if: (env.OS_VER=='windows-2022') && (env.CC_VND=='msvc') && (env.CC_VER=='cur')
run: |
echo 'CMAKE_GENERATOR=Visual Studio 17 2022' | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Prepare environment (for cur mingw on windows-2022)
if: (env.OS_VER=='windows-2022') && (env.CC_VND=='mingw') && (env.CC_VER=='cur')
run: |
echo 'CMAKE_GENERATOR=MinGW Makefiles' | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Prepare environment (for cur msvc on windows-2025)
if: (env.OS_VER=='windows-2025') && (env.CC_VND=='msvc') && (env.CC_VER=='cur')
run: |
echo 'CMAKE_GENERATOR=Visual Studio 17 2022' | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Prepare environment (for cur mingw on windows-2025)
if: (env.OS_VER=='windows-2025') && (env.CC_VND=='mingw') && (env.CC_VER=='cur')
run: |
echo 'CMAKE_GENERATOR=MinGW Makefiles' | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
with:
release: false
path-type: inherit
install: >-
bison
flex
rsync
openssh
pacboy: >-
nsis:p
- name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
run: cmake -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -S . -B build
- name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4
- name: Test
if: env.BUILD_TESTING == 'ON'
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target test
- name: Install
if: env.BUILD_TESTING == 'ON'
run: cmake --install build --config ${{ env.CMAKE_BUILD_TYPE }} --prefix /tmp
- name: Failed tests log
if: ${{ env.BUILD_TESTING == 'ON' && failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
- name: Package
env:
PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
if: env.PUSH_ARTIFACTS_ID != '' && env.CMAKE_BUILD_TYPE == 'Release'
run: |
cmake -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -S . -B build
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target package
cmake -DCPACK_COMPONENT_INSTALL=ON build
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target package
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target push-artifacts
# linux release builds
release:
strategy:
fail-fast: false
matrix:
os_ver: [ubuntu-22.04, ubuntu-24.04]
cc_vnd: [gnu, clang]
cc_ver: [new, cur, old]
runs-on: ${{ matrix.os_ver }}
continue-on-error: ${{ matrix.cc_vnd == 'clang' }}
env:
CMAKE_BUILD_TYPE: "Release"
BUILD_DOCS_MANGZ: "ON"
OS_VND: Linux
OS_VER: ${{ matrix.os_ver }}
CC_VND: ${{ matrix.cc_vnd }}
CC_VER: ${{ matrix.cc_ver }}
permissions:
contents: read
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Prepare environment (for new gnu on ubuntu-22.04)
if: (env.OS_VER=='ubuntu-22.04') && (env.CC_VND=='gnu') && (env.CC_VER=='new')
run: |
echo CC="gcc-12" >> ${GITHUB_ENV}
echo CXX="g++-12" >> ${GITHUB_ENV}
- name: Prepare environment (for cur gnu on ubuntu-22.04)
if: (env.OS_VER=='ubuntu-22.04') && (env.CC_VND=='gnu') && (env.CC_VER=='cur')
run: |
echo CC="gcc-11" >> ${GITHUB_ENV}
echo CXX="g++-11" >> ${GITHUB_ENV}
- name: Prepare environment (for old gnu on ubuntu-22.04)
if: (env.OS_VER=='ubuntu-22.04') && (env.CC_VND=='gnu') && (env.CC_VER=='old')
run: |
echo CC="gcc-10" >> ${GITHUB_ENV}
echo CXX="g++-10" >> ${GITHUB_ENV}
- name: Prepare environment (for new clang on ubuntu-22.04)
if: (env.OS_VER=='ubuntu-22.04') && (env.CC_VND=='clang') && (env.CC_VER=='new')
run: |
echo CC="clang-15" >> ${GITHUB_ENV}
echo CXX="clang++-15" >> ${GITHUB_ENV}
echo CXXFLAGS="-stdlib=libc++" >> ${GITHUB_ENV}
echo INSTALL_CXX="libc++-15-dev libc++abi-15-dev" >> ${GITHUB_ENV}
- name: Prepare environment (for cur clang on ubuntu-22.04)
if: (env.OS_VER=='ubuntu-22.04') && (env.CC_VND=='clang') && (env.CC_VER=='cur')
run: |
echo CC="clang-14" >> ${GITHUB_ENV}
echo CXX="clang++-14" >> ${GITHUB_ENV}
echo CXXFLAGS="-stdlib=libc++" >> ${GITHUB_ENV}
echo INSTALL_CXX="libc++-14-dev libc++abi-14-dev" >> ${GITHUB_ENV}
- name: Prepare environment (for old clang on ubuntu-22.04)
if: (env.OS_VER=='ubuntu-22.04') && (env.CC_VND=='clang') && (env.CC_VER=='old')
run: |
echo CC="clang-13" >> ${GITHUB_ENV}
echo CXX="clang++-13" >> ${GITHUB_ENV}
echo CXXFLAGS="-stdlib=libc++" >> ${GITHUB_ENV}
echo INSTALL_CXX="libc++-13-dev libc++abi-13-dev" >> ${GITHUB_ENV}
- name: Prepare environment (for new gnu on ubuntu-24.04)
if: (env.OS_VER=='ubuntu-24.04') && (env.CC_VND=='gnu') && (env.CC_VER=='new')
run: |
echo CC="gcc-14" >> ${GITHUB_ENV}
echo CXX="g++-14" >> ${GITHUB_ENV}
- name: Prepare environment (for cur gnu on ubuntu-24.04)
if: (env.OS_VER=='ubuntu-24.04') && (env.CC_VND=='gnu') && (env.CC_VER=='cur')
run: |
echo CC="gcc-13" >> ${GITHUB_ENV}
echo CXX="g++-13" >> ${GITHUB_ENV}
- name: Prepare environment (for new clang on ubuntu-24.04)
if: (env.OS_VER=='ubuntu-24.04') && (env.CC_VND=='clang') && (env.CC_VER=='new')
run: |
echo CC="clang-18" >> ${GITHUB_ENV}
echo CXX="clang++-18" >> ${GITHUB_ENV}
echo CXXFLAGS="-stdlib=libc++" >> ${GITHUB_ENV}
echo INSTALL_CXX="libc++-18-dev libc++abi-18-dev" >> ${GITHUB_ENV}
- name: Prepare environment (for cur clang on ubuntu-24.04)
if: (env.OS_VER=='ubuntu-24.04') && (env.CC_VND=='clang') && (env.CC_VER=='cur')
run: |
echo CC="clang-17" >> ${GITHUB_ENV}
echo CXX="clang++-17" >> ${GITHUB_ENV}
echo CXXFLAGS="-stdlib=libc++" >> ${GITHUB_ENV}
echo INSTALL_CXX="libc++-17-dev libc++abi-17-dev" >> ${GITHUB_ENV}
- name: Prepare environment (for old clang on ubuntu-24.04)
if: (env.OS_VER=='ubuntu-24.04') && (env.CC_VND=='clang') && (env.CC_VER=='old')
run: |
echo CC="clang-16" >> ${GITHUB_ENV}
echo CXX="clang++-16" >> ${GITHUB_ENV}
echo CXXFLAGS="-stdlib=libc++" >> ${GITHUB_ENV}
echo INSTALL_CXX="libc++-16-dev libc++abi-16-dev" >> ${GITHUB_ENV}
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update -y
sudo apt-get install -my \
libevent-dev \
libsasl2-dev \
libtbb-dev \
python3-sphinx \
${INSTALL_MEMCACHED} \
${INSTALL_CC} ${INSTALL_CXX}
sudo systemctl stop memcached || true
- name: Build memcached
if: runner.os != 'Windows'
run: |
if test -d memcached
then
cd memcached
./autogen.sh
cp configure{,.old} && sed -e 's/-Werror//g' <configure.old >configure
./configure CFLAGS="-O2 -pipe -fcommon" \
--prefix=${MEMCACHED_PREFIX} \
--enable-sasl \
--enable-sasl-pwdb \
--disable-coverage \
--disable-dependency-tracking \
--disable-docs \
--disable-extstore \
--disable-option-checking \
;
make -j4
make install
cd ..
echo MEMCACHED_BINARY="${MEMCACHED_PREFIX}/bin/memcached" >> ${GITHUB_ENV}
fi
- name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
run: cmake -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -S . -B build
- name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4
- name: Test
if: env.BUILD_TESTING == 'ON'
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target test
- name: Install
if: env.BUILD_TESTING == 'ON'
run: cmake --install build --config ${{ env.CMAKE_BUILD_TYPE }} --prefix /tmp
- name: Failed tests log
if: ${{ env.BUILD_TESTING == 'ON' && failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
- name: Package
env:
PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
if: env.PUSH_ARTIFACTS_ID != '' && env.CMAKE_BUILD_TYPE == 'Release'
run: |
cmake -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -S . -B build
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target package
cmake -DCPACK_COMPONENT_INSTALL=ON build
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target package
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target push-artifacts