Adding shared testing

This commit is contained in:
Jeremy 2023-11-21 10:51:00 -06:00
parent fcef25276e
commit e4c498e844
No known key found for this signature in database
GPG Key ID: B4C8300FEC395042

View File

@ -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)