[PATCH] D14866: [zorg] Add support for uploading artifacts to the 'llvmlab bisect' bucket and enable this for clang-cmake-mips.
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 20 03:27:25 PST 2015
dsanders created this revision.
dsanders added subscribers: gkistanova, cmatthews, llvm-commits.
Adds two new keyword arguments to getClangCMakeBuildFactory():
stage1_upload_directory - This is the bucket subdirectory to upload to and
should match the builder name.
boto_config_file - The path to the boto config file if it isn't ~/.boto.
The buildslave must have gsutil installed.
http://reviews.llvm.org/D14866
Files:
buildbot/osuosl/master/config/builders.py
zorg/buildbot/builders/ClangBuilder.py
Index: zorg/buildbot/builders/ClangBuilder.py
===================================================================
--- zorg/buildbot/builders/ClangBuilder.py
+++ zorg/buildbot/builders/ClangBuilder.py
@@ -8,6 +8,7 @@
from buildbot.steps.shell import WarningCountingShellCommand
from buildbot.steps.source import SVN
from buildbot.steps.transfer import FileDownload
+from buildbot.steps.trigger import Trigger
import zorg.buildbot.util.artifacts as artifacts
import zorg.buildbot.builders.Util as builders_util
@@ -511,7 +512,11 @@
# Extra repositories
checkout_clang_tools_extra=True,
- checkout_compiler_rt=True):
+ checkout_compiler_rt=True,
+
+ # Upload artifacts to Google Cloud Storage (for the llvmbisect tool)
+ stage1_upload_directory=None,
+ boto_config_file=None):
############# PREPARING
f = buildbot.process.factory.BuildFactory()
@@ -544,6 +549,9 @@
stage2_build = 'stage2'
stage2_install = 'stage2.install'
+ if boto_config_file:
+ env['BOTO_CONFIG'] = boto_config_file
+
# Set up VS environment, if appropriate.
if vs:
f.addStep(SetProperty(
@@ -601,13 +609,37 @@
workdir=stage1_build,
env=env))
- if useTwoStage or runTestSuite:
+ if useTwoStage or runTestSuite or stage1_upload_directory:
f.addStep(ShellCommand(name='install stage 1',
command=ninja_install_cmd,
description='ninja install',
workdir=stage1_build,
env=env))
+ if stage1_upload_directory:
+ fmt = 'clang-r%(got_revision)s-t%(now)s-b%(buildnumber)s.tar.xz'
+ stage1_package = \
+ WithProperties(fmt, now=lambda _: datetime.utcnow().strftime('%Y-%m-%d_%H-%M-%S'))
+ f.addStep(SetProperty(name="generate package name",
+ command=['echo', stage1_package],
+ property="stage1_package"))
+
+ f.addStep(ShellCommand(name='package stage 1',
+ command=['tar', 'cvfJ', '../install.tar.xz', '.'],
+ description='package stage 1',
+ workdir=stage1_install,
+ env=env))
+ gsurl = WithProperties(
+ 'gs://' + bucket + '/' + stage1_upload_directory +
+ '/%(stage1_package)s')
+ f.addStep(ShellCommand(name='upload to storage bucket',
+ command=['gsutil', 'cp', '../install.tar.xz',
+ gsurl],
+ description='upload to storage bucket',
+ workdir=stage1_install,
+ env=env))
+
+
# Compute the cmake define flag to set the C and C++ compiler to clang. Use
# clang-cl if we used MSVC for stage1.
if not vs:
Index: buildbot/osuosl/master/config/builders.py
===================================================================
--- buildbot/osuosl/master/config/builders.py
+++ buildbot/osuosl/master/config/builders.py
@@ -706,7 +706,9 @@
checkout_compiler_rt=True,
extra_cmake_args=["-DLLVM_HOST_TRIPLE=mips-unknown-linux-gnu",
"-DLLVM_DEFAULT_TARGET_TRIPLE=mips-unknown-linux-gnu",
- "-DLLVM_TARGET_ARCH=Mips"])},
+ "-DLLVM_TARGET_ARCH=Mips"],
+ stage1_upload_directory='clang-cmake-mips',
+ boto_config='/var/buildbot/llvmlab-build-artifacts.boto')},
]
def _get_openmp_builders():
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14866.40760.patch
Type: text/x-patch
Size: 3906 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151120/db59ee57/attachment.bin>
More information about the llvm-commits
mailing list