Skip to content

Commit

Permalink
drone fixes
Browse files Browse the repository at this point in the history
switched clang to droneubuntu
added randomize_va_space
added privileged option
  • Loading branch information
klemens-morgenstern committed Jul 5, 2024
1 parent 41150f8 commit af72ced
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
{
Expand All @@ -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
]
Expand Down Expand Up @@ -156,6 +158,7 @@ def linux(
name,
branch,
image,
privileged = False,
**kwargs):

return {
Expand All @@ -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)
}


Expand Down Expand Up @@ -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")
]

0 comments on commit af72ced

Please sign in to comment.