- Address review comments
http://reviews.llvm.org/D4786
Files:
buildbot/osuosl/master/config/builders.py
buildbot/osuosl/master/master.cfg
zorg/buildbot/builders/LibcxxAndAbiBuilder.py
Index: buildbot/osuosl/master/config/builders.py
===================================================================
--- buildbot/osuosl/master/config/builders.py
+++ buildbot/osuosl/master/config/builders.py
@@ -42,6 +42,10 @@
reload(Libiomp5Builder)
from zorg.buildbot.builders import Libiomp5Builder
+from zorg.buildbot.builders import LibcxxAndAbiBuilder
+reload(LibcxxAndAbiBuilder)
+from zorg.buildbot.builders import LibcxxAndAbiBuilder
+
# Plain LLVM builders.
def _get_llvm_builders():
return [
@@ -649,6 +653,16 @@
]
+def _get_libcxx_builders():
+ return [
+ {'name': 'libcxx-libcxxabi-x86_64-linux-debian',
+ 'slavenames': ['gribozavr4'],
+ 'builddir': 'libcxx-libcxxabi-x86_64-linux-debian',
+ 'factory': LibcxxAndAbiBuilder.getLibcxxAndAbiBuilder(),
+ 'category': 'libcxx'},
+ ]
+
+
# Experimental and stopped builders
def _get_experimental_builders():
return [
@@ -704,6 +718,10 @@
b['category'] = 'openmp'
yield b
+ for b in _get_libcxx_builders():
+ b['category'] = 'libcxx'
+ yield b
+
for b in _get_experimental_builders():
yield b
Index: buildbot/osuosl/master/master.cfg
===================================================================
--- buildbot/osuosl/master/master.cfg
+++ buildbot/osuosl/master/master.cfg
@@ -160,6 +160,13 @@
change_filter=depends_on([
"openmp"])))
+c['schedulers'].append(SingleBranchScheduler(name="libcxx_scheduler",
+ treeStableTimer=2*60,
+ builderNames=get_all_for("libcxx"),
+ change_filter=depends_on([
+ "libcxx",
+ "libcxxabi"])))
+
####### PROJECT IDENTITY
c['title'] = "LLVM"
Index: zorg/buildbot/builders/LibcxxAndAbiBuilder.py
===================================================================
--- /dev/null
+++ zorg/buildbot/builders/LibcxxAndAbiBuilder.py
@@ -0,0 +1,92 @@
+import os
+
+import buildbot
+import buildbot.process.factory
+import buildbot.steps.shell
+import buildbot.process.properties as properties
+
+from buildbot.steps.source.svn import SVN
+
+import zorg.buildbot.commands.LitTestCommand as lit_test_command
+import zorg.buildbot.util.artifacts as artifacts
+import zorg.buildbot.util.phasedbuilderutils as phased_builder_utils
+
+reload(lit_test_command)
+reload(artifacts)
+reload(phased_builder_utils)
+
+
+def getLibcxxWholeTree(f, src_root):
+ llvm_path = src_root
+ libcxx_path = os.path.join(llvm_path, 'projects/libcxx')
+ libcxxabi_path = os.path.join(llvm_path, 'projects/libcxxabi')
+
+ f = phased_builder_utils.SVNCleanupStep(f, llvm_path)
+ f.addStep(SVN(name='svn-llvm',
+ mode='full',
+ baseURL='http://llvm.org/svn/llvm-project/llvm/',
+ defaultBranch='trunk',
+ workdir=llvm_path))
+ f.addStep(SVN(name='svn-libcxx',
+ mode='full',
+ baseURL='http://llvm.org/svn/llvm-project/libcxx/',
+ defaultBranch='trunk',
+ workdir=libcxx_path))
+ f.addStep(SVN(name='svn-libcxxabi',
+ mode='full',
+ baseURL='http://llvm.org/svn/llvm-project/libcxxabi/',
+ defaultBranch='trunk',
+ workdir=libcxxabi_path))
+ return f
+
+
+def getLibcxxAndAbiBuilder(f=None, env={}):
+ if f is None:
+ f = buildbot.process.factory.BuildFactory()
+
+ # Determine the build directory.
+ f.addStep(properties.SetProperty(name="get_builddir",
+ command=["pwd"],
+ property="builddir",
+ description="set build dir",
+ workdir="."))
+
+ src_root = os.path.join(properties.Property('builddir'), 'llvm')
+ build_path = os.path.join(properties.Property('builddir'), 'build')
+
+ f = getLibcxxWholeTree(f, src_root)
+
+ # Nuke/remake build directory and run CMake
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='rm.builddir', command=['rm', '-rf', build_path],
+ haltOnFailure=False, workdir=src_root))
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='make.builddir', command=['mkdir', build_path],
+ haltOnFailure=True, workdir=src_root))
+
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='cmake', command=['cmake', '..'], haltOnFailure=True,
+ workdir=build_path, env=env))
+
+ # Build libcxxabi
+ jobs_flag = properties.WithProperties('-j%(jobs)s')
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='build.libcxxabi', command=['make', jobs_flag, 'cxxabi'],
+ haltOnFailure=True, workdir=build_path))
+
+ # Build libcxx
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='build.libcxx', command=['make', jobs_flag, 'cxx'],
+ haltOnFailure=True, workdir=build_path))
+
+ # Test libc++abi
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='test.libcxxabi', command=['make', 'check-libcxxabi'],
+ workdir=build_path))
+
+ # Test libc++
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='test.libcxx', command=['make', 'check-libcxx'],
+ workdir=build_path))
+
+ return f
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits