[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
Thu Nov 26 03:53:28 PST 2015


dsanders updated this revision to Diff 41226.
dsanders added a comment.

Dropped boto_config_file in favour of 'env'.


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,10 @@
 
             # 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):
 
     ############# PREPARING
     f = buildbot.process.factory.BuildFactory()
@@ -601,13 +605,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
@@ -712,7 +712,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',
+                           env = {'BOTO_CONFIG': '/var/buildbot/llvmlab-build-artifacts.boto'},
           ]
 
 def _get_openmp_builders():


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14866.41226.patch
Type: text/x-patch
Size: 3624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151126/fda4b1e1/attachment.bin>


More information about the llvm-commits mailing list