Index: buildbot/osuosl/master/config/builders.py =================================================================== --- buildbot/osuosl/master/config/builders.py +++ buildbot/osuosl/master/config/builders.py @@ -1569,30 +1569,24 @@ def _get_experimental_scheduled_builders(): return [ - {'name' : "clang-cuda-build", - 'slavenames' : ["cuda-build-test-01"], - 'builddir' : "clang-cuda-build", - 'factory' : CUDATestsuiteBuilder.getCUDATestsuiteBuildFactory( - useTwoStage=False, - test=True, - stage1_config='Release', - extra_cmake_args=[ - '-DLLVM_ENABLE_ASSERTIONS=ON', - "-DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang", - "-DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++", - "-DLIBUNWIND_LIBCXX_PATH=../llvm/libcxx", - ], - externals="/home/botanist/bots/externals", - gpu_arch_list=["sm_35", "sm_61"], - gpu_devices=["GPU-af66efa4", # K40c(sm_35), - "GPU-44fe2444" # GTX1070(sm_61) - ], - cuda_jobs = 4, # Speeds up test execution time by ~2x. - extra_ts_cmake_args=[], - enable_thrust_tests=False, - ), + {'name': "clang-cuda-k80", + 'slavenames' :["cuda-k80-0"], + 'builddir': "clang-cuda-k80", + 'factory': AnnotatedBuilder.getAnnotatedBuildFactory(script="/buildbot/cuda-build", + checkout_llvm_sources=False), + 'category' : 'clang'}, + {'name': "clang-cuda-p4", + 'slavenames' :["cuda-gce-p4-0"], + 'builddir': "clang-cuda-p4", + 'factory': AnnotatedBuilder.getAnnotatedBuildFactory(script="/buildbot/cuda-build", + checkout_llvm_sources=False), + 'category' : 'clang'}, + {'name': "clang-cuda-t4", + 'slavenames' :["cuda-t4-0"], + 'builddir': "clang-cuda-t4", + 'factory': AnnotatedBuilder.getAnnotatedBuildFactory(script="/buildbot/cuda-build", + checkout_llvm_sources=False), 'category' : 'clang'}, - {'name': "clang-ve-ninja", 'slavenames':["nec-arrproto41"], 'builddir':"clang-ve-ninja", Index: buildbot/osuosl/master/config/slaves.py =================================================================== --- buildbot/osuosl/master/config/slaves.py +++ buildbot/osuosl/master/config/slaves.py @@ -155,6 +155,10 @@ # Ubuntu 16.04 x86_64, 2 x Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz, 64GB of RAM create_slave("cuda-build-test-01", properties={'jobs': 72}, max_builds=1), + # WIP migration of the CUDA buildbot to GCE. + create_slave("cuda-k80-0", max_builds=1), + create_slave("cuda-p4-0", max_builds=1), + create_slave("cuda-t4-0", max_builds=1), # Ubuntu 14.04 x86_64, AMD Athlon(tm) 5150 APU with Radeon(tm) R3, 8GiB RAM create_slave("am1i-slv1", properties={'jobs': 8}), Index: buildbot/osuosl/master/config/status.py =================================================================== --- buildbot/osuosl/master/config/status.py +++ buildbot/osuosl/master/config/status.py @@ -182,7 +182,9 @@ extraRecipients = ["tra+buildbot@google.com"], subject="Build %(builder)s Failure", mode = "failing", - builders = ["clang-cuda-build"], + builders = ["clang-cuda-build", + "clang-cuda-gce-build", "clang-cuda-gce-test-k80", + "clang-cuda-gce-test-p4", "clang-cuda-gce-test-t4"], addLogs=False, num_lines = 15), InformativeMailNotifier( Index: zorg/buildbot/builders/annotated/external.py =================================================================== --- /dev/null +++ zorg/buildbot/builders/annotated/external.py @@ -0,0 +1,49 @@ +#!/usr/bin/python + +# Runs external script which is expected to produce log annotations for the +# AnnotatedBuilder. + +import os +import subprocess +import sys +import traceback +import util +from contextlib import contextmanager + +def main(argv): + with step('post-build script', halt_on_fail=True): + # Run external script to do the actual work + cmd = sys.argv[1:] + if not cmd: + util.report("No external command provided.") + util.report('@@@STEP_FAILURE@@@') + return + + run_command(cmd) + +@contextmanager +def step(step_name, halt_on_fail=False): + util.report('@@@BUILD_STEP {}@@@'.format(step_name)) + if halt_on_fail: + util.report('@@@HALT_ON_FAILURE@@@') + try: + yield + except Exception as e: + if isinstance(e, subprocess.CalledProcessError): + util.report( + '{} exited with return code {}.'.format(e.cmd, e.returncode) + ) + util.report('The build step threw an exception...') + traceback.print_exc() + + util.report('@@@STEP_FAILURE@@@') + finally: + sys.stdout.flush() + + +def run_command(cmd, directory='.'): + util.report_run_cmd(cmd, cwd=directory) + +if __name__ == '__main__': + sys.path.append(os.path.dirname(__file__)) + sys.exit(main(sys.argv))