# -*- python -*- # ex: set syntax=python: ############################################################################# ###### TELASCIENCE - buildslave configuration # # Host: buildbot.osgeo.org / telascience # Author: Mateusz Loskot # import os from osgeo import buildslave import _common as common hostname = 'mloskot-gcc43' slavename = hostname + '-' + common.config['bot']['name'] slavepass = 'goodal#20080731' ############################################################################# ###### CONFIGURATION ### COMMON SETTINGS - buildslave specific settings ### UPDATE THIS SETTING AFTER NEW STABLE BRANCH IS OUT ### __stableBranch = '1.5' __stableBranchUrl = 'branches/' + __stableBranch __cmdConfigure = ['./configure'] + common.autoconfOptions # + ['--with-netcdf=/usr/local', '--with-pg'] __cmdConfigureStable = ['./configure'] # + common.autoconfOptionsStable #+ ['--with-netcdf=/usr/local', '--with-pg'] __cmdCompile = ['make'] __cmdClean = ['make','clean'] __cmdTest = ['make','test'] __cmdInterface = ['make', 'interface'] __cmdEgg = [ 'python', 'setup.py', 'bdist_egg' ] __buildWorkDir = 'build/gdal' __testWorkDir = 'build/autotest' __swigWorkDir = 'build/gdal/swig' __pythonWorkDir = 'build/gdal/swig/python' __csharpWorkDir = 'build/gdal/swig/csharp' __perlWorkDir = 'build/gdal/swig/perl' ### ENVIRONMENT VARIABLES # /OSGEOBUILDHOME/gdal # os.path.join(os.getenv('OSGEOBUILDHOME'), common.config['bot']['name']) __basePath = '/home/mloskot/buildbot/osgeo/gdal' # /OSGEOBUILDHOME/gdal/mloskot-gcc43-quick/build/gdal __quickPath = os.path.join(__basePath, hostname+'-quick', 'build', common.config['bot']['name']) # /OSGEOBUILDHOME/gdal/mloskot-gcc43-full/build/gdal __fullPath = os.path.join(__basePath, hostname+'-full', 'build', common.config['bot']['name']) # /OSGEOBUILDHOME/gdal/mloskot-gcc43-stable/build/gdal __stableBranchPath = os.path.join(__basePath, hostname+'-stable', 'build', common.config['bot']['name']) # LD_LIBRARY_PATH # /OSGEOBUILDHOME/gdal/usr/lib __ldPath = os.path.join(__basePath, 'usr/lib') + ':' __ldPathQuick = __ldPath + __quickPath __ldPathFull = __ldPath + __fullPath __ldPathStableBranch = __ldPath + __stableBranchPath # GDAL_DATA __dataPathQuick = os.path.join(__quickPath, 'data') __dataPathFull = os.path.join(__fullPath, 'data') __dataPathStableBranch = os.path.join(__stableBranchPath, 'data') # PYTHONPATH # dist/GDAL_OGR-1.5.0-py2.4-linux-i686.egg' __eggPath = 'swig/python/dist/GDAL-1.5.0-py2.5-linux-i686.egg' __pyBuildPath = 'swig/python/build/lib.linux-i686-2.5' __pythonPathQuick = os.path.join(__quickPath, __eggPath) __pythonPathFull = os.path.join(__fullPath, __eggPath) __pythonPathStableBranch = os.path.join(__stableBranchPath, __pyBuildPath) ############################################################################# ###### FACTORIES from buildbot.process import factory from buildbot.steps import source from buildbot.steps import shell ### QUICK BUILDER FACTORY factoryQuick = factory.BuildFactory() factoryQuick.addStep(source.SVN( name = 'svn', baseURL = common.config['project']['svnUrl'], defaultBranch = common.config['project']['svnBranch'], mode='update')) factoryQuick.addStep(shell.ShellCommand, name = 'configure', description = ['configuring'], descriptionDone = ['configure'], command = __cmdConfigure, workdir = __buildWorkDir) factoryQuick.addStep(shell.ShellCommand, name = 'make', description = ['compiling'], descriptionDone = ['compile'], command = __cmdCompile, workdir = __buildWorkDir) factoryQuick.addStep(shell.ShellCommand, name = 'egg', description = ['egging'], descriptionDone = ['egg'], command = __cmdEgg, workdir = __pythonWorkDir) factoryQuick.addStep(shell.ShellCommand, name = 'test', description = ['testing'], descriptionDone = ['test'], command = ['./run_all.py'], env = { 'LD_LIBRARY_PATH' : __ldPathQuick, 'PYTHONPATH' : __pythonPathQuick, 'GDAL_DATA' : __dataPathQuick }, workdir = __testWorkDir) # SWIG - C# factoryQuick.addStep(shell.ShellCommand, name = 'csharp-clean', description = ['csharp-cleaning'], descriptionDone = ['csharp-clean'], command = ['make', 'veryclean'], workdir = __csharpWorkDir) factoryQuick.addStep(shell.ShellCommand, name = 'csharp-interface', description = ['csharp-generating'], descriptionDone = ['csharp-interface'], command = __cmdInterface, workdir = __csharpWorkDir) factoryQuick.addStep(shell.ShellCommand, name = 'csharp-make', description = ['csharp-building'], descriptionDone = ['csharp-build'], command = ['make'], workdir = __csharpWorkDir) factoryQuick.addStep(shell.ShellCommand, name = 'csharp-test', description = ['csharp-testing'], descriptionDone = ['csharp-test'], command = __cmdTest, env = { 'LD_LIBRARY_PATH' : __ldPathQuick }, workdir = __csharpWorkDir) # SWIG - Perl factoryQuick.addStep(shell.ShellCommand, name = 'perl-clean', description = ['perl-cleaning'], descriptionDone = ['perl-clean'], command = ['make', 'veryclean'], workdir = __perlWorkDir) factoryQuick.addStep(shell.ShellCommand, name = 'perl-interface', description = ['perl-generating'], descriptionDone = ['perl-interface'], command = ['make', 'generate'], workdir = __perlWorkDir) factoryQuick.addStep(shell.ShellCommand, name = 'perl-make', description = ['perl-building'], descriptionDone = ['perl-build'], command = ['make', 'build'], workdir = __perlWorkDir) factoryQuick.addStep(shell.ShellCommand, name = 'perl-test', description = ['perl-testing'], descriptionDone = ['perl-test'], command = __cmdTest, env = { 'LD_LIBRARY_PATH' : __ldPathQuick, 'GDAL_DATA' : __dataPathQuick }, workdir = __perlWorkDir) ### FULL BUILDER FACTORY factoryFull = factory.BuildFactory() factoryFull.addStep(source.SVN( name = 'svn', baseURL = common.config['project']['svnUrl'], defaultBranch = common.config['project']['svnBranch'], mode = 'copy')) factoryFull.addStep(shell.ShellCommand, name = 'configure', description = ['configuring'], descriptionDone = ['configure'], command = __cmdConfigure, workdir = __buildWorkDir) factoryFull.addStep(shell.ShellCommand, name = 'clean', description = ['cleaning'], descriptionDone = ['clean'], command = __cmdClean, workdir = __buildWorkDir) factoryFull.addStep(shell.ShellCommand, name = 'make', description = ['compiling'], descriptionDone = ['compile'], command = __cmdCompile, workdir = __buildWorkDir) factoryFull.addStep(shell.ShellCommand, name = 'egg', description = ['egging'], descriptionDone = ['egg'], command = __cmdEgg, workdir = __pythonWorkDir) factoryFull.addStep(shell.ShellCommand, name = 'test', description = ['testing'], descriptionDone = ['test'], command = ['./run_all.py'], env = { 'LD_LIBRARY_PATH' : __ldPathFull, 'PYTHONPATH' : __pythonPathFull, 'GDAL_DATA' : __dataPathFull }, workdir = __testWorkDir) # SWIG - C# factoryFull.addStep(shell.ShellCommand, name = 'csharp-clean', description = ['csharp-cleaning'], descriptionDone = ['csharp-clean'], command = ['make', 'veryclean'], workdir = __csharpWorkDir) factoryFull.addStep(shell.ShellCommand, name = 'csharp-interface', description = ['csharp-generating'], descriptionDone = ['csharp-interface'], command = __cmdInterface, workdir = __csharpWorkDir) factoryFull.addStep(shell.ShellCommand, name = 'csharp-make', description = ['csharp-building'], descriptionDone = ['csharp-build'], command = ['make'], workdir = __csharpWorkDir) factoryFull.addStep(shell.ShellCommand, name = 'csharp-test', description = ['csharp-testing'], descriptionDone = ['csharp-test'], command = __cmdTest, env = { 'LD_LIBRARY_PATH' : __ldPathFull }, workdir = __csharpWorkDir) # SWIG - Perl factoryFull.addStep(shell.ShellCommand, name = 'perl-clean', description = ['perl-cleaning'], descriptionDone = ['perl-clean'], command = ['make', 'veryclean'], workdir = __perlWorkDir) factoryFull.addStep(shell.ShellCommand, name = 'perl-interface', description = ['perl-generating'], descriptionDone = ['perl-interface'], command = ['make', 'generate'], workdir = __perlWorkDir) factoryFull.addStep(shell.ShellCommand, name = 'perl-make', description = ['perl-building'], descriptionDone = ['perl-build'], command = ['make', 'build'], workdir = __perlWorkDir) factoryFull.addStep(shell.ShellCommand, name = 'perl-test', description = ['perl-testing'], descriptionDone = ['perl-test'], command = __cmdTest, env = { 'LD_LIBRARY_PATH' : __ldPathFull, 'GDAL_DATA' : __dataPathFull }, workdir = __perlWorkDir) # Cleanup factoryFull.addStep(shell.ShellCommand, name = 'clean', description = ['cleaning'], descriptionDone = ['clean'], command = __cmdClean, workdir = __buildWorkDir) ### STABLE BRANCH - QUICK BUILDER FACTORY factoryStableBranch = factory.BuildFactory() factoryStableBranch.addStep(source.SVN( name = 'svn', baseURL = common.config['project']['svnUrl'], defaultBranch = __stableBranchUrl, mode='copy')) factoryStableBranch.addStep(shell.ShellCommand, name = 'configure', description = ['configuring'], descriptionDone = ['configure'], command = __cmdConfigureStable, workdir = __buildWorkDir) factoryStableBranch.addStep(shell.ShellCommand, name = 'clean', description = ['cleaning'], descriptionDone = ['clean'], command = __cmdClean, workdir = __buildWorkDir) factoryStableBranch.addStep(shell.ShellCommand, name = 'make', description = ['compiling'], descriptionDone = ['compile'], command = __cmdCompile, workdir = __buildWorkDir) factoryStableBranch.addStep(shell.ShellCommand, name = 'test', description = ['testing'], descriptionDone = ['test'], command = ['./run_all.py'], env = { 'LD_LIBRARY_PATH' : __ldPathStableBranch, 'PYTHONPATH' : __pythonPathStableBranch, 'GDAL_DATA' : __dataPathStableBranch }, workdir = __testWorkDir) # SWIG - C# factoryStableBranch.addStep(shell.ShellCommand, name = 'csharp-clean', description = ['csharp-cleaning'], descriptionDone = ['csharp-clean'], command = ['make', 'veryclean'], workdir = __csharpWorkDir) factoryStableBranch.addStep(shell.ShellCommand, name = 'csharp-interface', description = ['csharp-generating'], descriptionDone = ['csharp-interface'], command = __cmdInterface, workdir = __csharpWorkDir) factoryStableBranch.addStep(shell.ShellCommand, name = 'csharp-make', description = ['csharp-building'], descriptionDone = ['csharp-build'], command = ['make'], workdir = __csharpWorkDir) factoryStableBranch.addStep(shell.ShellCommand, name = 'csharp-test', description = ['csharp-testing'], descriptionDone = ['csharp-test'], command = __cmdTest, env = { 'LD_LIBRARY_PATH' : __ldPathStableBranch }, workdir = __csharpWorkDir) # SWIG - Perl factoryStableBranch.addStep(shell.ShellCommand, name = 'perl-clean', description = ['perl-cleaning'], descriptionDone = ['perl-clean'], command = ['make', 'veryclean'], workdir = __perlWorkDir) factoryStableBranch.addStep(shell.ShellCommand, name = 'perl-interface', description = ['perl-generating'], descriptionDone = ['perl-interface'], command = ['make', 'generate'], workdir = __perlWorkDir) factoryStableBranch.addStep(shell.ShellCommand, name = 'perl-make', description = ['perl-building'], descriptionDone = ['perl-build'], command = ['make', 'build'], workdir = __perlWorkDir) factoryStableBranch.addStep(shell.ShellCommand, name = 'perl-test', description = ['perl-testing'], descriptionDone = ['perl-test'], command = __cmdTest, env = { 'LD_LIBRARY_PATH' : __ldPathStableBranch, 'GDAL_DATA' : __dataPathStableBranch }, workdir = __perlWorkDir) # Cleanup factoryStableBranch.addStep(shell.ShellCommand, name = 'clean', description = ['cleaning'], descriptionDone = ['clean'], command = __cmdClean, workdir = __buildWorkDir) ############################################################################# ###### BUILDSLAVE & BUILDERS config = buildslave.Config(slavename, slavepass) bquickname = hostname + '-quick' bfullname = hostname + '-full' bstablename = hostname + '-stable' config.addBuilder(bquickname, bquickname, factoryQuick, 'quick') #config.addBuilder(bfullname, bfullname, factoryFull, 'full') #config.addBuilder(bstablename, bstablename, factoryStableBranch, 'stable') # EOF