From e4c498e844c907baa656e86327e8ae2bbf58e692 Mon Sep 17 00:00:00 2001 From: Jeremy <51220084+jeremy-rifkin@users.noreply.github.com> Date: Tue, 21 Nov 2023 10:51:00 -0600 Subject: [PATCH] Adding shared testing --- ci/test-all-configs.py | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/ci/test-all-configs.py b/ci/test-all-configs.py index 16ddbbf..e6976b3 100644 --- a/ci/test-all-configs.py +++ b/ci/test-all-configs.py @@ -159,7 +159,8 @@ def build(matrix): f"-D{matrix['symbols']}=On", f"-D{matrix['demangle']}=On", "-DCPPTRACE_BACKTRACE_PATH=/usr/lib/gcc/x86_64-linux-gnu/10/include/backtrace.h", - "-DCPPTRACE_BUILD_TESTING=On" + "-DCPPTRACE_BUILD_TESTING=On", + f"-DBUILD_SHARED_LIBS={'On' if matrix['shared'] else 'Off'}" ] if matrix['symbols'] == "CPPTRACE_GET_SYMBOLS_WITH_LIBDL": args.append("-DCPPTRACE_BUILD_TEST_RDYNAMIC=On") @@ -178,7 +179,8 @@ def build(matrix): f"-D{matrix['unwind']}=On", f"-D{matrix['symbols']}=On", f"-D{matrix['demangle']}=On", - "-DCPPTRACE_BUILD_TESTING=On" + "-DCPPTRACE_BUILD_TESTING=On", + f"-DBUILD_SHARED_LIBS={'On' if matrix['shared'] else 'Off'}" ] if matrix["compiler"] == "g++": args.append("-GUnix Makefiles") @@ -201,7 +203,8 @@ def build_full_or_auto(matrix): f"-DCMAKE_CXX_STANDARD={matrix['std']}", f"-DCPPTRACE_USE_EXTERNAL_LIBDWARF=On", f"-DCPPTRACE_BACKTRACE_PATH=/usr/lib/gcc/x86_64-linux-gnu/10/include/backtrace.h", - "-DCPPTRACE_BUILD_TESTING=On" + "-DCPPTRACE_BUILD_TESTING=On", + f"-DBUILD_SHARED_LIBS={'On' if matrix['shared'] else 'Off'}" ] if matrix["config"] != "": args.append(f"{matrix['config']}") @@ -217,7 +220,8 @@ def build_full_or_auto(matrix): f"-DCMAKE_C_COMPILER={get_c_compiler_counterpart(matrix['compiler'])}", f"-DCMAKE_CXX_STANDARD={matrix['std']}", f"-DCPPTRACE_USE_EXTERNAL_LIBDWARF=On", - "-DCPPTRACE_BUILD_TESTING=On" + "-DCPPTRACE_BUILD_TESTING=On", + f"-DBUILD_SHARED_LIBS={'On' if matrix['shared'] else 'Off'}" ] if matrix["config"] != "": args.append(f"{matrix['config']}") @@ -326,6 +330,10 @@ def main(): "--all", action="store_true" ) + parser.add_argument( + "--shared", + action="store_true" + ) args = parser.parse_args() if platform.system() == "Linux": @@ -356,6 +364,7 @@ def main(): "CPPTRACE_DEMANGLE_WITH_CXXABI", #"CPPTRACE_DEMANGLE_WITH_NOTHING", ], + "shared": [args.shared] } exclude = [] run_matrix(matrix, exclude, build_and_test) @@ -363,7 +372,8 @@ def main(): "compiler": compilers, "target": ["Debug"], "std": ["11", "20"], - "config": [""] + "config": [""], + "shared": [args.shared] } exclude = [] run_matrix(matrix, exclude, build_and_test_full_or_auto) @@ -392,7 +402,8 @@ def main(): "demangle": [ "CPPTRACE_DEMANGLE_WITH_CXXABI", #"CPPTRACE_DEMANGLE_WITH_NOTHING", - ] + ], + "shared": [args.shared] } exclude = [] run_matrix(matrix, exclude, build_and_test) @@ -400,7 +411,8 @@ def main(): "compiler": compilers, "target": ["Debug"], "std": ["11", "20"], - "config": [""] + "config": [""], + "shared": [args.shared] } exclude = [] run_matrix(matrix, exclude, build_and_test_full_or_auto) @@ -431,7 +443,8 @@ def main(): "demangle": [ "CPPTRACE_DEMANGLE_WITH_CXXABI", "CPPTRACE_DEMANGLE_WITH_NOTHING", - ] + ], + "shared": [args.shared] } exclude = [ { @@ -484,7 +497,8 @@ def main(): "compiler": compilers, "target": ["Debug"], "std": ["11", "20"], - "config": [""] + "config": [""], + "shared": [args.shared] } exclude = [] run_matrix(matrix, exclude, build_and_test_full_or_auto)