[Bf-blender-cvs] [5e5f2ead437] master: Fix T56557: wrong hash in Windows buildbot builds.

Brecht Van Lommel noreply at git.blender.org
Mon Aug 27 20:00:06 CEST 2018


Commit: 5e5f2ead437a5bcabfbc7557d87ca0c091460625
Author: Brecht Van Lommel
Date:   Mon Aug 27 19:35:46 2018 +0200
Branches: master
https://developer.blender.org/rB5e5f2ead437a5bcabfbc7557d87ca0c091460625

Fix T56557: wrong hash in Windows buildbot builds.

===================================================================

M	build_files/buildbot/slave_compile.py

===================================================================

diff --git a/build_files/buildbot/slave_compile.py b/build_files/buildbot/slave_compile.py
index bf8f9f15751..eb204cd1c00 100644
--- a/build_files/buildbot/slave_compile.py
+++ b/build_files/buildbot/slave_compile.py
@@ -48,7 +48,7 @@ if 'cmake' in builder:
     # cmake
 
     # Some fine-tuning configuration
-    blender_dir = os.path.join('..', blender_dir)
+    blender_dir = os.path.abspath(blender_dir)
     build_dir = os.path.abspath(os.path.join('..', 'build', builder))
     install_dir = os.path.abspath(os.path.join('..', 'install', builder))
     targets = ['blender']
@@ -159,10 +159,6 @@ if 'cmake' in builder:
         if target != 'blender':
             target_build_dir += '_' + target
         target_name = 'install'
-        # Make sure build directory exists and enter it
-        if not os.path.isdir(target_build_dir):
-            os.mkdir(target_build_dir)
-        os.chdir(target_build_dir)
         # Tweaking CMake options to respect the target
         target_cmake_options = cmake_options[:]
         if target == 'player':
@@ -175,6 +171,19 @@ if 'cmake' in builder:
         # other targets don't compile cuda binaries.
         if 'cuda' in targets and target != 'cuda':
             target_cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=OFF")
+        # Do extra git fetch because not all platform/git/buildbot combinations
+        # update the origin remote, causing buildinfo to detect local changes.
+        os.chdir(blender_dir)
+        print("Fetching remotes")
+        command = ['git', 'fetch', '--all']
+        print(command)
+        retcode = subprocess.call(target_chroot_prefix + command)
+        if retcode != 0:
+            sys.exit(retcode)
+        # Make sure build directory exists and enter it
+        if not os.path.isdir(target_build_dir):
+            os.mkdir(target_build_dir)
+        os.chdir(target_build_dir)
         # Configure the build
         print("CMake options:")
         print(target_cmake_options)
@@ -189,11 +198,11 @@ if 'cmake' in builder:
         if 'win32' in builder or 'win64' in builder:
             command = ['cmake', '--build', '.', '--target', target_name, '--config', 'Release']
         else:
-            command = target_chroot_prefix + ['make', '-s', '-j2', target_name]
+            command = ['make', '-s', '-j2', target_name]
 
         print("Executing command:")
         print(command)
-        retcode = subprocess.call(command)
+        retcode = subprocess.call(target_chroot_prefix + command)
 
         if retcode != 0:
             sys.exit(retcode)



More information about the Bf-blender-cvs mailing list