diff options
Diffstat (limited to 'build_files/buildbot/slave_compile.py')
-rw-r--r-- | build_files/buildbot/slave_compile.py | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/build_files/buildbot/slave_compile.py b/build_files/buildbot/slave_compile.py index 0da0ead819f..f8bab19a1e9 100644 --- a/build_files/buildbot/slave_compile.py +++ b/build_files/buildbot/slave_compile.py @@ -18,13 +18,19 @@ # <pep8 compliant> -import buildbot_utils import os import shutil +import buildbot_utils + def get_cmake_options(builder): + post_install_script = os.path.join( + builder.blender_dir, 'build_files', 'buildbot', 'slave_codesign.cmake') + config_file = "build_files/cmake/config/blender_release.cmake" - options = ['-DCMAKE_BUILD_TYPE:STRING=Release', '-DWITH_GTESTS=ON'] + options = ['-DCMAKE_BUILD_TYPE:STRING=Release', + '-DWITH_GTESTS=ON', + '-DPOSTINSTALL_SCRIPT:PATH=' + post_install_script] if builder.platform == 'mac': options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64') @@ -84,6 +90,16 @@ def cmake_build(builder): # CMake build os.chdir(builder.build_dir) + # NOTE: CPack will build an INSTALL target, which would mean that code + # signing will happen twice when using `make install` and CPack. + # The tricky bit here is that it is not possible to know whether INSTALL + # target is used by CPack or by a buildbot itaself. Extra level on top of + # this is that on Windows it is required to build INSTALL target in order + # to have unit test binaries to run. + # So on the one hand we do an extra unneeded code sign on Windows, but on + # a positive side we don't add complexity and don't make build process more + # fragile trying to avoid this. The signing process is way faster than just + # a clean build of buildbot, especially with regression tests enabled. if builder.platform == 'win': command = ['cmake', '--build', '.', '--target', 'install', '--config', 'Release'] else: |