From af72ced0518b350044c35f8aca8232aa2c0e79c3 Mon Sep 17 00:00:00 2001 From: Klemens Morgenstern Date: Fri, 5 Jul 2024 10:32:23 +0800 Subject: [PATCH] drone fixes switched clang to droneubuntu added randomize_va_space added privileged option --- .drone.star | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/.drone.star b/.drone.star index 251512a4..19cb87f6 100644 --- a/.drone.star +++ b/.drone.star @@ -92,7 +92,7 @@ def format_b2_args(**kwargs): return res -def linux_build_steps(image, **kwargs): +def linux_build_steps(image, privileged, **kwargs): args = format_b2_args(**kwargs) return [ { @@ -114,7 +114,9 @@ def linux_build_steps(image, **kwargs): { "name": "test", "image": image, + "privileged" : privileged, "commands" : [ + "echo 0 | sudo tee /proc/sys/kernel/randomize_va_space" if privileged else "echo", "cd boost/libs/cobalt", "../../b2 test -j8 " + args ] @@ -156,6 +158,7 @@ def linux( name, branch, image, + privileged = False, **kwargs): return { @@ -167,7 +170,7 @@ def linux( "os": "linux", "arch": "amd64" }, - "steps": git_boost_steps(branch) + linux_build_steps(image, **kwargs) + "steps": git_boost_steps(branch) + linux_build_steps(image, privileged, **kwargs) } @@ -196,21 +199,21 @@ def main(ctx): branch = 'develop' return [ - linux("gcc-11", branch, "docker.io/library/gcc:11", variant="release", cxxstd="20"), - linux("gcc-12", branch, "docker.io/library/gcc:12.3", variant="release", cxxstd="20"), - linux("gcc-13", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20"), - linux("gcc-13 (asan)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", debug_symbols="on", address_sanitizer="on"), - linux("gcc-13 (usan)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", debug_symbols="on", undefined_sanitizer="on"), - linux("gcc-13 (tsan)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", debug_symbols="on", thread_sanitizer="on"), - linux("gcc-13 (io_context)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", **{'boost.cobalt.executor': 'use_io_context'}), - linux("gcc-13 (container.pmr)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", **{'boost.cobalt.pmr': 'boost-container'}), - linux("gcc-13 (no pmr)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", **{'boost.cobalt.pmr': 'no'}), - linux("clang", branch, "docker.io/silkeh/clang", toolset='clang', variant="release", cxxstd="20"), - linux("clang (container.pmr)", branch, "docker.io/silkeh/clang", toolset='clang', variant="release", cxxstd="20", **{'boost.cobalt.pmr': 'boost-container'}), - linux("clang (no pmr)", branch, "docker.io/silkeh/clang", toolset='clang', variant="release", cxxstd="20", **{'boost.cobalt.pmr': 'no'}), - linux("clang (asan)", branch, "docker.io/silkeh/clang", toolset='clang', variant="release", cxxstd="20", debug_symbols="on", address_sanitizer="on"), - linux("clang (usan)", branch, "docker.io/silkeh/clang", toolset='clang', variant="release", cxxstd="20", debug_symbols="on", undefined_sanitizer="on"), - linux("clang (tsan)", branch, "docker.io/silkeh/clang", toolset='clang', variant="release", cxxstd="20", debug_symbols="on", thread_sanitizer="on"), + linux("gcc-11", branch, "docker.io/library/gcc:11", variant="release", cxxstd="20"), + linux("gcc-12", branch, "docker.io/library/gcc:12.3", variant="release", cxxstd="20"), + linux("gcc-13", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20"), + linux("gcc-13 (asan)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", debug_symbols="on", address_sanitizer="on"), + linux("gcc-13 (usan)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", debug_symbols="on", undefined_sanitizer="on"), + linux("gcc-13 (tsan)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", debug_symbols="on", thread_sanitizer="on"), + linux("gcc-13 (io_context)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", **{'boost.cobalt.executor': 'use_io_context'}), + linux("gcc-13 (container.pmr)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", **{'boost.cobalt.pmr': 'boost-container'}), + linux("gcc-13 (no pmr)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", **{'boost.cobalt.pmr': 'no'}), + linux("clang", branch, "cppalliance/droneubuntu2404:1", privileged=True, toolset='clang', variant="release", cxxstd="20"), + linux("clang (container.pmr)", branch, "cppalliance/droneubuntu2404:1", privileged=True, toolset='clang', variant="release", cxxstd="20", **{'boost.cobalt.pmr': 'boost-container'}), + linux("clang (no pmr)", branch, "cppalliance/droneubuntu2404:1", privileged=True, toolset='clang', variant="release", cxxstd="20", **{'boost.cobalt.pmr': 'no'}), + linux("clang (asan)", branch, "cppalliance/droneubuntu2404:1", privileged=True, toolset='clang', variant="release", cxxstd="20", debug_symbols="on", address_sanitizer="on"), + linux("clang (usan)", branch, "cppalliance/droneubuntu2404:1", privileged=True, toolset='clang', variant="release", cxxstd="20", debug_symbols="on", undefined_sanitizer="on"), + linux("clang (tsan)", branch, "cppalliance/droneubuntu2404:1", privileged=True, toolset='clang', variant="release", cxxstd="20", debug_symbols="on", thread_sanitizer="on"), windows("msvc-14.3 (x64)", branch, "cppalliance/dronevs2022:latest", variant="release", cxxstd="20", address_model="64"), windows("msvc-14.3 (x32)", branch, "cppalliance/dronevs2022:latest", variant="release", cxxstd="20", address_model="32") ]