Skip to content

Commit af72ced

Browse files
drone fixes
switched clang to droneubuntu added randomize_va_space added privileged option
1 parent 41150f8 commit af72ced

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

.drone.star

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def format_b2_args(**kwargs):
9292
return res
9393

9494

95-
def linux_build_steps(image, **kwargs):
95+
def linux_build_steps(image, privileged, **kwargs):
9696
args = format_b2_args(**kwargs)
9797
return [
9898
{
@@ -114,7 +114,9 @@ def linux_build_steps(image, **kwargs):
114114
{
115115
"name": "test",
116116
"image": image,
117+
"privileged" : privileged,
117118
"commands" : [
119+
"echo 0 | sudo tee /proc/sys/kernel/randomize_va_space" if privileged else "echo",
118120
"cd boost/libs/cobalt",
119121
"../../b2 test -j8 " + args
120122
]
@@ -156,6 +158,7 @@ def linux(
156158
name,
157159
branch,
158160
image,
161+
privileged = False,
159162
**kwargs):
160163

161164
return {
@@ -167,7 +170,7 @@ def linux(
167170
"os": "linux",
168171
"arch": "amd64"
169172
},
170-
"steps": git_boost_steps(branch) + linux_build_steps(image, **kwargs)
173+
"steps": git_boost_steps(branch) + linux_build_steps(image, privileged, **kwargs)
171174
}
172175

173176

@@ -196,21 +199,21 @@ def main(ctx):
196199
branch = 'develop'
197200

198201
return [
199-
linux("gcc-11", branch, "docker.io/library/gcc:11", variant="release", cxxstd="20"),
200-
linux("gcc-12", branch, "docker.io/library/gcc:12.3", variant="release", cxxstd="20"),
201-
linux("gcc-13", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20"),
202-
linux("gcc-13 (asan)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", debug_symbols="on", address_sanitizer="on"),
203-
linux("gcc-13 (usan)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", debug_symbols="on", undefined_sanitizer="on"),
204-
linux("gcc-13 (tsan)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", debug_symbols="on", thread_sanitizer="on"),
205-
linux("gcc-13 (io_context)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", **{'boost.cobalt.executor': 'use_io_context'}),
206-
linux("gcc-13 (container.pmr)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", **{'boost.cobalt.pmr': 'boost-container'}),
207-
linux("gcc-13 (no pmr)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", **{'boost.cobalt.pmr': 'no'}),
208-
linux("clang", branch, "docker.io/silkeh/clang", toolset='clang', variant="release", cxxstd="20"),
209-
linux("clang (container.pmr)", branch, "docker.io/silkeh/clang", toolset='clang', variant="release", cxxstd="20", **{'boost.cobalt.pmr': 'boost-container'}),
210-
linux("clang (no pmr)", branch, "docker.io/silkeh/clang", toolset='clang', variant="release", cxxstd="20", **{'boost.cobalt.pmr': 'no'}),
211-
linux("clang (asan)", branch, "docker.io/silkeh/clang", toolset='clang', variant="release", cxxstd="20", debug_symbols="on", address_sanitizer="on"),
212-
linux("clang (usan)", branch, "docker.io/silkeh/clang", toolset='clang', variant="release", cxxstd="20", debug_symbols="on", undefined_sanitizer="on"),
213-
linux("clang (tsan)", branch, "docker.io/silkeh/clang", toolset='clang', variant="release", cxxstd="20", debug_symbols="on", thread_sanitizer="on"),
202+
linux("gcc-11", branch, "docker.io/library/gcc:11", variant="release", cxxstd="20"),
203+
linux("gcc-12", branch, "docker.io/library/gcc:12.3", variant="release", cxxstd="20"),
204+
linux("gcc-13", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20"),
205+
linux("gcc-13 (asan)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", debug_symbols="on", address_sanitizer="on"),
206+
linux("gcc-13 (usan)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", debug_symbols="on", undefined_sanitizer="on"),
207+
linux("gcc-13 (tsan)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", debug_symbols="on", thread_sanitizer="on"),
208+
linux("gcc-13 (io_context)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", **{'boost.cobalt.executor': 'use_io_context'}),
209+
linux("gcc-13 (container.pmr)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", **{'boost.cobalt.pmr': 'boost-container'}),
210+
linux("gcc-13 (no pmr)", branch, "docker.io/library/gcc:13", variant="release", cxxstd="20", **{'boost.cobalt.pmr': 'no'}),
211+
linux("clang", branch, "cppalliance/droneubuntu2404:1", privileged=True, toolset='clang', variant="release", cxxstd="20"),
212+
linux("clang (container.pmr)", branch, "cppalliance/droneubuntu2404:1", privileged=True, toolset='clang', variant="release", cxxstd="20", **{'boost.cobalt.pmr': 'boost-container'}),
213+
linux("clang (no pmr)", branch, "cppalliance/droneubuntu2404:1", privileged=True, toolset='clang', variant="release", cxxstd="20", **{'boost.cobalt.pmr': 'no'}),
214+
linux("clang (asan)", branch, "cppalliance/droneubuntu2404:1", privileged=True, toolset='clang', variant="release", cxxstd="20", debug_symbols="on", address_sanitizer="on"),
215+
linux("clang (usan)", branch, "cppalliance/droneubuntu2404:1", privileged=True, toolset='clang', variant="release", cxxstd="20", debug_symbols="on", undefined_sanitizer="on"),
216+
linux("clang (tsan)", branch, "cppalliance/droneubuntu2404:1", privileged=True, toolset='clang', variant="release", cxxstd="20", debug_symbols="on", thread_sanitizer="on"),
214217
windows("msvc-14.3 (x64)", branch, "cppalliance/dronevs2022:latest", variant="release", cxxstd="20", address_model="64"),
215218
windows("msvc-14.3 (x32)", branch, "cppalliance/dronevs2022:latest", variant="release", cxxstd="20", address_model="32")
216219
]

0 commit comments

Comments
 (0)