Skip to content

Commit 1804668

Browse files
committed
Move cmake integration and performance check into ci workflow
1 parent 1429cfc commit 1804668

File tree

3 files changed

+296
-323
lines changed

3 files changed

+296
-323
lines changed

.github/workflows/ci.yml

Lines changed: 296 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,302 @@ jobs:
202202
python3 ci/build-in-all-remaining-configs.py --${{matrix.compiler}}
203203
204204
205+
performancetest-linux:
206+
runs-on: ubuntu-22.04
207+
strategy:
208+
fail-fast: false
209+
matrix:
210+
compiler: [g++-11, clang++-14]
211+
config: [
212+
-DSPEEDTEST_DWARF4=On,
213+
-DSPEEDTEST_DWARF5=On
214+
]
215+
needs: test-linux-all-configurations
216+
steps:
217+
- uses: actions/checkout@v4
218+
- name: dependencies
219+
run: sudo apt install gcc-11 g++-11 libgcc-11-dev
220+
- name: build
221+
run: |
222+
mkdir -p build
223+
cd build
224+
cmake .. -DCMAKE_CXX_COMPILER=${{matrix.compiler}} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=foo
225+
make -j
226+
make install
227+
mkdir -p ../test/speedtest/build
228+
cd ../test/speedtest/build
229+
cmake .. \
230+
-DCMAKE_BUILD_TYPE=Debug \
231+
${{matrix.config}}
232+
make -j
233+
- name: speedtest
234+
working-directory: test/speedtest/build
235+
run: |
236+
./speedtest | python3 ../../../ci/speedtest.py ${{matrix.compiler}} ${{matrix.config}}
237+
238+
239+
test-linux-fetchcontent:
240+
runs-on: ubuntu-22.04
241+
strategy:
242+
fail-fast: false
243+
matrix:
244+
shared: [On, Off]
245+
needs: test-linux-all-configurations
246+
steps:
247+
- uses: actions/checkout@v4
248+
- name: test
249+
run: |
250+
tag=$(git rev-parse --abbrev-ref HEAD)
251+
echo $tag
252+
cd ..
253+
cp -rv cpptrace/test/fetchcontent-integration .
254+
mkdir fetchcontent-integration/build
255+
cd fetchcontent-integration/build
256+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG=$tag -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
257+
make
258+
./main
259+
test-linux-findpackage:
260+
runs-on: ubuntu-22.04
261+
strategy:
262+
fail-fast: false
263+
matrix:
264+
shared: [On, Off]
265+
needs: test-linux-all-configurations
266+
steps:
267+
- uses: actions/checkout@v4
268+
- name: test
269+
run: |
270+
tag=$(git rev-parse --abbrev-ref HEAD)
271+
mkdir build
272+
cd build
273+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
274+
sudo make -j install
275+
cd ../..
276+
cp -rv cpptrace/test/findpackage-integration .
277+
mkdir findpackage-integration/build
278+
cd findpackage-integration/build
279+
cmake .. -DCMAKE_BUILD_TYPE=Debug
280+
make
281+
./main
282+
test-linux-add_subdirectory:
283+
runs-on: ubuntu-22.04
284+
strategy:
285+
fail-fast: false
286+
matrix:
287+
shared: [On, Off]
288+
needs: test-linux-all-configurations
289+
steps:
290+
- uses: actions/checkout@v4
291+
- name: build
292+
run: |
293+
cd ..
294+
cp -rv cpptrace/test/add_subdirectory-integration .
295+
cp -rv cpptrace add_subdirectory-integration
296+
mkdir add_subdirectory-integration/build
297+
cd add_subdirectory-integration/build
298+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
299+
make
300+
./main
301+
302+
test-macos-fetchcontent:
303+
runs-on: macos-14
304+
strategy:
305+
fail-fast: false
306+
matrix:
307+
shared: [On, Off]
308+
needs: test-macos-all-configurations
309+
steps:
310+
- uses: actions/checkout@v4
311+
- name: test
312+
run: |
313+
tag=$(git rev-parse --abbrev-ref HEAD)
314+
echo $tag
315+
cd ..
316+
cp -rv cpptrace/test/fetchcontent-integration .
317+
mkdir fetchcontent-integration/build
318+
cd fetchcontent-integration/build
319+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG=$tag -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
320+
make
321+
./main
322+
test-macos-findpackage:
323+
runs-on: macos-14
324+
strategy:
325+
fail-fast: false
326+
matrix:
327+
shared: [On, Off]
328+
needs: test-macos-all-configurations
329+
steps:
330+
- uses: actions/checkout@v4
331+
- name: test
332+
run: |
333+
tag=$(git rev-parse --abbrev-ref HEAD)
334+
echo $tag
335+
mkdir build
336+
cd build
337+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
338+
sudo make -j install
339+
cd ../..
340+
cp -rv cpptrace/test/findpackage-integration .
341+
mkdir findpackage-integration/build
342+
cd findpackage-integration/build
343+
cmake .. -DCMAKE_BUILD_TYPE=Debug
344+
make
345+
./main
346+
test-macos-add_subdirectory:
347+
runs-on: macos-14
348+
strategy:
349+
fail-fast: false
350+
matrix:
351+
shared: [On, Off]
352+
needs: test-macos-all-configurations
353+
steps:
354+
- uses: actions/checkout@v4
355+
- name: test
356+
run: |
357+
cd ..
358+
cp -rv cpptrace/test/add_subdirectory-integration .
359+
cp -rv cpptrace add_subdirectory-integration
360+
mkdir add_subdirectory-integration/build
361+
cd add_subdirectory-integration/build
362+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
363+
make
364+
./main
365+
366+
test-mingw-fetchcontent:
367+
runs-on: windows-2022
368+
strategy:
369+
fail-fast: false
370+
matrix:
371+
shared: [On, Off]
372+
needs: test-windows-all-configurations
373+
steps:
374+
- uses: actions/checkout@v4
375+
- name: test
376+
run: |
377+
$tag=$(git rev-parse --abbrev-ref HEAD)
378+
echo $tag
379+
cd ..
380+
cp -Recurse cpptrace/test/fetchcontent-integration .
381+
mkdir fetchcontent-integration/build
382+
cd fetchcontent-integration/build
383+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG="$tag" "-GUnix Makefiles" -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
384+
make
385+
.\main.exe
386+
test-mingw-findpackage:
387+
runs-on: windows-2022
388+
strategy:
389+
fail-fast: false
390+
matrix:
391+
shared: [On, Off]
392+
needs: test-windows-all-configurations
393+
steps:
394+
- uses: actions/checkout@v4
395+
- name: test
396+
run: |
397+
$tag=$(git rev-parse --abbrev-ref HEAD)
398+
echo $tag
399+
mkdir build
400+
cd build
401+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} "-GUnix Makefiles" -DCMAKE_INSTALL_PREFIX=C:/foo -DCPPTRACE_WERROR_BUILD=On
402+
make -j install
403+
cd ../..
404+
mv cpptrace/test/findpackage-integration .
405+
mkdir findpackage-integration/build
406+
cd findpackage-integration/build
407+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=C:/foo "-GUnix Makefiles"
408+
make
409+
./main
410+
test-mingw-add_subdirectory:
411+
runs-on: windows-2022
412+
strategy:
413+
fail-fast: false
414+
matrix:
415+
shared: [On, Off]
416+
needs: test-windows-all-configurations
417+
steps:
418+
- uses: actions/checkout@v4
419+
- name: test
420+
run: |
421+
cd ..
422+
cp -Recurse cpptrace/test/add_subdirectory-integration .
423+
cp -Recurse cpptrace add_subdirectory-integration
424+
mkdir add_subdirectory-integration/build
425+
cd add_subdirectory-integration/build
426+
cmake .. -DCMAKE_BUILD_TYPE=Debug "-GUnix Makefiles" -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
427+
make
428+
.\main.exe
429+
test-windows-fetchcontent:
430+
runs-on: windows-2022
431+
strategy:
432+
fail-fast: false
433+
matrix:
434+
shared: [On, Off]
435+
needs: test-windows-all-configurations
436+
steps:
437+
- uses: actions/checkout@v4
438+
- name: Enable Developer Command Prompt
439+
uses: ilammy/msvc-dev-cmd@v1.13.0
440+
- name: test
441+
run: |
442+
$tag=$(git rev-parse --abbrev-ref HEAD)
443+
echo $tag
444+
cd ..
445+
cp -Recurse cpptrace/test/fetchcontent-integration .
446+
mkdir fetchcontent-integration/build
447+
cd fetchcontent-integration/build
448+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG="$tag" -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
449+
msbuild demo_project.sln
450+
.\Debug\main.exe
451+
test-windows-findpackage:
452+
runs-on: windows-2022
453+
strategy:
454+
fail-fast: false
455+
matrix:
456+
shared: [On, Off]
457+
needs: test-windows-all-configurations
458+
steps:
459+
- uses: actions/checkout@v4
460+
- name: Enable Developer Command Prompt
461+
uses: ilammy/msvc-dev-cmd@v1.13.0
462+
- name: test
463+
run: |
464+
$tag=$(git rev-parse --abbrev-ref HEAD)
465+
echo $tag
466+
mkdir build
467+
cd build
468+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCMAKE_INSTALL_PREFIX=C:/foo -DCPPTRACE_WERROR_BUILD=On
469+
msbuild cpptrace.sln
470+
msbuild INSTALL.vcxproj
471+
cd ../..
472+
mv cpptrace/test/findpackage-integration .
473+
mkdir findpackage-integration/build
474+
cd findpackage-integration/build
475+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=C:/foo
476+
msbuild demo_project.sln
477+
.\Debug\main.exe
478+
test-windows-add_subdirectory:
479+
runs-on: windows-2022
480+
strategy:
481+
fail-fast: false
482+
matrix:
483+
shared: [On, Off]
484+
needs: test-windows-all-configurations
485+
steps:
486+
- uses: actions/checkout@v4
487+
- name: Enable Developer Command Prompt
488+
uses: ilammy/msvc-dev-cmd@v1.13.0
489+
- name: test
490+
run: |
491+
cd ..
492+
cp -Recurse cpptrace/test/add_subdirectory-integration .
493+
cp -Recurse cpptrace add_subdirectory-integration
494+
mkdir add_subdirectory-integration/build
495+
cd add_subdirectory-integration/build
496+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
497+
msbuild demo_project.sln
498+
.\Debug\main.exe
499+
500+
205501
unittest-linux:
206502
runs-on: ubuntu-24.04
207503
strategy:

0 commit comments

Comments
 (0)