[zorg] r214879 - Add libc++ and libc++abi builders for Linux.
Dan Albert
danalbert at google.com
Tue Aug 5 09:35:03 PDT 2014
Author: danalbert
Date: Tue Aug 5 11:35:03 2014
New Revision: 214879
URL: http://llvm.org/viewvc/llvm-project?rev=214879&view=rev
Log:
Add libc++ and libc++abi builders for Linux.
The existing libc++ builder is based on buildit/testit and assumes that
the platform has its own libc++abi, and as such it only works for OS X.
Add a new one that uses an in-tree build and cmake to be compatible with
the other platforms.
This builder will actually build and test both libc++ and libc++abi.
Since most platforms don't have either of these libraries installed and
depend on each other, we can't test them in isolation.
Added:
zorg/trunk/zorg/buildbot/builders/LibcxxAndAbiBuilder.py
Modified:
zorg/trunk/buildbot/osuosl/master/config/builders.py
zorg/trunk/buildbot/osuosl/master/master.cfg
Modified: zorg/trunk/buildbot/osuosl/master/config/builders.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/master/config/builders.py?rev=214879&r1=214878&r2=214879&view=diff
==============================================================================
--- zorg/trunk/buildbot/osuosl/master/config/builders.py (original)
+++ zorg/trunk/buildbot/osuosl/master/config/builders.py Tue Aug 5 11:35:03 2014
@@ -42,6 +42,10 @@ from zorg.buildbot.builders import Libio
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 [
@@ -652,6 +656,16 @@ def _get_openmp_builders():
]
+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 [
@@ -707,6 +721,10 @@ def get_builders():
b['category'] = 'openmp'
yield b
+ for b in _get_libcxx_builders():
+ b['category'] = 'libcxx'
+ yield b
+
for b in _get_experimental_builders():
yield b
Modified: zorg/trunk/buildbot/osuosl/master/master.cfg
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/master/master.cfg?rev=214879&r1=214878&r2=214879&view=diff
==============================================================================
--- zorg/trunk/buildbot/osuosl/master/master.cfg (original)
+++ zorg/trunk/buildbot/osuosl/master/master.cfg Tue Aug 5 11:35:03 2014
@@ -160,6 +160,13 @@ c['schedulers'].append(SingleBranchSched
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"
Added: zorg/trunk/zorg/buildbot/builders/LibcxxAndAbiBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/LibcxxAndAbiBuilder.py?rev=214879&view=auto
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/LibcxxAndAbiBuilder.py (added)
+++ zorg/trunk/zorg/buildbot/builders/LibcxxAndAbiBuilder.py Tue Aug 5 11:35:03 2014
@@ -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', src_root], 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
More information about the llvm-commits
mailing list