Skip to content

Commit 337cbd6

Browse files
committed
[ci] Add a benchmark build that runs rootbench
the master branch of the rootbench repo is cloned outside of ROOT's build directory.
1 parent d2510a5 commit 337cbd6

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

.github/workflows/root-ci-config/build_root.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ def main():
131131

132132
git_pull("src", args.repository, args.base_ref)
133133

134+
benchmark: bool = options_dict['rootbench'].lower() == "on"
135+
if benchmark:
136+
git_pull("rootbench", "https://github.com/root-project/rootbench", "master")
137+
134138
if pull_request:
135139
base_head_sha = get_base_head_sha("src", args.repository, args.sha, args.head_sha)
136140

@@ -161,11 +165,12 @@ def main():
161165
create_binaries(args.buildtype)
162166

163167
if testing:
164-
extra_ctest_flags = ""
168+
extra_ctest_flags = ''
165169
if WINDOWS:
166-
extra_ctest_flags += "--repeat until-pass:5 "
167-
extra_ctest_flags += "--build-config " + args.buildtype
168-
170+
extra_ctest_flags += '--repeat until-pass:5 '
171+
extra_ctest_flags += '--build-config ' + args.buildtype
172+
if benchmark:
173+
extra_ctest_flags = ' -R "^rootbench-" '
169174
ctest_returncode = run_ctest(extra_ctest_flags)
170175

171176
if args.coverage:
@@ -332,8 +337,10 @@ def run_ctest(extra_ctest_flags: str) -> int:
332337
failures in main().
333338
"""
334339
builddir = os.path.join(WORKDIR, "build")
340+
setupROOTEnv = f""". '{builddir}/bin/thisroot.sh'""" if 'rootbench' in extra_ctest_flags else ''
335341
ctest_result = subprocess_with_log(f"""
336342
cd '{builddir}'
343+
{setupROOTEnv}
337344
ctest --output-on-failure --parallel {os.cpu_count()} --output-junit TestResults.xml {extra_ctest_flags}
338345
""")
339346

.github/workflows/root-ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,11 @@ jobs:
424424
minimal: true
425425
property: "minimal build"
426426
overrides: ["CMAKE_CXX_STANDARD=20"]
427+
# Benchmark build
428+
- image: alma10
429+
is_special: true
430+
property: "benchmark build"
431+
overrides: ["CMAKE_CXX_STANDARD=20", "rootbench=ON"]
427432
# Disable GPU builds until the DNS problem is solved
428433
# - image: ubuntu2404-cuda
429434
# is_special: true

0 commit comments

Comments
 (0)