Initial support of linux 32/64 bit for buildbot:

- Use the same config as we're using for release builds
- Added stipping (maybe it should be generalized)
- Not software gl packing, bot would be easy to add

Note, that you should have special environment to create
proper linux builts (which would work for everybody)
This commit is contained in:
Sergey Sharybin 2011-04-01 21:22:19 +00:00
parent 367cf47dd6
commit 485229b7db
7 changed files with 417 additions and 13 deletions

View File

@ -0,0 +1,85 @@
BF_BUILDDIR = '../blender-build/linux-glibc27-i686'
BF_INSTALLDIR = '../blender-install/linux-glibc27-i686'
# Python configuration
BF_PYTHON_VERSION = '3.2'
BF_PYTHON_ABI_FLAGS = 'mu'
BF_PYTHON = '/opt/python3.2'
WITH_BF_STATICPYTHON = True
# OpenCollada configuration
WITH_BF_COLLADA = True
BF_OPENCOLLADA = '/opt/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver buffer ftoa libxml2-static libexpat-static libpcre-static'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib /home/sources/staticlibs/lib32'
BF_PCRE_LIB = ''
BF_EXPAT_LIB = ''
# FFMPEG configuration
WITH_BF_FFMPEG = True
WITH_BF_STATICFFMPEG = True
# Used for linking against system ffmpeg, but it gives pixelization,, so fall back to ffmpeg from 2.52 temporary
#BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libswscale.a ' + \
# '${BF_FFMPEG_LIBPATH}/libavutil.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ${BF_FFMPEG_LIBPATH}/libdc1394.a ' + \
# '${BF_FFMPEG_LIBPATH}/libraw1394.a ${BF_FFMPEG_LIBPATH}/libdirac_encoder.a ${BF_FFMPEG_LIBPATH}/libschroedinger-1.0.a ' + \
# '${BF_FFMPEG_LIBPATH}/libfaad.a ${BF_FFMPEG_LIBPATH}/libtheora.a ' + \
# '${BF_FFMPEG_LIBPATH}/libspeex.a ${BF_FFMPEG_LIBPATH}/libbz2.a ${BF_FFMPEG_LIBPATH}/liboil-0.3.a ${BF_FFMPEG_LIBPATH}/libogg.a ' + \
# '${BF_FFMPEG_LIBPATH}/libvorbisenc.a ${BF_FFMPEG_LIBPATH}/libvorbis.a ${BF_FFMPEG_LIBPATH}/libgsm.a'
BF_FFMPEG = '/home/sources/staticlibs/ffmpeg'
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib32'
BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libextern_libavformat.a ${BF_FFMPEG_LIBPATH}/libextern_libswscale.a ' + \
'${BF_FFMPEG_LIBPATH}/libextern_libavcodec.a ${BF_FFMPEG_LIBPATH}/libextern_libavdevice.a ' + \
'${BF_FFMPEG_LIBPATH}/libextern_libavutil.a ${BF_FFMPEG_LIBPATH}/libextern_xvidcore.a ' + \
'${BF_FFMPEG_LIBPATH}/libextern_libmp3lame.a ${BF_FFMPEG_LIBPATH}/libextern_x264.a'
# Don't depend on system's libstdc++
WITH_BF_STATICCXX = True
BF_CXX_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.3.2/libstdc++.a'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = True
BF_OPENAL_LIB_STATIC = '/opt/openal/lib/libopenal.a'
WITH_BF_GETTEXT_STATIC = True
BF_FREETYPE_LIB_STATIC = True
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = True
WITH_BF_TIFF = True
WITH_BF_STATICTIFF = True
BF_TIFF_LIB_STATIC = '${BF_TIFF}/lib/libtiff.a'
WITH_BF_JPEG = True
BF_JPEG_LIB = 'libjpeg'
BF_JPEG_LIBPATH = '/home/sources/staticlibs/lib32'
WITH_BF_PNG = True
BF_PNG_LIB = 'libpng'
BF_PNG_LIBPATH = '/home/sources/staticlibs/lib32'
WITH_BF_STATICLIBSAMPLERATE = True
WITH_BF_STATICZLIB = True
BF_ZLIB_LIB_STATIC= '${BF_ZLIB}/lib/libz.a'
WITH_BF_SDL = True
WITH_BF_OGG = True
WITH_BF_OPENMP = True
WITH_BF_GAMEENGINE = True
WITH_BF_BULLET = True
# Blender player (would be enabled in it's own config)
WITH_BF_PLAYER = False
# Compilation and optimization
BF_DEBUG = False
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
PLATFORM_LINKFLAGS = ['-L/home/sources/staticlibs/lib32']

View File

@ -0,0 +1,65 @@
BF_BUILDDIR = '../blender-build/linux-glibc27-i686'
BF_INSTALLDIR = '../blender-install/linux-glibc27-i686'
# Python configuration
BF_PYTHON_VERSION = '3.2'
BF_PYTHON_ABI_FLAGS = 'mu'
BF_PYTHON = '/opt/python3.2'
WITH_BF_STATICPYTHON = True
# OpenCollada configuration
WITH_BF_COLLADA = False
# FFMPEG configuration
WITH_BF_FFMPEG = False
# Don't depend on system's libstdc++
WITH_BF_STATICCXX = True
BF_CXX_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.3.2/libstdc++.a'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = True
BF_OPENAL_LIB_STATIC = '/opt/openal/lib/libopenal.a'
WITH_BF_GETTEXT_STATIC = True
BF_FREETYPE_LIB_STATIC = True
WITH_BF_OPENEXR = False
WITH_BF_STATICOPENEXR = True
WITH_BF_TIFF = False
WITH_BF_STATICTIFF = True
BF_TIFF_LIB_STATIC = '${BF_TIFF}/lib/libtiff.a'
WITH_BF_JPEG = True
BF_JPEG_LIB = 'libjpeg'
BF_JPEG_LIBPATH = '/home/sources/staticlibs/lib32'
WITH_BF_PNG = True
BF_PNG_LIB = 'libpng'
BF_PNG_LIBPATH = '/home/sources/staticlibs/lib32'
WITH_BF_STATICLIBSAMPLERATE = True
WITH_BF_ZLIB = False
BF_ZLIB_LIB_STATIC= '${BF_ZLIB}/lib/libz.a'
WITH_BF_STATICZLIB = False
WITH_BF_SDL = True
WITH_BF_OGG = False
WITH_BF_OPENMP = True
WITH_BF_GAMEENGINE = True
WITH_BF_BULLET = True
# Do not build blender when building blenderplayer
WITH_BF_NOBLENDER = True
WITH_BF_PLAYER = True
# Compilation and optimization
BF_DEBUG = False
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
PLATFORM_LINKFLAGS = ['-L/home/sources/staticlibs/lib32']

View File

@ -0,0 +1,65 @@
BF_BUILDDIR = '../blender-build/linux-glibc27-x86_64'
BF_INSTALLDIR = '../blender-install/linux-glibc27-x86_64'
# Python configuration
BF_PYTHON_VERSION = '3.2'
BF_PYTHON_ABI_FLAGS = 'mu'
BF_PYTHON = '/opt/python3.2'
WITH_BF_STATICPYTHON = True
# OpenCollada configuration
WITH_BF_COLLADA = False
# FFMPEG configuration
WITH_BF_FFMPEG = False
# Don't depend on system's libstdc++
WITH_BF_STATICCXX = True
BF_CXX_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libstdc++.a'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = True
BF_OPENAL_LIB_STATIC = '/opt/openal/lib/libopenal.a'
WITH_BF_GETTEXT_STATIC = True
BF_FREETYPE_LIB_STATIC = True
WITH_BF_OPENEXR = False
WITH_BF_STATICOPENEXR = True
WITH_BF_TIFF = False
WITH_BF_STATICTIFF = True
BF_TIFF_LIB_STATIC = '${BF_TIFF}/lib/libtiff.a'
WITH_BF_JPEG = True
BF_JPEG_LIB = 'libjpeg'
BF_JPEG_LIBPATH = '/home/sources/staticlibs/lib64'
WITH_BF_PNG = True
BF_PNG_LIB = 'libpng'
BF_PNG_LIBPATH = '/home/sources/staticlibs/lib64'
WITH_BF_STATICLIBSAMPLERATE = True
WITH_BF_ZLIB = False
BF_ZLIB_LIB_STATIC= '${BF_ZLIB}/lib/libz.a'
WITH_BF_STATICZLIB = False
WITH_BF_SDL = True
WITH_BF_OGG = False
WITH_BF_OPENMP = True
WITH_BF_GAMEENGINE = True
WITH_BF_BULLET = True
# Do not build blender when building blenderplayer
WITH_BF_NOBLENDER = True
WITH_BF_PLAYER = True
# Compilation and optimization
BF_DEBUG = False
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
PLATFORM_LINKFLAGS = ['-L/home/sources/staticlibs/lib64']

View File

@ -0,0 +1,85 @@
BF_BUILDDIR = '../blender-build/linux-glibc27-x86_64'
BF_INSTALLDIR = '../blender-install/linux-glibc27-x86_64'
# Python configuration
BF_PYTHON_VERSION = '3.2'
BF_PYTHON_ABI_FLAGS = 'mu'
BF_PYTHON = '/opt/python3.2'
WITH_BF_STATICPYTHON = True
# OpenCollada configuration
WITH_BF_COLLADA = True
BF_OPENCOLLADA = '/opt/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver buffer ftoa libxml2-static libexpat-static libpcre-static'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib /home/sources/staticlibs/lib64'
BF_PCRE_LIB = ''
BF_EXPAT_LIB = ''
# FFMPEG configuration
WITH_BF_FFMPEG = True
WITH_BF_STATICFFMPEG = True
# Used for linking against system ffmpeg, but it gives pixelization,, so fall back to ffmpeg from 2.52 temporary
#BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libswscale.a ' + \
# '${BF_FFMPEG_LIBPATH}/libavutil.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ${BF_FFMPEG_LIBPATH}/libdc1394.a ' + \
# '${BF_FFMPEG_LIBPATH}/libraw1394.a ${BF_FFMPEG_LIBPATH}/libdirac_encoder.a ${BF_FFMPEG_LIBPATH}/libschroedinger-1.0.a ' + \
# '${BF_FFMPEG_LIBPATH}/libfaad.a ${BF_FFMPEG_LIBPATH}/libtheora.a ' + \
# '${BF_FFMPEG_LIBPATH}/libspeex.a ${BF_FFMPEG_LIBPATH}/libbz2.a ${BF_FFMPEG_LIBPATH}/liboil-0.3.a ${BF_FFMPEG_LIBPATH}/libogg.a ' + \
# '${BF_FFMPEG_LIBPATH}/libvorbisenc.a ${BF_FFMPEG_LIBPATH}/libvorbis.a ${BF_FFMPEG_LIBPATH}/libgsm.a'
BF_FFMPEG = '/home/sources/staticlibs/ffmpeg'
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib64'
BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libextern_libavformat.a ${BF_FFMPEG_LIBPATH}/libextern_libswscale.a ' + \
'${BF_FFMPEG_LIBPATH}/libextern_libavcodec.a ${BF_FFMPEG_LIBPATH}/libextern_libavdevice.a ' + \
'${BF_FFMPEG_LIBPATH}/libextern_libavutil.a ${BF_FFMPEG_LIBPATH}/libextern_xvidcore.a ' + \
'${BF_FFMPEG_LIBPATH}/libextern_libmp3lame.a ${BF_FFMPEG_LIBPATH}/libextern_x264.a'
# Don't depend on system's libstdc++
WITH_BF_STATICCXX = True
BF_CXX_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libstdc++.a'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = True
BF_OPENAL_LIB_STATIC = '/opt/openal/lib/libopenal.a'
WITH_BF_GETTEXT_STATIC = True
BF_FREETYPE_LIB_STATIC = True
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = True
WITH_BF_TIFF = True
WITH_BF_STATICTIFF = True
BF_TIFF_LIB_STATIC = '${BF_TIFF}/lib/libtiff.a'
WITH_BF_JPEG = True
BF_JPEG_LIB = 'libjpeg'
BF_JPEG_LIBPATH = '/home/sources/staticlibs/lib64'
WITH_BF_PNG = True
BF_PNG_LIB = 'libpng'
BF_PNG_LIBPATH = '/home/sources/staticlibs/lib64'
WITH_BF_STATICLIBSAMPLERATE = True
WITH_BF_STATICZLIB = True
BF_ZLIB_LIB_STATIC= '${BF_ZLIB}/lib/libz.a'
WITH_BF_SDL = True
WITH_BF_OGG = True
WITH_BF_OPENMP = True
WITH_BF_GAMEENGINE = True
WITH_BF_BULLET = True
# Blender player (would be enabled in it's own config)
WITH_BF_PLAYER = False
# Compilation and optimization
BF_DEBUG = False
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
PLATFORM_LINKFLAGS = ['-L/home/sources/staticlibs/lib64']

View File

@ -56,5 +56,67 @@ else:
os.chdir(blender_dir)
scons_options = []
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
sys.exit(retcode)
if builder.startswith('linux'):
import shutil
cores = 1
if hasattr(os, 'sysconf'):
if 'SC_NPROCESSORS_ONLN' in os.sysconf_names:
cores = os.sysconf('SC_NPROCESSORS_ONLN')
if cores > 1:
# there're two chroot environments in one machine,
# so use only a half of power for better performance
cores = cores / 2
# We're using the same rules as release builder, so tweak
# build and install dirs
build_dir = os.path.join('..', 'build', builder)
install_dir = os.path.join('..', 'install', builder)
common_options = ['BF_NUMJOBS=' + str(cores),
'BF_BUILDDIR=' + build_dir,
'BF_INSTALLDIR=' + install_dir]
# Clean all directories first
retcode = subprocess.call(['python', 'scons/scons.py'] + common_options + ['clean'])
if retcode != 0:
print('Error cleaning build directory')
sys.exit(retcode)
if os.path.isdir(install_dir):
shutil.rmtree(install_dir)
buildbot_dir = os.path.dirname(os.path.realpath(__file__))
config_dir = os.path.join(buildbot_dir, 'config')
configs = []
if builder == 'linux_x86_64_scons':
configs = ['user-config-player-x86_64.py',
'user-config-x86_64.py']
elif builder == 'linux_i386_scons':
configs = ['user-config-player-i686.py',
'user-config-i686.py']
for config in configs:
config_fpath = os.path.join(config_dir, config)
scons_options = []
scons_options += common_options
if config.find('player') == -1:
scons_options.append('blender')
else:
scons_options.append('blenderplayer')
scons_options.append('BF_CONFIG=' + config_fpath)
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
if retcode != 0:
print('Error building rules wuth config ' + config)
sys.exit(retcode)
sys.exit(0)
else:
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
sys.exit(retcode)

View File

@ -37,16 +37,48 @@ builder = sys.argv[1]
# scons does own packaging
if builder.find('scons') != -1:
os.chdir('../blender')
retcode = subprocess.call(['python', 'scons/scons.py', 'BF_QUICK=slnt', 'buildslave'])
sys.exit(retcode)
scons_options = ['BF_QUICK=slnt', 'buildslave']
if builder.startswith('linux'):
buildbot_dir = os.path.dirname(os.path.realpath(__file__))
config_dir = os.path.join(buildbot_dir, 'config')
build_dir = os.path.join('..', 'build', builder)
install_dir = os.path.join('..', 'install', builder)
scons_options += ['WITH_BF_NOBLENDER=True', 'WITH_BF_PLAYER=False',
'BF_BUILDDIR=' + build_dir,
'BF_INSTALLDIR=' + install_dir]
config = None
if builder == 'linux_x86_64_scons':
config = 'user-config-x86_64.py'
elif builder == 'linux_i386_scons':
config = 'user-config-x86_64.py'
if config is not None:
config_fpath = os.path.join(config_dir, config)
scons_options.append('BF_CONFIG=' + config_fpath)
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
if retcode == 0:
blender = os.path.join(install_dir, 'blender')
blenderplayer = os.path.join(install_dir, 'blenderplayer')
subprocess.call(['strip', '--strip-all', blender, blenderplayer])
sys.exit(retcode)
else:
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
sys.exit(retcode)
# clean release directory if it already exists
directory = 'release'
dir = 'release'
if os.path.exists(directory):
for f in os.listdir(directory):
if os.path.isfile(os.path.join(directory, f)):
os.remove(os.path.join(directory, f))
if os.path.exists(dir):
for f in os.listdir(dir):
if os.path.isfile(os.path.join(dir, f)):
os.remove(os.path.join(dir, f))
# create release package
try:
@ -56,7 +88,7 @@ except Exception, ex:
sys.exit(1)
# find release directory, must exist this time
if not os.path.exists(directory):
if not os.path.exists(dir):
sys.stderr.write("Failed to find release directory.\n")
sys.exit(1)
@ -64,8 +96,8 @@ if not os.path.exists(directory):
file = None
filepath = None
for f in os.listdir(directory):
rf = os.path.join(directory, f)
for f in os.listdir(dir):
rf = os.path.join(dir, f)
if os.path.isfile(rf) and f.startswith('blender'):
file = f
filepath = rf

View File

@ -545,8 +545,18 @@ def buildslave(target=None, source=None, env=None):
else:
extension = '.tar.bz2'
platform = env['OURPLATFORM'].split('-')[0]
if platform == 'linux2':
import platform
bitness = platform.architecture()[0]
if bitness == '64bit':
platform = 'linux-glibc27-x86_64'
elif bitness == '32bit':
platform = 'linux-glibc27-i686'
outdir = os.path.abspath(env['BF_INSTALLDIR'])
package_name = 'blender-' + VERSION+'-'+REVISION + '-' + env['OURPLATFORM'].split('-')[0]
package_name = 'blender-' + VERSION+'-'+REVISION + '-' + platform
package_dir = os.path.normpath(outdir + os.sep + '..' + os.sep + package_name)
package_archive = os.path.normpath(outdir + os.sep + '..' + os.sep + package_name + extension)