[Bf-blender-cvs] [6b06c49] buildbot_linux_cmake: Buildbot: Use proper archive name for linux cmake slave
Sergey Sharybin
noreply at git.blender.org
Mon Nov 30 20:08:44 CET 2015
Commit: 6b06c49c944d756ebbdd80b78a65e0184969a2ee
Author: Sergey Sharybin
Date: Mon Nov 30 19:51:36 2015 +0100
Branches: buildbot_linux_cmake
https://developer.blender.org/rB6b06c49c944d756ebbdd80b78a65e0184969a2ee
Buildbot: Use proper archive name for linux cmake slave
===================================================================
M build_files/buildbot/slave_pack.py
===================================================================
diff --git a/build_files/buildbot/slave_pack.py b/build_files/buildbot/slave_pack.py
index 21b9291..80004e9 100644
--- a/build_files/buildbot/slave_pack.py
+++ b/build_files/buildbot/slave_pack.py
@@ -165,13 +165,19 @@ else:
if builder.endswith('x86_64_cmake'):
chroot_name = 'buildbot_squeeze_x86_64'
bits = 64
+ blender_arch = 'x86_64'
elif builder.endswith('i686_cmake'):
chroot_name = 'buildbot_squeeze_i686'
bits = 32
+ blender_arch = 'i686'
+ # Strip all unused symbols from the binaries
print("Stripping binaries...")
- subprocess.call(['schroot', '-c', chroot_name, '--', 'strip', '--strip-all', blender, blenderplayer])
+ chroot_prefix = ['schroot', '-c', chroot_name, '--']
+ subprocess.call(chroot_prefix + ['strip', '--strip-all', blender, blenderplayer])
+ # Copy all specific files which are too specific to be copied by
+ # the CMake rules themselves
print("Copying extra scripts and libs...")
extra = '/' + os.path.join('home', 'sources', 'release-builder', 'extra')
@@ -184,14 +190,22 @@ else:
os.system('cp -r %s %s' % (icons, install_dir))
os.system('chmod 755 %s' % (os.path.join(install_dir, 'blender-softwaregl')))
+ # Get version information for the archive name
+ lines = subprocess.check_output(chroot_prefix + [os.path.join(install_dir, 'blender'), '--version']).split("\n")
+ blender_version = lines[0].split(' ')[1]
+ blender_hash = 'UNKNOWN'
+ blender_glibc = builder.split('_')[1]
+ for line in lines:
+ line = line.strip()
+ if line.startswith("build hash:"):
+ blender_hash = line.split(' ')[-1]
+
+ upload_filename = 'blender-%s-%s-linux-%s-%s.tar.bz2' % (blender_version,
+ blender_hash,
+ blender_glibc,
+ blender_arch)
if branch != '':
- builderified_name = branch + "-" + builderified_name
-
- # TODO(sergey): Need to use proper name
- upload_filename = 'blender'
- if branch != '':
- upload_filename = branch + upload_filename
- upload_filename += '.tar.bz2'
+ upload_filename = branch + "-" + upload_filename
print("Creating .tar.bz2 archive")
os.system('tar -C../install -cjf %s.tar.bz2 %s' % (builder, builder))
@@ -242,8 +256,6 @@ try:
if os.path.exists(upload_zip):
os.remove(upload_zip)
z = zipfile.ZipFile(upload_zip, "w", compression=zipfile.ZIP_STORED)
- print(upload_filename)
- print(upload_filepath)
z.write(upload_filepath, arcname=upload_filename)
z.close()
except Exception as ex:
More information about the Bf-blender-cvs
mailing list