Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'build_files/buildbot/worker_compile.py')
-rw-r--r--build_files/buildbot/worker_compile.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/build_files/buildbot/worker_compile.py b/build_files/buildbot/worker_compile.py
index 8e19c9436f8..266f9e65313 100644
--- a/build_files/buildbot/worker_compile.py
+++ b/build_files/buildbot/worker_compile.py
@@ -23,6 +23,7 @@ import shutil
import buildbot_utils
+
def get_cmake_options(builder):
codesign_script = os.path.join(
builder.blender_dir, 'build_files', 'buildbot', 'worker_codesign.cmake')
@@ -44,11 +45,24 @@ def get_cmake_options(builder):
optix_sdk_dir = os.path.join(builder.blender_dir, '..', '..', 'NVIDIA-Optix-SDK')
options.append('-DOPTIX_ROOT_DIR:PATH=' + optix_sdk_dir)
+ # Workaround to build sm_30 kernels with CUDA 10, since CUDA 11 no longer supports that architecture
+ if builder.platform == 'win':
+ options.append('-DCUDA10_TOOLKIT_ROOT_DIR:PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1')
+ options.append('-DCUDA10_NVCC_EXECUTABLE:FILEPATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/bin/nvcc.exe')
+ options.append('-DCUDA11_TOOLKIT_ROOT_DIR:PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1')
+ options.append('-DCUDA11_NVCC_EXECUTABLE:FILEPATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1/bin/nvcc.exe')
+ elif builder.platform == 'linux':
+ options.append('-DCUDA10_TOOLKIT_ROOT_DIR:PATH=/usr/local/cuda-10.1')
+ options.append('-DCUDA10_NVCC_EXECUTABLE:FILEPATH=/usr/local/cuda-10.1/bin/nvcc')
+ options.append('-DCUDA11_TOOLKIT_ROOT_DIR:PATH=/usr/local/cuda-11.1')
+ options.append('-DCUDA11_NVCC_EXECUTABLE:FILEPATH=/usr/local/cuda-11.1/bin/nvcc')
+
options.append("-C" + os.path.join(builder.blender_dir, config_file))
options.append("-DCMAKE_INSTALL_PREFIX=%s" % (builder.install_dir))
return options
+
def update_git(builder):
# Do extra git fetch because not all platform/git/buildbot combinations
# update the origin remote, causing buildinfo to detect local changes.
@@ -58,6 +72,7 @@ def update_git(builder):
command = ['git', 'fetch', '--all']
buildbot_utils.call(builder.command_prefix + command)
+
def clean_directories(builder):
# Make sure no garbage remained from the previous run
if os.path.isdir(builder.install_dir):
@@ -73,6 +88,7 @@ def clean_directories(builder):
print("Removing {}" . format(buildinfo))
os.remove(full_path)
+
def cmake_configure(builder):
# CMake configuration
os.chdir(builder.build_dir)
@@ -87,6 +103,7 @@ def cmake_configure(builder):
command = ['cmake', builder.blender_dir] + cmake_options
buildbot_utils.call(builder.command_prefix + command)
+
def cmake_build(builder):
# CMake build
os.chdir(builder.build_dir)
@@ -109,6 +126,7 @@ def cmake_build(builder):
print("CMake build:")
buildbot_utils.call(builder.command_prefix + command)
+
if __name__ == "__main__":
builder = buildbot_utils.create_builder_from_arguments()
update_git(builder)