@@ -165,7 +165,7 @@ def main():
165165 # Delete all the .gcda files produces by an artefact.
166166 build_utils .remove_file_match_ext (WORKDIR , "gcda" )
167167
168- build (options , args .buildtype )
168+ build (options , args .buildtype , args . clingtests_only )
169169
170170 # Build artifacts should only be uploaded for full builds, and only for
171171 # "official" branches (master, v?-??-??-patches), i.e. not for pull_request
@@ -177,7 +177,7 @@ def main():
177177 if args .binaries :
178178 create_binaries (args .buildtype )
179179
180- if testing :
180+ if testing and not args . clingtests_only :
181181 extra_ctest_flags = ''
182182 if WINDOWS :
183183 extra_ctest_flags += '--repeat until-pass:5 '
@@ -220,6 +220,7 @@ def parse_args():
220220 parser .add_argument ("--dockeropts" , default = None , help = "Extra docker options, if any" )
221221 parser .add_argument ("--incremental" , default = "false" , help = "Do incremental build" )
222222 parser .add_argument ("--buildtype" , default = "Release" , help = "Release|Debug|RelWithDebInfo" )
223+ parser .add_argument ("--clingtests_only" , default = "false" , help = "Run only clingtests" )
223224 parser .add_argument ("--coverage" , default = "false" , help = "Create Coverage report in XML" )
224225 parser .add_argument ("--sha" , default = None , help = "sha that triggered the event" )
225226 parser .add_argument ("--base_ref" , default = None , help = "Ref to target branch" )
@@ -236,6 +237,7 @@ def parse_args():
236237
237238 # Set argument to True if matched
238239 args .incremental = args .incremental .lower () in ('yes' , 'true' , '1' , 'on' )
240+ args .clingtests_only = args .clingtests_only .lower () in ('yes' , 'true' , '1' , 'on' )
239241 args .coverage = args .coverage .lower () in ('yes' , 'true' , '1' , 'on' )
240242 args .binaries = args .binaries .lower () in ('yes' , 'true' , '1' , 'on' )
241243
@@ -429,20 +431,23 @@ def dump_requested_config(options):
429431
430432
431433@github_log_group ("Build" )
432- def cmake_build (buildtype ):
434+ def cmake_build (buildtype , clingtests_only = False ):
433435 generator_flags = "-- '-verbosity:minimal'" if WINDOWS else ""
434436 parallel_jobs = "4" if WINDOWS else str (os .cpu_count ())
435437
436438 builddir = os .path .join (WORKDIR , "build" )
437- result = subprocess_with_log (f"""
438- cmake --build '{ builddir } ' --config '{ buildtype } ' --parallel '{ parallel_jobs } ' { generator_flags }
439- """ )
439+ command = f"""
440+ cmake --build '{ builddir } ' --config '{ buildtype } ' --parallel '{ parallel_jobs } ' { generator_flags } """
441+ if clingtests_only :
442+ command += " --target check-cling"
443+
444+ result = subprocess_with_log (command )
440445
441446 if result != 0 :
442447 die (result , "Failed to build" )
443448
444449
445- def build (options , buildtype ):
450+ def build (options , buildtype , clingtests_only = False ):
446451 if not os .path .isdir (os .path .join (WORKDIR , "build" )):
447452 builddir = os .path .join (WORKDIR , "build" )
448453 result = subprocess_with_log (f"mkdir { builddir } " )
@@ -457,7 +462,7 @@ def build(options, buildtype):
457462
458463 dump_requested_config (options )
459464
460- cmake_build (buildtype )
465+ cmake_build (buildtype , clingtests_only )
461466
462467
463468@github_log_group ("Create binary packages" )
0 commit comments