Debian Codegraph @

.github/workflows/ci.yml

raw
1 name: ci
2
3 on:
4 push:
5 pull_request:
6
7 jobs:
8 test-linux:
9 runs-on: ubuntu-22.04
10 strategy:
11 fail-fast: false
12 matrix:
13 compiler: [gcc, clang]
14 shared: [--shared, ""]
15 steps:
16 - uses: actions/checkout@v4
17 - name: dependencies
18 run: |
19 sudo apt install gcc-10 g++-10 libgcc-10-dev libunwind8-dev ninja-build
20 pip3 install colorama
21 - name: libdwarf
22 run: |
23 cd ..
24 cpptrace/ci/setup-prerequisites.sh
25 - name: build and test
26 run: |
27 python3 ci/test-all-configs.py --${{matrix.compiler}} --default-config
28 test-linux-arm:
29 runs-on: ubuntu-22.04-arm
30 strategy:
31 fail-fast: false
32 matrix:
33 compiler: [gcc, clang]
34 shared: [--shared, ""]
35 steps:
36 - uses: actions/checkout@v4
37 - name: dependencies
38 run: |
39 sudo apt install gcc-10 g++-10 libgcc-10-dev libunwind8-dev ninja-build
40 pip3 install colorama
41 - name: libdwarf
42 run: |
43 cd ..
44 cpptrace/ci/setup-prerequisites.sh
45 - name: build and test
46 run: |
47 python3 ci/test-all-configs.py --${{matrix.compiler}} --default-config
48 test-macos:
49 runs-on: macos-14
50 strategy:
51 fail-fast: false
52 matrix:
53 compiler: [gcc, clang]
54 shared: [--shared, ""]
55 steps:
56 - uses: actions/checkout@v4
57 - name: libdwarf
58 run: |
59 cd ..
60 cpptrace/ci/setup-prerequisites.sh
61 - name: dependencies
62 run: |
63 python3 -m venv env
64 env/bin/pip install colorama
65 - name: build and test
66 run: |
67 env/bin/python ci/test-all-configs.py --${{matrix.compiler}} --default-config
68 test-windows:
69 runs-on: windows-2022
70 strategy:
71 fail-fast: false
72 matrix:
73 compiler: [msvc, clang, gcc]
74 shared: [--shared, ""]
75 steps:
76 - uses: actions/checkout@v4
77 - name: Enable Developer Command Prompt
78 uses: ilammy/[email protected]
79 - name: dependencies
80 run: |
81 pip3 install colorama
82 - name: libdwarf
83 run: |
84 if("${{matrix.compiler}}" -eq "gcc") {
85 cd ..
86 cpptrace/ci/setup-prerequisites-mingw.ps1
87 }
88 - name: build and test
89 run: |
90 python3 ci/test-all-configs.py --${{matrix.compiler}} --default-config
91 test-windows-old:
92 runs-on: windows-2022
93 strategy:
94 fail-fast: false
95 matrix:
96 compiler: [msvc]
97 shared: [--shared, ""]
98 steps:
99 - uses: actions/checkout@v4
100 - name: Enable Developer Command Prompt
101 uses: ilammy/[email protected]
102 with:
103 toolset: 14.29 # vc 2019
104 - name: dependencies
105 run: |
106 pip3 install colorama
107 - name: libdwarf
108 run: |
109 if("${{matrix.compiler}}" -eq "gcc") {
110 cd ..
111 cpptrace/ci/setup-prerequisites-mingw.ps1
112 }
113 - name: build and test
114 run: |
115 python3 ci/test-all-configs.py --${{matrix.compiler}} --default-config
116 test-linux-all-configurations:
117 runs-on: ubuntu-22.04
118 strategy:
119 fail-fast: false
120 matrix:
121 compiler: [gcc, clang]
122 shared: [--shared, ""]
123 needs: test-linux
124 steps:
125 - uses: actions/checkout@v4
126 - name: dependencies
127 run: |
128 sudo apt install gcc-10 g++-10 libgcc-10-dev libunwind8-dev ninja-build
129 pip3 install colorama
130 - name: libdwarf
131 run: |
132 cd ..
133 cpptrace/ci/setup-prerequisites.sh
134 - name: build and test
135 run: |
136 python3 ci/test-all-configs.py --${{matrix.compiler}}
137 test-macos-all-configurations:
138 runs-on: macos-14
139 strategy:
140 fail-fast: false
141 matrix:
142 compiler: [gcc, clang]
143 shared: [--shared, ""]
144 needs: test-macos
145 steps:
146 - uses: actions/checkout@v4
147 - name: libdwarf
148 run: |
149 cd ..
150 cpptrace/ci/setup-prerequisites.sh
151 - name: dependencies
152 run: |
153 python3 -m venv env
154 env/bin/pip install colorama
155 - name: build and test
156 run: |
157 env/bin/python ci/test-all-configs.py --${{matrix.compiler}}
158 test-windows-all-configurations:
159 runs-on: windows-2022
160 strategy:
161 fail-fast: false
162 matrix:
163 compiler: [msvc, clang, gcc]
164 shared: [--shared, ""]
165 needs: test-windows
166 steps:
167 - uses: actions/checkout@v4
168 - name: Enable Developer Command Prompt
169 uses: ilammy/[email protected]
170 - name: dependencies
171 run: |
172 pip3 install colorama
173 - name: libdwarf
174 run: |
175 if("${{matrix.compiler}}" -eq "gcc") {
176 cd ..
177 cpptrace/ci/setup-prerequisites-mingw.ps1
178 }
179 - name: build and test
180 run: |
181 python3 ci/test-all-configs.py --${{matrix.compiler}}
182
183
184 build-linux-all-remaining-configurations:
185 runs-on: ubuntu-22.04
186 strategy:
187 fail-fast: false
188 matrix:
189 compiler: [gcc, clang]
190 needs: test-linux-all-configurations
191 steps:
192 - uses: actions/checkout@v4
193 - name: dependencies
194 run: |
195 sudo apt install gcc-10 g++-10 libgcc-10-dev libunwind8-dev ninja-build
196 pip3 install colorama
197 - name: libdwarf
198 run: |
199 cd ..
200 cpptrace/ci/setup-prerequisites.sh
201 - name: build
202 run: |
203 python3 ci/build-in-all-remaining-configs.py --${{matrix.compiler}}
204 build-macos-all-remaining-configurations:
205 runs-on: macos-14
206 strategy:
207 fail-fast: false
208 matrix:
209 compiler: [gcc, clang]
210 needs: test-macos-all-configurations
211 steps:
212 - uses: actions/checkout@v4
213 - name: dependencies
214 run: |
215 brew install ninja
216 python3 -m venv env
217 env/bin/pip install colorama
218 - name: libdwarf
219 run: |
220 cd ..
221 cpptrace/ci/setup-prerequisites.sh
222 - name: build
223 run: |
224 env/bin/python ci/build-in-all-remaining-configs.py --${{matrix.compiler}}
225 build-windows-all-remaining-configurations:
226 runs-on: windows-2022
227 strategy:
228 fail-fast: false
229 matrix:
230 compiler: [msvc, clang, gcc]
231 needs: test-windows-all-configurations
232 steps:
233 - uses: actions/checkout@v4
234 - name: Enable Developer Command Prompt
235 uses: ilammy/[email protected]
236 - name: dependencies
237 run: |
238 pip3 install colorama
239 - name: libdwarf
240 run: |
241 if("${{matrix.compiler}}" -eq "gcc") {
242 cd ..
243 cpptrace/ci/setup-prerequisites-mingw.ps1
244 }
245 - name: build
246 run: |
247 python3 ci/build-in-all-remaining-configs.py --${{matrix.compiler}}
248
249
250 performancetest-linux:
251 runs-on: ubuntu-22.04
252 strategy:
253 fail-fast: false
254 matrix:
255 compiler: [g++-11, clang++-14]
256 config: [
257 -DSPEEDTEST_DWARF4=On,
258 -DSPEEDTEST_DWARF5=On
259 ]
260 needs: test-linux-all-configurations
261 steps:
262 - uses: actions/checkout@v4
263 - name: dependencies
264 run: sudo apt install gcc-11 g++-11 libgcc-11-dev ninja-build
265 - name: build
266 run: |
267 mkdir -p build
268 cd build
269 cmake .. -GNinja -DCMAKE_CXX_COMPILER=${{matrix.compiler}} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=foo
270 ninja
271 ninja install
272 mkdir -p ../test/speedtest/build
273 cd ../test/speedtest/build
274 cmake .. \
275 -GNinja \
276 -DCMAKE_BUILD_TYPE=Debug \
277 ${{matrix.config}}
278 ninja
279 - name: speedtest
280 working-directory: test/speedtest/build
281 run: |
282 ./speedtest | python3 ../../../ci/speedtest.py ${{matrix.compiler}} ${{matrix.config}}
283
284
285 test-linux-fetchcontent:
286 runs-on: ubuntu-22.04
287 strategy:
288 fail-fast: false
289 matrix:
290 shared: [On, Off]
291 needs: test-linux-all-configurations
292 steps:
293 - uses: actions/checkout@v4
294 - name: test
295 run: |
296 tag=$(git rev-parse --abbrev-ref HEAD)
297 echo $tag
298 cd ..
299 cp -rv cpptrace/test/fetchcontent-integration .
300 mkdir fetchcontent-integration/build
301 cd fetchcontent-integration/build
302 cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG=$tag -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
303 ninja
304 ./main
305 test-linux-findpackage:
306 runs-on: ubuntu-22.04
307 strategy:
308 fail-fast: false
309 matrix:
310 shared: [On, Off]
311 needs: test-linux-all-configurations
312 steps:
313 - uses: actions/checkout@v4
314 - name: test
315 run: |
316 tag=$(git rev-parse --abbrev-ref HEAD)
317 mkdir build
318 cd build
319 cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
320 sudo ninja install
321 cd ../..
322 cp -rv cpptrace/test/findpackage-integration .
323 mkdir findpackage-integration/build
324 cd findpackage-integration/build
325 cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug
326 ninja
327 ./main
328 test-linux-add_subdirectory:
329 runs-on: ubuntu-22.04
330 strategy:
331 fail-fast: false
332 matrix:
333 shared: [On, Off]
334 needs: test-linux-all-configurations
335 steps:
336 - uses: actions/checkout@v4
337 - name: build
338 run: |
339 cd ..
340 cp -rv cpptrace/test/add_subdirectory-integration .
341 cp -rv cpptrace add_subdirectory-integration
342 mkdir add_subdirectory-integration/build
343 cd add_subdirectory-integration/build
344 cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
345 ninja
346 ./main
347
348 test-macos-fetchcontent:
349 runs-on: macos-14
350 strategy:
351 fail-fast: false
352 matrix:
353 shared: [On, Off]
354 needs: test-macos-all-configurations
355 steps:
356 - uses: actions/checkout@v4
357 - name: test
358 run: |
359 tag=$(git rev-parse --abbrev-ref HEAD)
360 echo $tag
361 cd ..
362 cp -rv cpptrace/test/fetchcontent-integration .
363 mkdir fetchcontent-integration/build
364 cd fetchcontent-integration/build
365 cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG=$tag -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
366 ninja
367 ./main
368 test-macos-findpackage:
369 runs-on: macos-14
370 strategy:
371 fail-fast: false
372 matrix:
373 shared: [On, Off]
374 needs: test-macos-all-configurations
375 steps:
376 - uses: actions/checkout@v4
377 - name: test
378 run: |
379 tag=$(git rev-parse --abbrev-ref HEAD)
380 echo $tag
381 mkdir build
382 cd build
383 cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
384 sudo ninja install
385 cd ../..
386 cp -rv cpptrace/test/findpackage-integration .
387 mkdir findpackage-integration/build
388 cd findpackage-integration/build
389 cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug
390 ninja
391 ./main
392 test-macos-add_subdirectory:
393 runs-on: macos-14
394 strategy:
395 fail-fast: false
396 matrix:
397 shared: [On, Off]
398 needs: test-macos-all-configurations
399 steps:
400 - uses: actions/checkout@v4
401 - name: test
402 run: |
403 cd ..
404 cp -rv cpptrace/test/add_subdirectory-integration .
405 cp -rv cpptrace add_subdirectory-integration
406 mkdir add_subdirectory-integration/build
407 cd add_subdirectory-integration/build
408 cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
409 ninja
410 ./main
411
412 test-mingw-fetchcontent:
413 runs-on: windows-2022
414 strategy:
415 fail-fast: false
416 matrix:
417 shared: [On, Off]
418 needs: test-windows-all-configurations
419 steps:
420 - uses: actions/checkout@v4
421 - name: test
422 run: |
423 $tag=$(git rev-parse --abbrev-ref HEAD)
424 echo $tag
425 cd ..
426 cp -Recurse cpptrace/test/fetchcontent-integration .
427 mkdir fetchcontent-integration/build
428 cd fetchcontent-integration/build
429 cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG="$tag" -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
430 ninja
431 .\main.exe
432 test-mingw-findpackage:
433 runs-on: windows-2022
434 strategy:
435 fail-fast: false
436 matrix:
437 shared: [On, Off]
438 needs: test-windows-all-configurations
439 steps:
440 - uses: actions/checkout@v4
441 - name: test
442 run: |
443 $tag=$(git rev-parse --abbrev-ref HEAD)
444 echo $tag
445 mkdir build
446 cd build
447 cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCMAKE_INSTALL_PREFIX=C:/foo -DCPPTRACE_WERROR_BUILD=On
448 ninja install
449 cd ../..
450 mv cpptrace/test/findpackage-integration .
451 mkdir findpackage-integration/build
452 cd findpackage-integration/build
453 cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=C:/foo
454 ninja
455 ./main
456 test-mingw-add_subdirectory:
457 runs-on: windows-2022
458 strategy:
459 fail-fast: false
460 matrix:
461 shared: [On, Off]
462 needs: test-windows-all-configurations
463 steps:
464 - uses: actions/checkout@v4
465 - name: test
466 run: |
467 cd ..
468 cp -Recurse cpptrace/test/add_subdirectory-integration .
469 cp -Recurse cpptrace add_subdirectory-integration
470 mkdir add_subdirectory-integration/build
471 cd add_subdirectory-integration/build
472 cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
473 ninja
474 .\main.exe
475 test-windows-fetchcontent:
476 runs-on: windows-2022
477 strategy:
478 fail-fast: false
479 matrix:
480 shared: [On, Off]
481 needs: test-windows-all-configurations
482 steps:
483 - uses: actions/checkout@v4
484 - name: Enable Developer Command Prompt
485 uses: ilammy/[email protected]
486 - name: test
487 run: |
488 $tag=$(git rev-parse --abbrev-ref HEAD)
489 echo $tag
490 cd ..
491 cp -Recurse cpptrace/test/fetchcontent-integration .
492 mkdir fetchcontent-integration/build
493 cd fetchcontent-integration/build
494 cmake .. -DCMAKE_BUILD_TYPE=Debug -DCPPTRACE_TAG="$tag" -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
495 msbuild demo_project.sln
496 .\Debug\main.exe
497 test-windows-findpackage:
498 runs-on: windows-2022
499 strategy:
500 fail-fast: false
501 matrix:
502 shared: [On, Off]
503 needs: test-windows-all-configurations
504 steps:
505 - uses: actions/checkout@v4
506 - name: Enable Developer Command Prompt
507 uses: ilammy/[email protected]
508 - name: test
509 run: |
510 $tag=$(git rev-parse --abbrev-ref HEAD)
511 echo $tag
512 mkdir build
513 cd build
514 cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCMAKE_INSTALL_PREFIX=C:/foo -DCPPTRACE_WERROR_BUILD=On
515 msbuild cpptrace.sln
516 msbuild INSTALL.vcxproj
517 cd ../..
518 mv cpptrace/test/findpackage-integration .
519 mkdir findpackage-integration/build
520 cd findpackage-integration/build
521 cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=C:/foo
522 msbuild demo_project.sln
523 .\Debug\main.exe
524 test-windows-add_subdirectory:
525 runs-on: windows-2022
526 strategy:
527 fail-fast: false
528 matrix:
529 shared: [On, Off]
530 needs: test-windows-all-configurations
531 steps:
532 - uses: actions/checkout@v4
533 - name: Enable Developer Command Prompt
534 uses: ilammy/[email protected]
535 - name: test
536 run: |
537 cd ..
538 cp -Recurse cpptrace/test/add_subdirectory-integration .
539 cp -Recurse cpptrace add_subdirectory-integration
540 mkdir add_subdirectory-integration/build
541 cd add_subdirectory-integration/build
542 cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCPPTRACE_WERROR_BUILD=On
543 msbuild demo_project.sln
544 .\Debug\main.exe
545
546
547 unittest-linux:
548 runs-on: ubuntu-24.04
549 strategy:
550 fail-fast: false
551 matrix:
552 compiler: [g++-10, clang++-18]
553 stdlib: [libstdc++, libc++]
554 dwarf_version: [4, 5]
555 split_dwarf: [OFF, ON]
556 exclude:
557 - compiler: g++-10
558 stdlib: libc++
559 steps:
560 - uses: actions/checkout@v4
561 - name: dependencies
562 run: |
563 sudo apt install gcc-10 g++-10 libgcc-10-dev ninja-build libc++-dev ninja-build
564 cd ..
565 cpptrace/ci/setup-prerequisites-unittest.sh
566 - name: build and test
567 run: |
568 python3 ci/unittest.py \
569 --slice=compiler:${{matrix.compiler}} \
570 --slice=stdlib:${{matrix.stdlib}} \
571 --slice=dwarf_version:${{matrix.dwarf_version}} \
572 --slice=split_dwarf:${{matrix.split_dwarf}}
573 unittest-linux-bazel:
574 runs-on: ubuntu-22.04
575 steps:
576 - uses: actions/checkout@v4
577 - name: dependencies
578 run: |
579 sudo apt install -y libtool libncurses5
580 - name: test dbg
581 run: |
582 bazel test //... -c dbg
583 - name: test opt
584 run: |
585 bazel test //... -c opt
586 unittest-linux-arm:
587 runs-on: ubuntu-24.04-arm
588 strategy:
589 fail-fast: false
590 matrix:
591 compiler: [g++-10, clang++-18]
592 stdlib: [libstdc++, libc++]
593 dwarf_version: [4, 5]
594 split_dwarf: [OFF, ON]
595 exclude:
596 - compiler: g++-10
597 stdlib: libc++
598 steps:
599 - uses: actions/checkout@v4
600 - name: dependencies
601 run: |
602 sudo apt install gcc-10 g++-10 libgcc-10-dev ninja-build libc++-dev ninja-build
603 cd ..
604 cpptrace/ci/setup-prerequisites-unittest.sh
605 - name: build and test
606 run: |
607 python3 ci/unittest.py \
608 --slice=compiler:${{matrix.compiler}} \
609 --slice=stdlib:${{matrix.stdlib}} \
610 --slice=dwarf_version:${{matrix.dwarf_version}} \
611 --slice=split_dwarf:${{matrix.split_dwarf}}
612 unittest-macos:
613 runs-on: macos-14
614 steps:
615 - uses: actions/checkout@v4
616 - uses: maxim-lobanov/setup-xcode@v1
617 with:
618 xcode-version: "15.4"
619 - name: dependencies
620 run: |
621 brew install ninja
622 python3 -m venv env
623 env/bin/pip install colorama
624 cd ..
625 cpptrace/ci/setup-prerequisites-unittest-macos.sh
626 - name: build and test
627 run: |
628 env/bin/python ci/unittest.py
629 unittest-windows:
630 runs-on: windows-2022
631 strategy:
632 fail-fast: false
633 matrix:
634 compiler: [cl, clang++]
635 shared: [OFF] # TODO: Re-enable shared
636 build_type: [Debug, RelWithDebInfo]
637 steps:
638 - uses: actions/checkout@v4
639 - name: Enable Developer Command Prompt
640 uses: ilammy/[email protected]
641 - name: build and test
642 run: |
643 mkdir build
644 cd build
645 cmake .. `
646 -DCMAKE_CXX_COMPILER=${{matrix.compiler}} `
647 -DCMAKE_C_COMPILER=${{matrix.compiler == 'clang++' && 'clang' || matrix.compiler}} `
648 -DBUILD_SHARED_LIBS=${{matrix.shared}} `
649 -DCPPTRACE_WERROR_BUILD=On `
650 -DCPPTRACE_BUILD_TESTING=On
651 cmake --build . --config ${{matrix.build_type}}
652 ./${{matrix.build_type}}/unittest
653 # TODO: Macos, mingw
654
655 unittest-linux-modules:
656 runs-on: ubuntu-24.04
657 needs: unittest-linux
658 strategy:
659 fail-fast: false
660 steps:
661 - uses: actions/checkout@v4
662 - name: dependencies
663 run: |
664 sudo apt install ninja-build clang-19 clang-tools-19
665 - name: build and test
666 run: |
667 mkdir build
668 cd build
669 cmake .. \
670 -GNinja \
671 -DCMAKE_BUILD_TYPE=Debug \
672 -DCMAKE_CXX_COMPILER=clang++-19 \
673 -DCMAKE_C_COMPILER=clang-19 \
674 -DCMAKE_CXX_STANDARD=20 \
675 -DCPPTRACE_WERROR_BUILD=On \
676 -DCPPTRACE_STD_FORMAT=Off \
677 -DCPPTRACE_BUILD_TESTING=On
678 ninja
679 ./unittest_module
680
681 unittest-linux-32-bit:
682 runs-on: ubuntu-24.04
683 needs: unittest-linux
684 strategy:
685 fail-fast: false
686 matrix:
687 compiler: [g++-10, clang++-18]
688 steps:
689 - uses: actions/checkout@v4
690 - name: dependencies
691 run: |
692 sudo apt update
693 sudo apt install gcc-10 g++-10 libgcc-10-dev clang-19 clang-tools-19 ninja-build gcc-multilib g++-multilib g++-10-multilib
694 - name: build and test
695 run: |
696 mkdir build
697 cd build
698 cmake .. \
699 -GNinja \
700 -DCMAKE_BUILD_TYPE=Debug \
701 -DCMAKE_CXX_COMPILER=${{matrix.compiler}} \
702 -DCMAKE_C_COMPILER=${{matrix.compiler == 'clang++-18' && 'clang' || 'gcc'}} \
703 -DCPPTRACE_WERROR_BUILD=On \
704 -DCPPTRACE_STD_FORMAT=Off \
705 -DCPPTRACE_BUILD_TESTING=On \
706 -DCMAKE_C_FLAGS=-m32 \
707 -DCMAKE_CXX_FLAGS=-m32
708 ninja
709 ./unittest
710
711 unittest-linux-gcc-4-8-5:
712 runs-on: ubuntu-24.04
713 needs: unittest-linux
714 steps:
715 - uses: actions/checkout@v4
716 - name: dependencies
717 run: |
718 sudo apt update
719 wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/g++-4.8_4.8.5-4ubuntu8_amd64.deb
720 wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/libstdc++-4.8-dev_4.8.5-4ubuntu8_amd64.deb
721 wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/gcc-4.8-base_4.8.5-4ubuntu8_amd64.deb
722 wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/gcc-4.8_4.8.5-4ubuntu8_amd64.deb
723 wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/libgcc-4.8-dev_4.8.5-4ubuntu8_amd64.deb
724 wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/cpp-4.8_4.8.5-4ubuntu8_amd64.deb
725 wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/libasan0_4.8.5-4ubuntu8_amd64.deb
726 sudo apt install ./gcc-4.8_4.8.5-4ubuntu8_amd64.deb ./gcc-4.8-base_4.8.5-4ubuntu8_amd64.deb ./libstdc++-4.8-dev_4.8.5-4ubuntu8_amd64.deb ./cpp-4.8_4.8.5-4ubuntu8_amd64.deb ./libgcc-4.8-dev_4.8.5-4ubuntu8_amd64.deb ./libasan0_4.8.5-4ubuntu8_amd64.deb ./g++-4.8_4.8.5-4ubuntu8_amd64.deb
727 - name: build and test
728 run: |
729 mkdir build
730 cd build
731 cmake .. \
732 -GNinja \
733 -DCMAKE_BUILD_TYPE=Debug \
734 -DCMAKE_CXX_COMPILER=g++-4.8 \
735 -DCMAKE_C_COMPILER=gcc-4.8 \
736 -DCPPTRACE_WERROR_BUILD=On \
737 -DCPPTRACE_STD_FORMAT=Off
738 ninja
739
740 unittest-windows-32-bit:
741 runs-on: windows-2022
742 needs: unittest-windows
743 strategy:
744 fail-fast: false
745 matrix:
746 build_type: [Debug]
747 steps:
748 - uses: actions/checkout@v4
749 - name: Enable Developer Command Prompt
750 uses: ilammy/[email protected]
751 - name: build and test
752 run: |
753 mkdir build
754 cd build
755 cmake .. `
756 -A Win32 `
757 -DCPPTRACE_WERROR_BUILD=On `
758 -DCPPTRACE_BUILD_TESTING=On
759 cmake --build . --config ${{matrix.build_type}}
760 ./${{matrix.build_type}}/unittest
761
762 unittest-windows-clangcl:
763 runs-on: windows-2022
764 needs: unittest-windows
765 strategy:
766 fail-fast: false
767 matrix:
768 build_type: [Debug]
769 arch: [x64, Win32]
770 steps:
771 - uses: actions/checkout@v4
772 - name: Enable Developer Command Prompt
773 uses: ilammy/[email protected]
774 - name: build and test
775 run: |
776 mkdir build
777 cd build
778 cmake .. `
779 -T ClangCL `
780 -A ${{matrix.arch}} `
781 -DCPPTRACE_WERROR_BUILD=On `
782 -DCPPTRACE_BUILD_TESTING=On
783 cmake --build . --config ${{matrix.build_type}}
784 ./${{matrix.build_type}}/unittest