diff options
Diffstat (limited to 'build_files/buildbot/slave_compile.py')
-rw-r--r-- | build_files/buildbot/slave_compile.py | 46 |
1 files changed, 17 insertions, 29 deletions
diff --git a/build_files/buildbot/slave_compile.py b/build_files/buildbot/slave_compile.py index a339688c06a..685c769fb0c 100644 --- a/build_files/buildbot/slave_compile.py +++ b/build_files/buildbot/slave_compile.py @@ -52,9 +52,8 @@ if 'cmake' in builder: build_dir = os.path.abspath(os.path.join('..', 'build', builder)) install_dir = os.path.abspath(os.path.join('..', 'install', builder)) targets = ['blender'] + command_prefix = [] - chroot_name = None # If not None command will be delegated to that chroot - build_cubins = True # Whether to build Cycles CUDA kernels bits = 64 # Config file to be used (relative to blender's sources root) @@ -79,31 +78,26 @@ if 'cmake' in builder: cmake_options.extend(['-G', 'Visual Studio 15 2017']) elif builder.startswith('linux'): + cmake_config_file = "build_files/buildbot/config/blender_linux.cmake" + cmake_player_config_file = "build_files/buildbot/config/blender_linux_player.cmake" + targets = ['player', 'blender'] tokens = builder.split("_") glibc = tokens[1] if glibc == 'glibc224': deb_name = "stretch" - elif glibc == 'glibc219': - deb_name = "jessie" - elif glibc == 'glibc211': - deb_name = "squeeze" - cmake_config_file = "build_files/buildbot/config/blender_linux.cmake" - cmake_player_config_file = "build_files/buildbot/config/blender_linux_player.cmake" - if builder.endswith('x86_64_cmake'): - chroot_name = 'buildbot_' + deb_name + '_x86_64' - targets = ['player', 'blender'] - elif builder.endswith('i686_cmake'): - bits = 32 - chroot_name = 'buildbot_' + deb_name + '_i686' - targets = ['player', 'blender'] - if deb_name != "stretch": - cmake_extra_options.extend(["-DCMAKE_C_COMPILER=/usr/bin/gcc-7", - "-DCMAKE_CXX_COMPILER=/usr/bin/g++-7"]) + if builder.endswith('x86_64_cmake'): + chroot_name = 'buildbot_' + deb_name + '_x86_64' + elif builder.endswith('i686_cmake'): + bits = 32 + chroot_name = 'buildbot_' + deb_name + '_i686' + command_prefix = ['schroot', '-c', chroot_name, '--'] + elif glibc == 'glibc217': + command_prefix = ['scl', 'enable', 'devtoolset-6', '--'] cmake_options.append("-C" + os.path.join(blender_dir, cmake_config_file)) # Prepare CMake options needed to configure cuda binaries compilation, 64bit only. - if bits == 64 and build_cubins: + if bits == 64: cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=ON") cmake_options.append("-DCUDA_64_BIT_DEVICE_CODE=ON") else: @@ -113,12 +107,6 @@ if 'cmake' in builder: cmake_options += cmake_extra_options - # Prepare chroot command prefix if needed - if chroot_name: - chroot_prefix = ['schroot', '-c', chroot_name, '--'] - else: - chroot_prefix = [] - # Make sure no garbage remained from the previous run if os.path.isdir(install_dir): shutil.rmtree(install_dir) @@ -127,7 +115,7 @@ if 'cmake' in builder: print("Building target %s" % (target)) # Construct build directory name based on the target target_build_dir = build_dir - target_chroot_prefix = chroot_prefix[:] + target_command_prefix = command_prefix[:] if target != 'blender': target_build_dir += '_' + target target_name = 'install' @@ -141,7 +129,7 @@ if 'cmake' in builder: print("Fetching remotes") command = ['git', 'fetch', '--all'] print(command) - retcode = subprocess.call(target_chroot_prefix + command) + retcode = subprocess.call(target_command_prefix + command) if retcode != 0: sys.exit(retcode) # Make sure build directory exists and enter it @@ -160,7 +148,7 @@ if 'cmake' in builder: if os.path.exists(full_path): print("Removing {}" . format(buildinfo)) os.remove(full_path) - retcode = subprocess.call(target_chroot_prefix + ['cmake', blender_dir] + target_cmake_options) + retcode = subprocess.call(target_command_prefix + ['cmake', blender_dir] + target_cmake_options) if retcode != 0: print('Configuration FAILED!') sys.exit(retcode) @@ -172,7 +160,7 @@ if 'cmake' in builder: print("Executing command:") print(command) - retcode = subprocess.call(target_chroot_prefix + command) + retcode = subprocess.call(target_command_prefix + command) if retcode != 0: sys.exit(retcode) |