[PATCH] D83503: [buildbot] Annotated builder tweaks

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 13:13:36 PDT 2020


tra created this revision.
tra added a reviewer: gkistanova.
Herald added subscribers: sanjoy.google, bixia.

- Allow bypassing source code checkouts. Cloning complete LLVM tree takes 2-3 minutes and not all bots need it (e.g. some CUDA bots just need to run tests built somewhere else)

- Allow using out-of-tree annotated scripts. This is useful for tinkering with bot operations without having to update buildmaster.


Repository:
  rZORG LLVM Github Zorg

https://reviews.llvm.org/D83503

Files:
  zorg/buildbot/builders/AnnotatedBuilder.py


Index: zorg/buildbot/builders/AnnotatedBuilder.py
===================================================================
--- zorg/buildbot/builders/AnnotatedBuilder.py
+++ zorg/buildbot/builders/AnnotatedBuilder.py
@@ -11,7 +11,8 @@
     env=None,
     extra_args=None,
     timeout=1200,
-    is_legacy_mode=False):
+    is_legacy_mode=False,
+    checkout_llvm_sources=True):
     """
     Returns a new build factory that uses AnnotatedCommand, which
     allows the build to be run by version-controlled scripts that do
@@ -76,19 +77,22 @@
         src_dir='llvm-zorg',
         alwaysUseLatest=True)
 
-    f.addGetSourcecodeSteps()
-
+    if checkout_llvm_sources:
+      f.addGetSourcecodeSteps()
 
     extra_args_with_props = [WithProperties(arg) for arg in extra_args]
     # Explicitly use '/' as separator, because it works on *nix and Windows.
-    script_path = "../llvm-zorg/zorg/buildbot/builders/annotated/%s" % (script)
+    if script.startswith('/'):
+      command = [script]
+    else:
+      script_path = "../llvm-zorg/zorg/buildbot/builders/annotated/%s" % (script)
+      command = ["python", script_path, WithProperties("--jobs=%(jobs:-)s")]
+    command += extra_args_with_props
+
     f.addStep(AnnotatedCommand(name="annotate",
                                description="annotate",
                                timeout=timeout,
                                haltOnFailure=True,
-                               command=["python",
-                                        script_path,
-                                        WithProperties("--jobs=%(jobs:-)s")]
-                                        + extra_args_with_props,
+                               command=command,
                                env=merged_env))
     return f


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83503.276821.patch
Type: text/x-patch
Size: 1772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200709/96f750cf/attachment.bin>


More information about the llvm-commits mailing list