Index: buildbot/osuosl/master/config/builders.py =================================================================== --- buildbot/osuosl/master/config/builders.py +++ buildbot/osuosl/master/config/builders.py @@ -26,6 +26,10 @@ reload(LLDBuilder) from zorg.buildbot.builders import LLDBuilder +from zorg.buildbot.builders import LLGoBuilder +reload(LLGoBuilder) +from zorg.buildbot.builders import LLGoBuilder + from zorg.buildbot.builders import ClangAndLLDBuilder reload(ClangAndLLDBuilder) from zorg.buildbot.builders import ClangAndLLDBuilder @@ -757,6 +761,13 @@ ] + +# llgo builders. +def _get_llgo_builders(): + # No build slaves set up for llgo yet. + return [] + + # Sanitizer builders. def _get_sanitizer_builders(): return [ @@ -1068,6 +1079,10 @@ b['category'] = 'lldb' yield b + for b in _get_llgo_builders(): + b['category'] = 'llgo' + yield b + for b in _get_sanitizer_builders(): b['category'] = 'sanitizer' yield b Index: buildbot/osuosl/master/master.cfg =================================================================== --- buildbot/osuosl/master/master.cfg +++ buildbot/osuosl/master/master.cfg @@ -47,6 +47,7 @@ "libcxxabi", "lld", "lldb", + "llgo", "openmp"])) # c['change_source'].append(LLVMPoller("test-suite", "trunk")) @@ -169,6 +170,14 @@ "libcxx", "libcxxabi"]))) +c['schedulers'].append(SingleBranchScheduler(name="llgo_scheduler", + treeStableTimer=2*60, + builderNames=get_all_for("llgo"), + change_filter=depends_on([ + "llvm", + "cfe", + "llgo"]))) + ####### PROJECT IDENTITY c['title'] = "LLVM" Index: zorg/buildbot/builders/LLGoBuilder.py =================================================================== --- /dev/null +++ zorg/buildbot/builders/LLGoBuilder.py @@ -0,0 +1,88 @@ +import os + +import buildbot +import buildbot.process.factory +from buildbot.steps.source import SVN +from buildbot.steps.shell import ShellCommand, SetProperty + +from zorg.buildbot.commands.NinjaCommand import NinjaCommand + +def getLLGoBuildFactory( + clean=True, + build_type='Release+Asserts', + test_libgo=True, # run 'check-libgo' target if True + ): + llvm_srcdir = "llvm.src" + llvm_objdir = "llvm.obj" + llgo_srcdir = '%s/tools/llgo' % llvm_srcdir + clang_srcdir = '%s/tools/clang' % llvm_srcdir + + f = buildbot.process.factory.BuildFactory() + # Determine the build directory. + f.addStep(SetProperty(name="get_builddir", + command=["pwd"], + property="builddir", + description="set build dir", + workdir=".")) + # Get LLVM, clang and llgo + f.addStep(SVN(name='svn-llvm', + mode='update', + baseURL='http://llvm.org/svn/llvm-project/llvm/', + defaultBranch='trunk', + workdir=llvm_srcdir)) + f.addStep(SVN(name='svn-clang', + mode='update', + baseURL='http://llvm.org/svn/llvm-project/cfe/', + defaultBranch='trunk', + workdir=clang_srcdir)) + f.addStep(SVN(name='svn-llgo', + mode='update', + baseURL='http://llvm.org/svn/llvm-project/llgo/', + defaultBranch='trunk', + workdir=llgo_srcdir)) + + # Clean build directory, if requested. + f.addStep(ShellCommand(name="rm-llvm_objdir", + command=["rm", "-rf", llvm_objdir], + haltOnFailure=True, + description=["rm build dir", "llvm"], + workdir=".", + doStepIf=clean)) + + # Create configuration files with cmake + f.addStep(ShellCommand(name="create-build-dir", + command=["mkdir", "-p", llvm_objdir], + haltOnFailure=False, + description=["create build dir"], + workdir=".")) + cmakeCommand = [ + "cmake", "-G", "Ninja", + "../%s" %llvm_srcdir, + "-DCMAKE_BUILD_TYPE=" + build_type, + ] + f.addStep(ShellCommand(name="cmake-configure", + command=cmakeCommand, + haltOnFailure=False, + description=["cmake configure"], + workdir=llvm_objdir)) + + # Build llgo + f.addStep(NinjaCommand(name="build_llgo", + targets=["llgo"], + haltOnFailure=True, + description=["build llgo"], + workdir=llvm_objdir)) + # Test llgo + f.addStep(NinjaCommand(name="test_llgo", + targets=["check-llgo"], + haltOnFailure=True, + description=["test llgo"], + workdir=llvm_objdir)) + # Test libgo + f.addStep(NinjaCommand(name="test_libgo", + targets=["check-libgo"], + haltOnFailure=True, + description=["test libgo"], + workdir=llvm_objdir)) + return f + Index: zorg/buildbot/changes/llvmpoller.py =================================================================== --- zorg/buildbot/changes/llvmpoller.py +++ zorg/buildbot/changes/llvmpoller.py @@ -238,6 +238,7 @@ 'libcxxabi' : 'libcxxabi', 'lld' : 'lld', 'lldb' : 'lldb', + 'llgo' : 'llgo', 'openmp' : 'openmp', }