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(): 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: