def getLNTFactory(triple, nt_flags, xfails=[], clean=True, test=False, reportBuildslave=True, **kwargs): lnt_args = {} lnt_arg_names = [ 'submitURL', 'package_cache', 'testerName', 'reportBuildslave' ] for argname in lnt_arg_names: if argname in kwargs: lnt_args[argname] = kwargs.pop(argname) # Build compiler to test. f = ClangBuilder.getClangBuildFactory(triple, clean=clean, test=test, stage1_config='Release+Asserts', **kwargs) # Add an LNT test runner. AddLNTTestsToFactory(f, nt_flags, cc_path="llvm.install.1/bin/clang", cxx_path="llvm.install.1/bin/clang++", **lnt_args) return f
def _get_experimental_builders(): return [ {'name': "llvm-ppc64-linux2", 'slavenames':["coho"], 'builddir':"llvm-ppc64-2", 'factory': LLVMBuilder.getLLVMBuildFactory("ppc64-linux-gnu", jobs=2, clean=False, timeout=20), 'category' : 'llvm'}, {'name': "clang-atom-d525-fedora", 'slavenames':["atom-buildbot"], 'builddir':"clang-atom-d525-fedora", 'factory' : ClangBuilder.getClangBuildFactory(extra_configure_args=['--enable-shared']), 'category' : 'clang'}, {'name': "clang-amd64-openbsd", 'slavenames':["openbsd-buildslave"], 'builddir':"clang-openbsd", 'factory' : ClangBuilder.getClangBuildFactory(stage1_config='Release+Asserts'), 'category' : 'clang'}, ]
def getPollyLNTFactory(triple, nt_flags, xfails=[], clean=False, test=False, build_type="Release", extra_cmake_args=[], **kwargs): lnt_args = {} lnt_arg_names = [ 'submitURL', 'package_cache', 'testerName', 'reportBuildslave' ] for argname in lnt_arg_names: if argname in kwargs: lnt_args[argname] = kwargs.pop(argname) llvm_install_dir = 'stage1.install' f = ClangBuilder.getClangCMakeBuildFactory( test=False, useTwoStage=False, clean=clean, checkout_clang_tools_extra=False, checkout_compiler_rt=False, extra_cmake_args=extra_cmake_args, stage1_config=build_type) f.addStep( ShellCommand(name="install-llvm-and-clang", command=["ninja", "install"], haltOnFailure=True, description=["install llvm and clang"], workdir="stage1")) AddExternalPollyBuildFactory(f, llvm_install_dir, build_type) nt_flags.append('--cflag=' + '-Xclang') nt_flags.append('--cflag=' + '-load') nt_flags.append('--cflag=' + '-Xclang') nt_flags.append( WithProperties("--cflag=%s/polly.install/lib/LLVMPolly.so", 'builddir')) # Add an LNT test runner. LNTBuilder.AddLNTTestsToFactory(f, nt_flags, cc_path=(llvm_install_dir + '/bin/clang'), cxx_path=(llvm_install_dir + '/bin/clang++'), **lnt_args) return f
def gccRunSuite(languages): f = buildbot.process.factory.BuildFactory() # Determine the build directory. getBuildDir(f) # Download compiler from upstream builder. GetCompilerArtifacts(f) # Load the ignore set. # # FIXME: This is lame, it is only loaded at startup. ignores = ClangBuilder.getClangTestsIgnoresFromPath( os.path.expanduser('~/public/clang-tests'), 'clang-x86_64-darwin10') # Convert languages to GCC style names. languages = [{'c' : 'gcc', 'c++' : 'g++', 'obj-c' : 'objc', 'obj-c++' : 'obj-c++'}[l] for l in languages] # Run gcc test suite. ClangBuilder.addClangGCCTests(f, ignores, install_prefix = '%(builddir)s/host-compiler', languages = languages) return f
def gccRunSuite(languages): f = buildbot.process.factory.BuildFactory() # Determine the build directory. getBuildDir(f) # Download compiler from upstream builder. GetCompilerArtifacts(f) # Load the ignore set. # # FIXME: This is lame, it is only loaded at startup. ignores = ClangBuilder.getClangTestsIgnoresFromPath( os.path.expanduser('~/public/clang-tests'), 'clang-x86_64-darwin10') # Convert languages to GCC style names. languages = [{ 'c': 'gcc', 'c++': 'g++', 'obj-c': 'objc', 'obj-c++': 'obj-c++' }[l] for l in languages] # Run gcc test suite. ClangBuilder.addClangGCCTests(f, ignores, install_prefix='%(builddir)s/host-compiler', languages=languages) return f
def getPollyLNTFactory(triple, nt_flags, xfails=[], clean=False, test=False, build_type="Release", extra_cmake_args=[], **kwargs): lnt_args = {} lnt_arg_names = ['submitURL', 'package_cache', 'testerName', 'reportBuildslave'] for argname in lnt_arg_names: if argname in kwargs: lnt_args[argname] = kwargs.pop(argname) llvm_install_dir = 'stage1.install' f = ClangBuilder.getClangCMakeBuildFactory( test=False, useTwoStage=False, clean=clean, checkout_clang_tools_extra=False, checkout_compiler_rt=False, extra_cmake_args=extra_cmake_args, stage1_config=build_type) f.addStep(ShellCommand(name="install-llvm-and-clang", command=["ninja", "install"], haltOnFailure=True, description=["install llvm and clang"], workdir="stage1")) AddExternalPollyBuildFactory(f, llvm_install_dir, build_type) nt_flags.append('--cflag=' + '-Xclang') nt_flags.append('--cflag=' + '-load') nt_flags.append('--cflag=' + '-Xclang') nt_flags.append(WithProperties("--cflag=%s/polly.install/lib/LLVMPolly.so", 'builddir')) # Add an LNT test runner. LNTBuilder.AddLNTTestsToFactory(f, nt_flags, cc_path=(llvm_install_dir+'/bin/clang'), cxx_path=(llvm_install_dir+'/bin/clang++'), **lnt_args); return f
def getLNTFactory(triple, nt_flags, xfails=[], clean=True, test=False, **kwargs): lnt_args = {} lnt_arg_names = ['submitURL', 'package_cache', 'testerName'] for argname in lnt_arg_names: if argname in kwargs: lnt_args[argname] = kwargs.pop(argname) # Build compiler to test. f = ClangBuilder.getClangBuildFactory( triple, outOfDir=True, clean=clean, test=test, stage1_config='Release+Asserts', **kwargs) # Add an LNT test runner. AddLNTTestsToFactory(f, nt_flags, cc_path="llvm.install.1/bin/clang", cxx_path="llvm.install.1/bin/clang++", **lnt_args); return f
def getPollyLNTFactory(triple, nt_flags, xfails=[], clean=False, test=False, **kwargs): lnt_args = {} lnt_arg_names = ['submitURL', 'package_cache', 'testerName', 'reportBuildslave'] for argname in lnt_arg_names: if argname in kwargs: lnt_args[argname] = kwargs.pop(argname) llvm_install_dir = 'llvm.install.1' f = ClangBuilder.getClangBuildFactory( triple, outOfDir=True, clean=clean, test=test, stage1_config='Release+Asserts', **kwargs) f.addStep(ShellCommand(name="install-llvm-and-clang", command=["make", "install"], haltOnFailure=True, description=["install llvm and clang"], workdir="llvm.obj")) AddExternalPollyBuildFactory(f, llvm_install_dir) nt_flags.append('--cflag=' + '-Xclang') nt_flags.append('--cflag=' + '-load') nt_flags.append('--cflag=' + '-Xclang') nt_flags.append(WithProperties("--cflag=%s/polly.install/lib/LLVMPolly.so", 'builddir')) lnt_args['env'] = {'LD_LIBRARY_PATH': WithProperties("%s/cloog.install/lib", 'builddir')} lnt_args['parallel'] = True # Add an LNT test runner. LNTBuilder.AddLNTTestsToFactory(f, nt_flags, cc_path=(llvm_install_dir+'/bin/clang'), cxx_path=(llvm_install_dir+'/bin/clang++'), **lnt_args); return f
def _get_clang_fast_builders(): return [ {'name': "clang-x86_64-debian-fast", 'slavenames':["gribozavr1"], 'builddir':"clang-x86_64-debian-fast", 'factory': ClangBuilder.getClangBuildFactory( env={'PATH':'/home/llvmbb/bin/clang-latest/bin:/home/llvmbb/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin', 'CC': 'ccache clang', 'CXX': 'ccache clang++', 'CCACHE_CPP2': 'yes'}, stage1_config='Release+Asserts', checkout_compiler_rt=True, outOfDir=True)}, {'name': "llvm-clang-lld-x86_64-debian-fast", 'slavenames':["gribozavr1"], 'builddir':"llvm-clang-lld-x86_64-debian-fast", 'factory': ClangAndLLDBuilder.getClangAndLLDBuildFactory( env={'PATH':'/home/llvmbb/bin/clang-latest/bin:/home/llvmbb/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin', 'CC': 'ccache clang', 'CXX': 'ccache clang++', 'CCACHE_CPP2': 'yes'})}, {'name': "llvm-clang-lld-x86_64-ubuntu-13.04", 'slavenames':["gribozavr2"], 'builddir':"llvm-clang-lld-x86_64-ubuntu-13.04", 'factory': ClangAndLLDBuilder.getClangAndLLDBuildFactory( env={'PATH':'/home/llvmbb/bin/clang-latest/bin:/home/llvmbb/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin', 'CC': 'ccache clang', 'CXX': 'ccache clang++', 'CCACHE_CPP2': 'yes'})}, {'name': "llvm-clang-lld-x86_64-centos-6.5", 'slavenames':["gribozavr3"], 'builddir':"llvm-clang-lld-x86_64-centos-6.5", 'factory': ClangAndLLDBuilder.getClangAndLLDBuildFactory( env={'PATH': '/opt/centos/devtoolset-1.1/root/usr/bin:/home/llvmbb/bin:/bin:/usr/bin', 'LD_LIBRARY_PATH': '/opt/centos/devtoolset-1.1/root/usr/lib64', 'CC': 'ccache clang', 'CXX': 'ccache clang++', 'CCACHE_CPP2': 'yes'}, withLLD=False, extraCompilerOptions=['--gcc-toolchain=/opt/centos/devtoolset-1.1/root/usr'])}, ]
def getCUDATestsuiteBuildFactory( externals, # Directory with CUDA, thrust and gcc versions for testing. always_clean=True, test=False, useTwoStage=False, cmake='cmake', extra_cmake_args=None, # Extra CMake args for all stages. extra_ts_cmake_args=None, # extra cmake args for testsuite. jobs=None, cuda_jobs=1, # number of simultaneous CUDA apps to run env=None, # Environmental variables for all steps. enable_thrust_tests=False, split_thrust_tests=False, # Each thrust test is a separate executable. run_thrust_tests=False, enable_libcxx=True, # checkout/build libcxx to test with. gpu_arch_list=None, gpu_devices=None, # List of devices to make visible to CUDA stage1_config='Release', stage2_config='Release'): if extra_cmake_args is None: extra_cmake_args = [] if extra_ts_cmake_args is None: extra_ts_cmake_args = [] # Prepare environmental variables. Set here all env we want for all steps. merged_env = { 'TERM': 'dumb' # Make sure Clang doesn't use color escape sequences. } if env is not None: # Overwrite pre-set items with the given ones, so user can set # anything. merged_env.update(env) source_dir = 'llvm' # Should match the one used in getClangCMakeBuildFactory. stage1_build_dir = 'stage1' # Should match the one defined in getClangCMakeBuildFactory. stage2_build_dir = 'stage2' # Should match the one defined in getClangCMakeBuildFactory. install_dir = 'clang.install' if useTwoStage: clang_build_dir = stage2_build_dir else: clang_build_dir = stage1_build_dir # Build clang. f = ClangBuilder.getClangCMakeBuildFactory( clean=always_clean, test=test, cmake=cmake, extra_cmake_args=extra_cmake_args, jobs=jobs, env=merged_env, useTwoStage=useTwoStage, stage1_config=stage1_config, stage2_config=stage2_config, checkout_clang_tools_extra=False, checkout_compiler_rt=False, checkout_libcxx=enable_libcxx, checkout_lld=False, checkout_test_suite=True) cuda_test_env = { 'PYTHONPATH': WithProperties("%(workdir)s/" + source_dir + "/utils/lit:${PYTHONPATH}"), 'DESTDIR': WithProperties("%(workdir)s/" + install_dir), 'PATH': WithProperties("%(workdir)s/" + install_dir + "/usr/local/bin:${PATH}"), } merged_env.update(cuda_test_env) ts_build_dir = 'test-suite-build' f.addStep( RemoveDirectory(name="Remove old clang install directory", dir=install_dir)) # Install clang into directory pointed by $DESTDIR f.addStep( NinjaCommand(name='ninja install clang', targets=["install"], jobs=jobs, haltOnFailure=True, description=split("installing clang"), descriptionDone=split("Clang installation is done."), workdir=clang_build_dir, env=merged_env)) # Completely remove test suite build dir. f.addStep( RemoveDirectory(name="Remove old test-suite build directory", dir=ts_build_dir)) if extra_ts_cmake_args: cmake_args = extra_ts_cmake_args[:] else: cmake_args = [] # Set proper defaults. CmakeCommand.applyDefaultOptions(cmake_args, [ ('-DCMAKE_BUILD_TYPE=', 'Release'), ]) # Some options are required for this stage no matter what. CmakeCommand.applyRequiredOptions(cmake_args, [ ('-G', 'Ninja'), ]) cmake_args.append( WithProperties("-DCMAKE_CXX_COMPILER=%(workdir)s/" + clang_build_dir + "/bin/clang++")) cmake_args.append( WithProperties("-DCMAKE_C_COMPILER=%(workdir)s/" + clang_build_dir + "/bin/clang")) cmake_args.append('-DTEST_SUITE_SUBDIRS=External'), # Limit to External tests only. if externals: cmake_args.append('-DTEST_SUITE_EXTERNALS_DIR=' + externals) if split_thrust_tests: cmake_args.append('-DTHRUST_SPLIT_TESTS=1') if gpu_arch_list: cmake_args.append('-DCUDA_GPU_ARCH=' + ';'.join(gpu_arch_list)) if cuda_jobs: cmake_args.append('-DCUDA_JOBS=%s' % cuda_jobs) # Then do fresh cmake configuration. f.addStep( CmakeCommand(name='cmake test-suite', description='cmake test-suite', haltOnFailure=True, options=cmake_args, path="../test/test-suite", workdir=ts_build_dir, env=merged_env)) # Always build simple CUDA tests. They serve as compilation # smoketests and will fail quickly if compiler has obvious issues # compiling CUDA files. f.addStep( NinjaCommand(name='ninja build simple CUDA tests', targets=["cuda-tests-simple"], jobs=jobs, haltOnFailure=True, description=split("building simple CUDA tests"), descriptionDone=split("simple CUDA tests built."), workdir=ts_build_dir, env=merged_env)) # Limit GPUs visible to CUDA. if gpu_devices: for gpu_id in gpu_devices: # make ID a string as it may be either an integer or a UUID string. gpu_id = str(gpu_id) gpu_env = dict(merged_env) gpu_env["CUDA_VISIBLE_DEVICES"] = gpu_id f.addStep( NinjaCommand( name='run simple CUDA tests on gpu %s' % gpu_id, targets=["check-cuda-simple"], jobs=1, # lit will parallelize the jobs haltOnFailure=True, description=split("Running simple CUDA tests on GPU %s" % gpu_id), descriptionDone=split("simple CUDA tests on GPU %s done." % gpu_id), workdir=ts_build_dir, env=gpu_env)) else: f.addStep( NinjaCommand( name='run simple CUDA tests', targets=["check-cuda-simple"], jobs=1, # lit will parallelize the jobs haltOnFailure=True, description=split("Running simple CUDA tests"), descriptionDone=split("simple CUDA tests done."), workdir=ts_build_dir, env=merged_env)) # If we've enabled thrust tests, build them now. # WARNING: This takes a lot of time to build. if (enable_thrust_tests): f.addStep( NinjaCommand(name='ninja build thrust', targets=["cuda-tests-thrust"], jobs=jobs, haltOnFailure=True, description=split("building thrust tests"), descriptionDone=split("thrust tests built."), workdir=ts_build_dir, env=merged_env)) # Run them. That also takes a while. # TODO(tra) we may want to run more than one instance so one # can be compiling tests while another is running them on GPU. if run_thrust_tests: f.addStep( NinjaCommand( name='run all CUDA tests', targets=["check"], jobs=1, # lit will parallelize the jobs. haltOnFailure=True, description=split("running all CUDA tests."), descriptionDone=split("all cuda tests done."), workdir=ts_build_dir, env=merged_env)) return f
def _get_clang_builders(): return [ # {'name': "clang-x86_64-linux", # 'slavenames':["gcc14"], # 'builddir':"clang-x86_64-linux", # 'factory': ClangBuilder.getClangBuildFactory(examples=True)}, {'name': "clang-i686-linux", 'slavenames':["dunbar1"], 'builddir':"clang-i686-linux", 'factory': ClangBuilder.getClangBuildFactory()}, {'name': "clang-arm-linux", 'slavenames':["nick3"], 'builddir':"clang-arm-linux", 'factory': ClangBuilder.getClangBuildFactory()}, {'name' : "clang-i686-darwin10", 'slavenames' :["dunbar-darwin10"], 'builddir' :"clang-i686-darwin10", 'factory': ClangBuilder.getClangBuildFactory(triple='i686-apple-darwin10', stage1_config='Release')}, {'name': "clang-i686-freebsd", 'slavenames':["freebsd1"], 'builddir':"clang-i686-freebsd", 'factory': ClangBuilder.getClangBuildFactory(clean=True, use_pty_in_tests=True)}, {'name' : "clang-i686-xp-msvc9", 'slavenames' :['dunbar-win32-2'], 'builddir' :"clang-i686-xp-msvc9", 'factory' : ClangBuilder.getClangMSVCBuildFactory(jobs=2)}, {'name': "clang-x86_64-linux-vg", 'slavenames':["osu7"], 'builddir':"clang-x86_64-linux-vg", 'factory': ClangBuilder.getClangBuildFactory(valgrind=True)}, {'name' : "clang-x86_64-darwin10-selfhost", 'slavenames' : ["dunbar-darwin10"], 'builddir' : "clang-x86_64-darwin10-selfhost", 'factory' : ClangBuilder.getClangBuildFactory(triple='x86_64-apple-darwin10', useTwoStage=True, stage1_config='Release+Asserts', stage2_config='Debug+Asserts')}, {'name' : "clang-x86_64-linux-selfhost-rel", 'slavenames' : ["osu7"], 'builddir' : "clang-x86_64-linux-selfhost-rel", 'factory' : ClangBuilder.getClangBuildFactory(triple='x86_64-pc-linux-gnu', useTwoStage=True, stage1_config='Release+Asserts', stage2_config='Release+Asserts')}, {'name' : "clang-i686-linux-fnt", 'slavenames' : ['balint1'], 'builddir' : "clang-i686-linux-fnt", 'factory' : NightlytestBuilder.getFastNightlyTestBuildFactory(triple='i686-pc-linux-gnu', stage1_config='Release+Asserts', test=False, xfails=clang_i386_linux_xfails) }, {'name' : "clang-x86_64-linux-fnt", 'slavenames' : ['osu7'], 'builddir' : "clang-x86_64-linux-fnt", 'factory' : NightlytestBuilder.getFastNightlyTestBuildFactory(triple='x86_64-pc-linux-gnu', stage1_config='Release+Asserts', test=False, xfails=clang_x86_64_linux_xfails) }, ]
xfails=clang_i386_linux_xfails) }, {'name' : "clang-x86_64-linux-fnt", 'slavenames' : ['osu7'], 'builddir' : "clang-x86_64-linux-fnt", 'factory' : NightlytestBuilder.getFastNightlyTestBuildFactory(triple='x86_64-pc-linux-gnu', stage1_config='Release+Asserts', test=False, xfails=clang_x86_64_linux_xfails) }, ] # Offline. {'name': "clang-i386-auroraux", 'slavenames':["evocallaghan"], 'builddir':"clang-i386-auroraux", 'factory': ClangBuilder.getClangBuildFactory("i386-pc-auroraux", jobs="%(jobs)s", make='gmake')}, def _get_dragonegg_builders(): return [ {'name' : 'dragonegg-i386-linux', 'slavenames' : ['gcc16'], 'builddir' : 'dragonegg-i386-linux', 'factory' : ScriptedBuilder.getScriptedBuildFactory( source_code = [SVN(name='svn-llvm', mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm/', defaultBranch='trunk', workdir="llvm.src"), SVN(name='svn-dragonegg', mode='update', baseURL='http://llvm.org/svn/llvm-project/dragonegg/', defaultBranch='trunk', workdir="dragonegg.src"),],
def _get_experimental_builders(): return [ {'name' : "clang-i386-darwin10-selfhost-rel", 'slavenames' : ["dunbar-darwin10"], 'builddir' : "clang-i386-darwin10-selfhost-rel", 'factory' : ClangBuilder.getClangBuildFactory(triple='i386-apple-darwin10', useTwoStage=True, stage1_config='Release+Asserts', stage2_config='Release+Asserts'), 'category' : 'clang.exp' }, {'name' : "clang-x86_64-darwin10-selfhost-rel", 'slavenames' : ["dunbar-darwin10"], 'builddir' : "clang-x86_64-darwin10-selfhost-rel", 'factory' : ClangBuilder.getClangBuildFactory(triple='x86_64-apple-darwin10', useTwoStage=True, stage1_config='Release+Asserts', stage2_config='Release+Asserts'), 'category' : 'clang.exp' }, {'name': "clang-native-arm-cortex-a9", 'slavenames':["kistanova6"], 'builddir':"clang-native-arm-cortex-a9", 'factory' : ClangBuilder.getClangBuildFactory( extra_configure_args=['--build=armv7l-unknown-linux-gnueabi', '--host=armv7l-unknown-linux-gnueabi', '--target=armv7l-unknown-linux-gnueabi', '--with-cpu=cortex-a9', '--with-fpu=neon', '--with-abi=aapcs', '--with-float=hard', '--enable-targets=arm,cbe', '--enable-optimized']), 'category' : 'clang'}, # Clang cross builders. {'name': "clang-x86_64-darwin10-self-mingw32", 'slavenames':["kistanova1"], 'builddir':"clang-x86_64-darwin10-self-mingw32", 'factory' : ClangBuilder.getClangBuildFactory(outOfDir=True, jobs=4, test=False, extra_configure_args=['--build=x86_64-apple-darwin10', '--host=i686-pc-mingw32', '--target=i686-pc-mingw32']), 'category' : 'clang'}, {'name' : "clang-x86_64-darwin10-cross-mingw32", 'slavenames' :["kistanova1"], 'builddir' :"clang-x86_64-darwin10-cross-mingw32", 'factory' : ClangBuilder.getClangBuildFactory(outOfDir=True, jobs=4, use_pty_in_tests=True, run_cxx_tests=True, extra_configure_args=['--build=x86_64-apple-darwin10', '--host=x86_64-apple-darwin10', '--target=i686-pc-mingw32']), 'category' : 'clang'}, # Llvm-gcc cross builders. {'name' : "build-self-4-mingw32", 'slavenames': [ "kistanova1" ], 'builddir' : "build-self-4-mingw32", 'factory' : ScriptedBuilder.getScriptedBuildFactory( source_code = [SVN(name='svn-llvm', mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm/', defaultBranch='trunk', workdir="llvm.src"), SVN(name='svn-llvm-gcc', mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm-gcc-4.2/', defaultBranch='trunk', workdir="llvm-gcc.src"),], launcher = 'llvm-gcc.src/extras/buildbot-launcher', build_script = 'llvm-gcc.src/extras/build-self-4-mingw32', extra_args = [], build_steps = [{'name' : 'clean', 'description' : 'clean', 'haltOnFailure' : True }, {'name' : 'copy_cross_tools', 'description' : 'copy cross-tools', 'haltOnFailure' : True }, {'name' : 'configure_llvm_1', 'description' : 'configure llvm (stage1)', 'haltOnFailure' : True }, {'name' : 'make_llvm_1', 'description' : 'compile llvm (stage1)', 'extra_args' : ['-j8'], # Extra step-specific properties 'haltOnFailure' : True }, {'name' : 'test_llvm_1', 'type' : ClangTestCommand, 'description' : 'test llvm (stage1)', 'haltOnFailure' : False }, {'name' : 'configure_llvmgcc_1', 'description' : 'configure llvm-gcc (stage1)', 'haltOnFailure' : True }, {'name' : 'make_llvmgcc_1', 'description' : 'compile llvm-gcc (stage1)', 'extra_args' : ['-j8'], 'haltOnFailure' : True }, {'name' : 'install_llvmgcc_1', 'description' : 'install llvm-gcc (stage1)', 'haltOnFailure' : True }, {'name' : 'configure_llvm_2', 'description' : 'configure llvm (stage2)', 'haltOnFailure' : True }, {'name' : 'make_llvm_2', 'description' : 'compile llvm (stage2)', 'extra_args' : ['-j8'], # Extra step-specific properties 'haltOnFailure' : True }, {'name' : 'configure_llvmgcc_2', 'description' : 'configure llvm-gcc (stage2)', 'haltOnFailure' : True }, {'name' : 'make_llvmgcc_2', 'description' : 'compile llvm-gcc (stage2)', 'extra_args' : ['-j8'], 'haltOnFailure' : True }, {'name' : 'install_llvmgcc_2', 'description' : 'install llvm-gcc (stage2)', 'haltOnFailure' : True },]), 'category' : 'llvm-gcc' }, {'name' : "llvm-gcc-x86_64-darwin10-cross-i686-linux", 'slavenames': [ "kistanova1" ], 'builddir' : "llvm-gcc-x86_64-darwin10-cross-i686-linux", 'factory' : ScriptedBuilder.getScriptedBuildFactory( source_code = [SVN(name='svn-llvm', mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm/', defaultBranch='trunk', workdir="llvm.src"), SVN(name='svn-llvm-gcc', mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm-gcc-4.2/', defaultBranch='trunk', workdir="llvm-gcc.src"),], launcher = 'llvm-gcc.src/extras/buildbot-launcher', build_script = 'llvm-gcc.src/extras/build-x-4-linux', extra_args = [], build_steps = [{'name' : 'clean', 'description' : 'clean', 'haltOnFailure' : True }, {'name' : 'copy_cross_tools', 'description' : 'copy cross-tools', 'haltOnFailure' : True }, {'name' : 'configure_llvm', 'description' : 'configure llvm', 'haltOnFailure' : True }, {'name' : 'make_llvm', 'description' : 'make llvm', 'extra_args' : ['-j8'], # Extra step-specific properties 'haltOnFailure' : True }, {'name' : 'configure_llvmgcc', 'description' : 'configure llvm-gcc', 'haltOnFailure' : True }, {'name' : 'make_llvmgcc', 'description' : 'make llvm-gcc', 'extra_args' : ['-j8'], 'haltOnFailure' : True }, {'name' : 'install_llvmgcc', 'description' : 'install llvm-gcc', 'haltOnFailure' : True },]), 'category' : 'llvm-gcc' }, {'name' : "llvm-gcc-build-x86_64-darwin10-x-mingw32-x-armeabi", 'slavenames': [ "kistanova1" ], 'builddir' : "llvm-gcc-build-x86_64-darwin10-x-mingw32-x-armeabi", 'factory' : ScriptedBuilder.getScriptedBuildFactory( source_code = [SVN(name='svn-llvm', mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm/', defaultBranch='trunk', workdir="llvm.src"), SVN(name='svn-llvm-gcc', mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm-gcc-4.2/', defaultBranch='trunk', workdir="llvm-gcc.src"),], launcher = 'llvm-gcc.src/extras/buildbot-launcher', build_script = 'llvm-gcc.src/extras/build-darwin-x-mingw32-x-armeabi', extra_args = [], build_steps = [{'name' : 'clean', 'description' : 'clean', 'haltOnFailure' : True }, {'name' : 'copy_cross_tools', 'description' : 'copy cross_tools', 'haltOnFailure' : True }, {'name' : 'configure_llvm_1', 'description' : 'configure llvm (stage 1)', 'haltOnFailure' : True }, {'name' : 'make_llvm_1', 'description' : 'make llvm (stage 1)', 'extra_args' : ['-j8'], # Extra step-specific properties 'haltOnFailure' : True }, {'name' : 'test_llvm_1', 'description' : 'test llvm (stage 1)', 'haltOnFailure' : False }, {'name' : 'configure_llvmgcc_1', 'description' : 'configure llvm-gcc (stage 1)', 'haltOnFailure' : True }, {'name' : 'make_llvmgcc_1', 'description' : 'make llvm-gcc (stage 1)', # Note: one thread only here 'haltOnFailure' : True }, {'name' : 'install_llvmgcc_1', 'description' : 'install llvm-gcc (stage 1)', 'haltOnFailure' : True }, {'name' : 'configure_llvm_2', 'description' : 'configure llvm (stage 2)', 'haltOnFailure' : True }, {'name' : 'make_llvm_2', 'description' : 'make llvm (stage 2)', 'extra_args' : ['-j8'], 'haltOnFailure' : True }, {'name' : 'configure_llvmgcc_2', 'description' : 'configure llvm-gcc (stage 2)', 'haltOnFailure' : True }, {'name' : 'make_llvmgcc_2', 'description' : 'make llvm-gcc (stage 2)', 'extra_args' : ['-j8'], 'haltOnFailure' : True }, {'name' : 'install_llvmgcc_2', 'description' : 'install llvm-gcc (stage 2)', 'haltOnFailure' : True }, {'name' : 'configure_llvm_3', 'description' : 'configure llvm (stage 3)', 'haltOnFailure' : True }, {'name' : 'make_llvm_3', 'description' : 'make llvm (stage 3)', 'extra_args' : ['-j8'], 'haltOnFailure' : True }, {'name' : 'configure_llvmgcc_3', 'description' : 'configure llvm-gcc (stage 3)', 'haltOnFailure' : True }, {'name' : 'make_llvmgcc_3', 'description' : 'make llvm-gcc (stage 3)', 'extra_args' : ['-j8'], 'haltOnFailure' : True }, {'name' : 'install_llvmgcc_3', 'description' : 'install llvm-gcc (stage 3)', 'haltOnFailure' : True },]), 'category' : 'llvm-gcc' }, {'name' : "llvm-gcc-native-mingw32", 'slavenames': [ "kistanova2" ], 'builddir' : "llvm-gcc-native-mingw32", 'factory' : ScriptedBuilder.getScriptedBuildFactory( source_code = [SVN(name='svn-llvm', mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm/', defaultBranch='trunk', workdir="llvm.src"), SVN(name='svn-llvm-gcc', mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm-gcc-4.2/', defaultBranch='trunk', workdir="llvm-gcc.src"),], launcher = 'llvm-gcc.src/extras/buildbot-launcher', build_script = 'llvm-gcc.src/extras/build-native-mingw32', extra_args = [], build_steps = [{'name' : 'clean', 'description' : 'clean', 'haltOnFailure' : True }, {'name' : 'copy_tools', 'description' : 'copy tools', 'haltOnFailure' : True }, {'name' : 'configure_llvm', 'description' : 'configure llvm', 'haltOnFailure' : True }, {'name' : 'make_llvm', 'description' : 'make llvm', 'haltOnFailure' : True }, {'name' : 'test_llvm', 'type' : ClangTestCommand, 'description' : 'test llvm', 'haltOnFailure' : False }, {'name' : 'configure_llvmgcc', 'description' : 'configure llvm-gcc', 'haltOnFailure' : True }, {'name' : 'make_llvmgcc', 'description' : 'make llvm-gcc', 'haltOnFailure' : True }, {'name' : 'install_llvmgcc', 'description' : 'install llvm-gcc', 'haltOnFailure' : True },]), 'category' : 'llvm-gcc' }, {'name' : "llvm-gcc-native-mingw32-win7", 'slavenames': [ "kistanova3" ], 'builddir' : "llvm-gcc-native-mingw32-win7", 'factory' : ScriptedBuilder.getScriptedBuildFactory( source_code = [SVN(name='svn-llvm', mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm/', defaultBranch='trunk', workdir="llvm.src"), SVN(name='svn-llvm-gcc', mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm-gcc-4.2/', defaultBranch='trunk', workdir="llvm-gcc.src"),], launcher = 'llvm-gcc.src/extras/buildbot-launcher', build_script = 'llvm-gcc.src/extras/build-native-mingw32', extra_args = [], build_steps = [{'name' : 'clean', 'description' : 'clean', 'haltOnFailure' : True }, {'name' : 'copy_tools', 'description' : 'copy tools', 'haltOnFailure' : True }, {'name' : 'configure_llvm', 'description' : 'configure llvm', 'haltOnFailure' : True }, {'name' : 'make_llvm', 'description' : 'make llvm', 'haltOnFailure' : True }, {'name' : 'test_llvm', 'type' : ClangTestCommand, 'description' : 'test llvm', 'haltOnFailure' : False }, {'name' : 'configure_llvmgcc', 'description' : 'configure llvm-gcc', 'haltOnFailure' : True }, {'name' : 'make_llvmgcc', 'description' : 'make llvm-gcc', 'haltOnFailure' : True }, {'name' : 'install_llvmgcc', 'description' : 'install llvm-gcc', 'haltOnFailure' : True },]), 'category' : 'llvm-gcc' }, {'name' : "llvm-gcc-i686-pc-linux-gnu-cross-arm-eabi-hard-float", 'slavenames': [ "kistanova4" ], 'builddir' : "llvm-gcc-i686-pc-linux-gnu-cross-arm-eabi-hard-float", 'factory' : ScriptedBuilder.getScriptedBuildFactory( source_code = [SVN(name='svn-llvm', mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm/', defaultBranch='trunk', workdir="llvm.src"), SVN(name='svn-llvm-gcc', mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm-gcc-4.2/', defaultBranch='trunk', workdir="llvm-gcc.src"),], launcher = 'llvm-gcc.src/extras/buildbot-launcher', build_script = 'llvm-gcc.src/extras/build-x-4-armeabi-hardfloat', extra_args = [], build_steps = [{'name' : 'clean', 'description' : 'clean', 'haltOnFailure' : True }, {'name' : 'copy_cross_tools', 'description' : 'copy cross-tools', 'haltOnFailure' : True }, {'name' : 'configure_llvm', 'description' : 'configure llvm', 'haltOnFailure' : True }, {'name' : 'make_llvm', 'description' : 'make llvm', 'extra_args' : ['-j4'], 'haltOnFailure' : True }, {'name' : 'install_llvm', 'description' : 'install llvm', 'extra_args' : ['-j4'], 'haltOnFailure' : False }, {'name' : 'configure_llvmgcc', 'description' : 'configure llvm-gcc', 'haltOnFailure' : True }, {'name' : 'make_llvmgcc', 'description' : 'make llvm-gcc', 'extra_args' : ['-j4'], 'haltOnFailure' : True }, {'name' : 'install_llvmgcc', 'description' : 'install llvm-gcc', 'haltOnFailure' : True },]), 'category' : 'llvm-gcc' }, {'name' : "llvm-gcc-i686-pc-linux-gnu-cross-arm-eabi-soft-float", 'slavenames': [ "kistanova4" ], 'builddir' : "llvm-gcc-i686-pc-linux-gnu-cross-arm-eabi-soft-float", 'factory' : ScriptedBuilder.getScriptedBuildFactory( source_code = [SVN(name='svn-llvm', mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm/', defaultBranch='trunk', workdir="llvm.src"), SVN(name='svn-llvm-gcc', mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm-gcc-4.2/', defaultBranch='trunk', workdir="llvm-gcc.src"),], launcher = 'llvm-gcc.src/extras/buildbot-launcher', build_script = 'llvm-gcc.src/extras/build-x-4-armeabi-softfloat', extra_args = [], build_steps = [{'name' : 'clean', 'description' : 'clean', 'haltOnFailure' : True }, {'name' : 'copy_cross_tools', 'description' : 'copy cross-tools', 'haltOnFailure' : True }, {'name' : 'configure_llvm', 'description' : 'configure llvm', 'haltOnFailure' : True }, {'name' : 'make_llvm', 'description' : 'make llvm', 'extra_args' : ['-j4'], 'haltOnFailure' : True }, {'name' : 'install_llvm', 'description' : 'install llvm', 'extra_args' : ['-j4'], 'haltOnFailure' : False }, {'name' : 'configure_llvmgcc', 'description' : 'configure llvm-gcc', 'haltOnFailure' : True }, {'name' : 'make_llvmgcc', 'description' : 'make llvm-gcc', 'extra_args' : ['-j4'], 'haltOnFailure' : True }, {'name' : 'install_llvmgcc', 'description' : 'install llvm-gcc', 'haltOnFailure' : True },]), 'category' : 'llvm-gcc' }, {'name' : "llvm-gcc-mingw32-cross-arm-linux-gnueabi-hard-float", 'slavenames': [ "kistanova5" ], 'builddir' : "llvm-gcc-mingw32-cross-arm-linux-gnueabi-hard-float", 'factory' : ScriptedBuilder.getScriptedBuildFactory( source_code = [SVN(name='svn-llvm', mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm/', defaultBranch='trunk', workdir="llvm.src"), SVN(name='svn-llvm-gcc', mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm-gcc-4.2/', defaultBranch='trunk', workdir="llvm-gcc.src"),], launcher = 'llvm-gcc.src/extras/buildbot-launcher', build_script = 'llvm-gcc.src/extras/llvm-gcc-mingw32-cross-arm-linux-gnueabi-hard-float', extra_args = [], build_steps = [{'name' : 'clean', 'description' : 'clean', 'haltOnFailure' : True }, {'name' : 'copy_cross_tools', 'description' : 'copy cross-tools', 'haltOnFailure' : True }, {'name' : 'configure_llvm', 'description' : 'configure llvm', 'haltOnFailure' : True }, {'name' : 'make_llvm', 'description' : 'make llvm', 'haltOnFailure' : True }, {'name' : 'configure_llvmgcc', 'description' : 'configure llvm-gcc', 'haltOnFailure' : True }, {'name' : 'make_llvmgcc', 'description' : 'make llvm-gcc', 'haltOnFailure' : True }, {'name' : 'install_llvmgcc', 'description' : 'install llvm-gcc', 'haltOnFailure' : True },]), 'category' : 'llvm-gcc' }, {'name' : "clang-i686-linux-selfhost-rel", 'slavenames' : ["osu8"], 'builddir' : "clang-i686-linux-selfhost-rel", 'factory' : ClangBuilder.getClangBuildFactory(triple='i686-pc-linux-gnu', useTwoStage=True, stage1_config='Release+Asserts', stage2_config='Release+Asserts'), 'category' : 'clang.exp' }, # {'name' : "clang-i686-xp-msvc9_alt", # 'slavenames' :['adobe1'], # 'builddir' :"clang-i686-xp-msvc9_alt", # 'factory' : ClangBuilder.getClangMSVCBuildFactory(jobs=2), # 'category' : 'clang.exp' }, {'name': "clang-i686-freebsd-selfhost-rel", 'slavenames':["freebsd1"], 'builddir':"clang-i686-freebsd-selfhost-rel", 'factory': ClangBuilder.getClangBuildFactory(triple='i686-pc-freebsd', useTwoStage=True, stage1_config='Release+Asserts', stage2_config='Release+Asserts'), 'category' : 'clang.exp' }, ]
def getABITestsuitBuildFactory( always_clean=True, test=False, useTwoStage=False, cmake='cmake', extra_cmake_args=[], # Extra CMake args for all stages. jobs=None, env={}, # Environmental variables for all steps. stage1_config='Release', stage2_config='Release'): # Prepare environmental variables. Set here all env we want for all steps. merged_env = { 'TERM' : 'dumb' # Make sure Clang doesn't use color escape sequences. } if env is not None: # Overwrite pre-set items with the given ones, so user can set anything. merged_env.update(env) source_dir = 'llvm' # Should match the one used in getClangCMakeBuildFactory. stage1_build_dir = 'stage1' # Should match the one defined in getClangCMakeBuildFactory. stage2_build_dir = 'stage2' # Should match the one defined in getClangCMakeBuildFactory. if useTwoStage: clang_build_dir = stage2_build_dir else: clang_build_dir = stage1_build_dir # Build clang first. f = ClangBuilder.getClangCMakeBuildFactory( clean=always_clean, test=test, cmake=cmake, extra_cmake_args=extra_cmake_args, jobs=jobs, env=merged_env, useTwoStage=useTwoStage, stage1_config=stage1_config, stage2_config=stage2_config) # Checkout the test-suite. f.addStep(SVN(name='svn-test-suite', mode='update', baseURL='http://llvm.org/svn/llvm-project/test-suite/', defaultBranch='trunk', workdir='test-suite')) # Run the ABI test. abi_test_env = { 'PYTHONPATH' : WithProperties("%(workdir)s/" + source_dir + "/utils/lit:${PYTHONPATH}"), 'PATH' : WithProperties("%(workdir)s/" + clang_build_dir + "/bin:${PATH}"), } merged_env.update(abi_test_env) abi_test_cmd = ["python", "linux-x86.py", "clang", "test", "-v"] if jobs: abi_test_cmd.append("-j"+str(jobs)) f.addStep(LitTestCommand(name='abi-test-suite', command=abi_test_cmd, description=["running", "ABI", "test-suite"], descriptionDone=["ABI", "test-suite", "completed"], workdir='test-suite/ABI-Testsuite', env=merged_env)) return f
# RUN: python %s import zorg from zorg.buildbot.builders import ClangBuilder, LLVMBuilder, LLVMGCCBuilder from zorg.buildbot.builders import NightlytestBuilder # Just check that we can instantiate the build factors, what else can we do? print ClangBuilder.getClangBuildFactory() print LLVMBuilder.getLLVMBuildFactory() print LLVMGCCBuilder.getLLVMGCCBuildFactory() print NightlytestBuilder.getFastNightlyTestBuildFactory('x86_64-apple-darwin10')
def getCUDATestsuiteBuildFactory( externals, # Directory with CUDA, thrust and gcc versions for testing. always_clean=True, test=False, useTwoStage=False, cmake='cmake', extra_cmake_args=None, # Extra CMake args for all stages. extra_ts_cmake_args=None, # extra cmake args for testsuite. jobs=None, cuda_jobs=1, # number of simultaneous CUDA apps to run env=None, # Environmental variables for all steps. enable_thrust_tests=False, split_thrust_tests=False, # Each thrust test is a separate executable. run_thrust_tests=False, enable_libcxx=True, # checkout/build libcxx to test with. gpu_arch_list=None, gpu_devices=None, # List of devices to make visible to CUDA stage1_config='Release', stage2_config='Release'): if extra_cmake_args is None: extra_cmake_args = [] if extra_ts_cmake_args is None: extra_ts_cmake_args = [] # Prepare environmental variables. Set here all env we want for all steps. merged_env = { 'TERM': 'dumb' # Make sure Clang doesn't use color escape sequences. } if env is not None: # Overwrite pre-set items with the given ones, so user can set # anything. merged_env.update(env) source_dir = 'llvm' # Should match the one used in getClangCMakeBuildFactory. stage1_build_dir = 'stage1' # Should match the one defined in getClangCMakeBuildFactory. stage2_build_dir = 'stage2' # Should match the one defined in getClangCMakeBuildFactory. install_dir = 'clang.install' if useTwoStage: clang_build_dir = stage2_build_dir else: clang_build_dir = stage1_build_dir # Build clang. f = ClangBuilder.getClangCMakeBuildFactory( clean=always_clean, test=test, cmake=cmake, extra_cmake_args=extra_cmake_args, jobs=jobs, env=merged_env, useTwoStage=useTwoStage, stage1_config=stage1_config, stage2_config=stage2_config, checkout_clang_tools_extra=False, checkout_compiler_rt=False, checkout_libcxx=enable_libcxx, checkout_lld=False, checkout_test_suite=True) cuda_test_env = { 'PYTHONPATH': WithProperties("%(workdir)s/" + source_dir + "/utils/lit:${PYTHONPATH}"), 'DESTDIR': WithProperties("%(workdir)s/" + install_dir), 'PATH': WithProperties("%(workdir)s/" + install_dir + "/usr/local/bin:${PATH}"), } merged_env.update(cuda_test_env) ts_build_dir = 'test-suite-build' f.addStep( RemoveDirectory(name="Remove old clang install directory", dir=install_dir)) # Install clang into directory pointed by $DESTDIR f.addStep(NinjaCommand( name='ninja install clang', targets=["install"], jobs=jobs, haltOnFailure=True, description=split("installing clang"), descriptionDone=split("Clang installation is done."), workdir=clang_build_dir, env=merged_env)) # Completely remove test suite build dir. f.addStep( RemoveDirectory(name="Remove old test-suite build directory", dir=ts_build_dir)) if extra_ts_cmake_args: cmake_args = extra_ts_cmake_args[:] else: cmake_args = [] # Set proper defaults. CmakeCommand.applyDefaultOptions(cmake_args, [ ('-DCMAKE_BUILD_TYPE=', 'Release'), ]) # Some options are required for this stage no matter what. CmakeCommand.applyRequiredOptions(cmake_args, [ ('-G', 'Ninja'), ]) cmake_args.append( WithProperties( "-DCMAKE_CXX_COMPILER=%(workdir)s/" + clang_build_dir + "/bin/clang++" )) cmake_args.append( WithProperties( "-DCMAKE_C_COMPILER=%(workdir)s/" + clang_build_dir + "/bin/clang" )) cmake_args.append('-DTEST_SUITE_SUBDIRS=External'), # Limit to External tests only. if externals: cmake_args.append('-DTEST_SUITE_EXTERNALS_DIR=' + externals) if split_thrust_tests: cmake_args.append('-DTHRUST_SPLIT_TESTS=1') if gpu_arch_list: cmake_args.append('-DCUDA_GPU_ARCH=' + ';'.join(gpu_arch_list)) if cuda_jobs: cmake_args.append('-DCUDA_JOBS=%s' % cuda_jobs) # Then do fresh cmake configuration. f.addStep(CmakeCommand(name='cmake test-suite', description='cmake test-suite', haltOnFailure=True, options=cmake_args, path="../test/test-suite", workdir=ts_build_dir, env=merged_env)) # Always build simple CUDA tests. They serve as compilation # smoketests and will fail quickly if compiler has obvious issues # compiling CUDA files. f.addStep(NinjaCommand( name='ninja build simple CUDA tests', targets=["cuda-tests-simple"], jobs=jobs, haltOnFailure=True, description=split("building simple CUDA tests"), descriptionDone=split("simple CUDA tests built."), workdir=ts_build_dir, env=merged_env)) # Limit GPUs visible to CUDA. if gpu_devices: for gpu_id in gpu_devices: # make ID a string as it may be either an integer or a UUID string. gpu_id = str(gpu_id) gpu_env = dict(merged_env) gpu_env["CUDA_VISIBLE_DEVICES"] = gpu_id f.addStep(NinjaCommand( name='run simple CUDA tests on gpu %s' % gpu_id, targets=["check-cuda-simple"], jobs=1, # lit will parallelize the jobs haltOnFailure=True, description=split("Running simple CUDA tests on GPU %s" % gpu_id), descriptionDone=split("simple CUDA tests on GPU %s done." % gpu_id), workdir=ts_build_dir, env=gpu_env)) else: f.addStep(NinjaCommand( name='run simple CUDA tests', targets=["check-cuda-simple"], jobs=1, # lit will parallelize the jobs haltOnFailure=True, description=split("Running simple CUDA tests"), descriptionDone=split("simple CUDA tests done."), workdir=ts_build_dir, env=merged_env)) # If we've enabled thrust tests, build them now. # WARNING: This takes a lot of time to build. if (enable_thrust_tests): f.addStep(NinjaCommand( name='ninja build thrust', targets=["cuda-tests-thrust"], jobs=jobs, haltOnFailure=True, description=split("building thrust tests"), descriptionDone=split("thrust tests built."), workdir=ts_build_dir, env=merged_env)) # Run them. That also takes a while. # TODO(tra) we may want to run more than one instance so one # can be compiling tests while another is running them on GPU. if run_thrust_tests: f.addStep(NinjaCommand( name='run all CUDA tests', targets=["check"], jobs=1, # lit will parallelize the jobs. haltOnFailure=True, description=split("running all CUDA tests."), descriptionDone=split("all cuda tests done."), workdir=ts_build_dir, env=merged_env)) return f
def getABITestsuitBuildFactory( always_clean=True, test=False, useTwoStage=False, cmake='cmake', extra_cmake_args=[], # Extra CMake args for all stages. jobs=None, env={}, # Environmental variables for all steps. stage1_config='Release', stage2_config='Release'): # Prepare environmental variables. Set here all env we want for all steps. merged_env = { 'TERM': 'dumb' # Make sure Clang doesn't use color escape sequences. } if env is not None: # Overwrite pre-set items with the given ones, so user can set anything. merged_env.update(env) source_dir = 'llvm' # Should match the one used in getClangCMakeBuildFactory. stage1_build_dir = 'stage1' # Should match the one defined in getClangCMakeBuildFactory. stage2_build_dir = 'stage2' # Should match the one defined in getClangCMakeBuildFactory. if useTwoStage: clang_build_dir = stage2_build_dir else: clang_build_dir = stage1_build_dir # Build clang first. f = ClangBuilder.getClangCMakeBuildFactory( clean=always_clean, test=test, cmake=cmake, extra_cmake_args=extra_cmake_args, jobs=jobs, env=merged_env, useTwoStage=useTwoStage, stage1_config=stage1_config, stage2_config=stage2_config) # Checkout the test-suite. f.addStep( SVN(name='svn-test-suite', mode='update', baseURL='http://llvm.org/svn/llvm-project/test-suite/', defaultBranch='trunk', workdir='test-suite')) # Run the ABI test. abi_test_env = { 'PYTHONPATH': WithProperties("%(workdir)s/" + source_dir + "/utils/lit:${PYTHONPATH}"), 'PATH': WithProperties("%(workdir)s/" + clang_build_dir + "/bin:${PATH}"), } merged_env.update(abi_test_env) abi_test_cmd = ["python", "linux-x86.py", "clang", "test", "-v"] if jobs: abi_test_cmd.append("-j" + str(jobs)) f.addStep( LitTestCommand(name='abi-test-suite', command=abi_test_cmd, description=["running", "ABI", "test-suite"], descriptionDone=["ABI", "test-suite", "completed"], workdir='test-suite/ABI-Testsuite', env=merged_env)) return f
# RUN: python %s import zorg from zorg.buildbot.builders import ClangBuilder from zorg.buildbot.builders import SanitizerBuilder # Just check that we can instantiate the build factors, what else can we do? print ClangBuilder.getClangBuildFactory() print SanitizerBuilder.getSanitizerBuildFactory()
def _get_clang_builders(): return [ {'name': "clang-atom-d525-fedora-rel", 'slavenames':["atom1-buildbot"], 'builddir':"clang-atom-d525-fedora-rel", 'factory' : ClangBuilder.getClangBuildFactory(stage1_config='Release+Asserts')}, # {'name': "clang-x86_64-ubuntu", # 'slavenames':["arxan_raphael"], # 'builddir':"clang-x86_64-ubuntu", # 'factory' : ClangBuilder.getClangBuildFactory(extra_configure_args=['--enable-shared'])}, {'name': "clang-native-arm-cortex-a9", 'slavenames':["as-bldslv1", "as-bldslv2", "as-bldslv3"], 'builddir':"clang-native-arm-cortex-a9", 'factory' : ClangBuilder.getClangBuildFactory( stage1_config='Release+Asserts', clean=False, env = { 'CXXFLAGS' : '-Wno-psabi', 'CFLAGS' : '-Wno-psabi'}, extra_configure_args=['--build=armv7l-unknown-linux-gnueabihf', '--host=armv7l-unknown-linux-gnueabihf', '--target=armv7l-unknown-linux-gnueabihf', '--with-cpu=cortex-a9', '--with-fpu=neon', '--with-float=hard', '--enable-targets=arm'])}, {'name': "clang-native-arm-cortex-a15", 'slavenames':["linaro-chrome-01"], 'builddir':"clang-native-arm-cortex-a15", 'factory' : ClangBuilder.getClangBuildFactory( stage1_config='Release+Asserts', clean=True, test=True, extra_configure_args=[ '--with-cpu=cortex-a15', '--with-fpu=neon', '--with-float=hard', '--enable-targets=arm'])}, {'name': "clang-native-arm-cortex-a15-self-host", 'slavenames':["linaro-chrome-02"], 'builddir':"clang-native-arm-cortex-a15-self-host", 'factory' : ClangBuilder.getClangBuildFactory( stage1_config='Release+Asserts', stage2_config='Release+Asserts', useTwoStage=True, clean=False, test=True, extra_configure_args=[ '--with-cpu=cortex-a15', '--with-fpu=neon', '--with-float=hard', '--enable-targets=arm'])}, {'name' : "clang-native-arm-lnt", 'slavenames':["linaro-chrome-03"], 'builddir':"clang-native-arm-lnt", 'factory' : LNTBuilder.getLNTFactory(triple='armv7l-unknown-linux-gnueabihf', nt_flags=['--cflag', '-mcpu=cortex-a15', '-j2'], jobs=2, use_pty_in_tests=True, clean=False, testerName='LNT-TestOnly-O3', run_cxx_tests=True)}, {'name': "clang-native-mingw32-win7", 'slavenames':["as-bldslv7"], 'builddir':"clang-native-mingw32-win7", 'factory' : ClangBuilder.getClangBuildFactory(triple='i686-pc-mingw32', useTwoStage=True, test=False, stage1_config='Release+Asserts', stage2_config='Release+Asserts')}, {'name' : "clang-ppc64-elf-linux", 'slavenames' :["chinook-clangslave1"], 'builddir' :"clang-ppc64-1", 'factory' : LNTBuilder.getLNTFactory(triple='ppc64-elf-linux1', nt_flags=['--multisample=3','--cflag','-mcpu=native'], jobs=2, use_pty_in_tests=True, testerName='O3-plain', run_cxx_tests=True)}, {'name' : "clang-ppc64-elf-linux2", 'slavenames' :["chinook-clangslave2"], 'builddir' :"clang-ppc64-2", 'factory' : ClangBuilder.getClangBuildFactory(triple='ppc64-elf-linux', useTwoStage=True, test=True, checkout_compiler_rt=True, stage1_config='Release+Asserts', stage2_config='Release+Asserts')}, {'name': "clang-x86_64-linux-vg", 'slavenames':["osu8"], 'builddir':"clang-x86_64-linux-vg", 'factory': ClangBuilder.getClangBuildFactory(valgrind=True)}, {'name' : "clang-x86_64-linux-selfhost-rel", 'slavenames' : ["osu8"], 'builddir' : "clang-x86_64-linux-selfhost-rel", 'factory' : ClangBuilder.getClangBuildFactory(triple='x86_64-pc-linux-gnu', useTwoStage=True, stage1_config='Release+Asserts', stage2_config='Release+Asserts')}, {'name' : "clang-x86_64-linux-fnt", 'slavenames' : ['osu8'], 'builddir' : "clang-x86_64-linux-fnt", 'factory' : NightlytestBuilder.getFastNightlyTestBuildFactory(triple='x86_64-pc-linux-gnu', stage1_config='Release+Asserts', test=False, xfails=clang_x86_64_linux_xfails)}, {'name': "clang-mergefunc-x86_64-freebsd", 'slavenames':["as-bldslv5"], 'builddir':"clang-mergefunc-x86_64-freebsd", 'factory' : NightlytestBuilder.getFastNightlyTestBuildFactory(triple='x86_64-unknown-freebsd10.0', stage1_config='Release+Asserts', merge_functions=True, make='gmake', test=False, env={'CC' : '/usr/local/bin/gcc49', 'CXX' : '/usr/local/bin/g++49'}, xfails=clang_x86_64_freebsd_xfails)}, # Clang cross builders. {'name' : "clang-x86_64-darwin13-cross-mingw32", 'slavenames' :["as-bldslv9"], 'builddir' :"clang-x86_64-darwin13-cross-mingw32", 'factory' : ClangBuilder.getClangBuildFactory(outOfDir=True, use_pty_in_tests=True, test=False, env = { 'CC' : 'clang', 'CXX' : 'clang++', 'CXXFLAGS' : '-stdlib=libc++'}, extra_configure_args=['--build=x86_64-apple-darwin13', '--host=x86_64-apple-darwin13', '--target=i686-pc-mingw32'])}, {'name' : "clang-x86_64-darwin13-cross-arm", 'slavenames' :["as-bldslv9"], 'builddir' :"clang-x86_64-darwin13-cross-arm", 'factory' : ClangBuilder.getClangBuildFactory(outOfDir=True, use_pty_in_tests=True, env = { 'CC' : 'clang', 'CXX' : 'clang++', 'CXXFLAGS' : '-stdlib=libc++'}, test=False, extra_configure_args=['--build=x86_64-apple-darwin13', '--host=x86_64-apple-darwin13', '--target=arm-eabi', '--enable-targets=arm'])}, {'name' : "clang-x86_64-ubuntu-gdb-75", 'slavenames' :["hpproliant1"], 'builddir' :"clang-x86_64-ubuntu-gdb-75", 'factory' : ClangBuilder.getClangBuildFactory(stage1_config='Release+Asserts', run_modern_gdb=True, clean=False)}, {'name' : "clang-hexagon-elf", 'slavenames' :["hexagon-build-03"], 'builddir' :"clang-hexagon-elf", 'factory' : ClangBuilder.getClangBuildFactory( triple='x86_64-linux-gnu', stage1_config='Release+Asserts', extra_configure_args=['--enable-shared', '--target=hexagon-unknown-elf', '--enable-targets=hexagon'])}, {'name' : "clang-aarch64-lnt", 'slavenames' :["aarch64-qemu-lnt"], 'builddir' :"clang-aarch64-lnt", 'factory' : LNTBuilder.getLNTFactory(triple='aarch64-linux-gnu', nt_flags=['--llvm-arch=AArch64', '-j4'], package_cache="http://webkit.inf.u-szeged.hu/llvm/", jobs=4, use_pty_in_tests=True, clean=False, testerName='LNT-TestOnly-AArch64', run_cxx_tests=True)}, {'name': "perf-x86_64-penryn-O3", 'slavenames':["pollyperf2", "pollyperf3", "pollyperf4", "pollyperf5", "pollyperf15"], 'builddir':"perf-x86_64-penryn-O3", 'factory': PollyBuilder.getPollyLNTFactory(triple="x86_64-pc-linux-gnu", nt_flags=['--multisample=10'], reportBuildslave=False, package_cache="http://parkas1.inria.fr/packages", submitURL='http://llvm.org/perf/submitRun', testerName='x86_64-penryn-O3')}, ]
def construct_compiler_builder_from_name(name, use_lto=False, incremental=False): # Compiler builds are named following: # <compiler>-<host arch>-<host os>-[<build cc>-]<build style>. # if <build cc> is unspecified, then the most recent validated build # for this builder will be used as <build cc> # This can be undesirable. e.g. when building a Debug+Asserts compiler # for the time being, DA builds will bootstrap with the most recent # validated RA build # At the moment, if anything is specified as <build cc> the build factory # will default to host's default compiler # Hack around x86_64 problem for now, to avoid changing builder names yet. # # FIXME: Use a better mangling. params = name.replace("x86_64", "x86$64").split('_') if len(params) == 2: name, branch = params name = name.replace("x86$64", "x86_64") params = name.replace('llvm-gcc', 'llvm$gcc').split('-') params = [p.replace('llvm$gcc', 'llvm-gcc') for p in params] if len(params) == 4: compiler, host_arch, host_os, build_style = params build_cc = None elif len(params) == 5: compiler, host_arch, host_os, build_cc, build_style = params else: raise ValueError, "invalid builder name: %r" % name # Check if this is an MSVC builder. if host_os == 'xp': if compiler == 'clang': # FIXME: This isn't using the host arch, build cc or if (host_arch != 'i386' or build_cc != 'msvc9' or build_style != 'DA'): raise ValueError, "invalid builder name: %r" % name # FIXME: Shouldn't have to hard code jobs or cmake path here. return { 'factory': ClangBuilder.getClangMSVCBuildFactory( cmake=r"c:\Program Files\CMake 2.8\bin\cmake", jobs=4) } else: raise NotImplementedError target_triple = '%s-apple-%s' % (host_arch, host_os) config_options = [ '--build=%s' % target_triple, '--host=%s' % target_triple ] if build_style in ['DA', 'DAlto', 'DAincremental']: build_config = "Debug+Asserts" config_options.extend(['--disable-optimized']) config_options.extend(['--enable-assertions']) elif build_style in ['RA', 'RAlto', 'RAincremental']: build_config = "Release+Asserts" config_options.extend(['--enable-optimized']) config_options.extend(['--enable-assertions']) elif build_style in ['R', 'Rlto', 'Rincremental']: build_config = "Release" config_options.extend(['--enable-optimized']) config_options.extend(['--disable-assertions']) else: raise ValueError, "invalid build style: %r" % build_style # Passing is_bootstrap==False will specify the stage 1 compiler as the # latest validated apple-clang style compiler. # build_cc must be set for a bootstrapped compiler if compiler == 'clang': if host_os == 'darwin11': config_options.extend(['--enable-libcpp']) return { 'factory': ClangBuilder.phasedClang(config_options, is_bootstrap=(build_cc is None), use_lto=use_lto, incremental=incremental) } elif compiler == 'llvm-gcc': # Currently, llvm-gcc builders do their own two-stage build, # they don't use any prebuilt artifacts. # Set the gxxincludedir. if host_os == 'darwin9': gxxincludedir = "/usr/include/c++/4.0.0" elif host_os == 'darwin11': gxxincludedir = "/usr/include/c++/v1" else: gxxincludedir = "/usr/include/c++/4.2.1" # Construct the GCC style build triple: if host_arch == "i386" and host_os.startswith("darwin"): triple = 'i686-apple-%s' % host_os elif host_arch == "x86_64" and host_os.startswith("darwin"): triple = 'x86_64-apple-%s' % host_os else: raise ValueError, "invalid builder name: %r" % name dst = rsync_user + '@' + master_name + ':~/artifacts/' + name + '/' return { 'factory': LLVMGCCBuilder.getLLVMGCCBuildFactory(jobs='%(jobs)s', triple=triple, gxxincludedir=gxxincludedir, stage1_config=build_config, stage2_config=build_config, package_dst=dst) } else: raise NotImplementedError
reportBuildslave=False, package_cache="http://parkas1.inria.fr/packages", submitURL='http://llvm.org/perf/submitRun', testerName='x86_64-penryn-O3')}, ] # Offline. {'name': "clang-native-arm-cortex-a15", 'slavenames':["linaro-chrome-01"], 'builddir':"clang-native-arm-cortex-a15", 'factory' : ClangBuilder.getClangBuildFactory( stage1_config='Release+Asserts', clean=False, env = { 'CXXFLAGS' : '-Wno-psabi', 'CFLAGS' : '-Wno-psabi'}, extra_configure_args=['--build=armv7l-unknown-linux-gnueabihf', '--host=armv7l-unknown-linux-gnueabihf', '--target=armv7l-unknown-linux-gnueabihf', '--with-cpu=cortex-a15', '--with-fpu=neon', '--with-float=hard', '--enable-targets=arm'])}, {'name': "clang-i386-auroraux", 'slavenames':["evocallaghan"], 'builddir':"clang-i386-auroraux", 'factory': ClangBuilder.getClangBuildFactory("i386-pc-auroraux", jobs="%(jobs)s", make='gmake')}, {'name': "clang-x86_64-linux", 'slavenames':["gcc14"], 'builddir':"clang-x86_64-linux", 'factory': ClangBuilder.getClangBuildFactory(examples=True)}, {'name': "clang-i686-linux",