More updates to buildbot master to do a clean on request

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-08-08 00:03:55 +02:00
parent a0d1cdad28
commit 4940bf2e6d

View File

@@ -4,6 +4,7 @@
# This is a sample buildmaster config file. It must be installed as
# 'master.cfg' in your buildmaster's base directory.
import sys
# This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing.
c = BuildmasterConfig = {}
@@ -55,9 +56,12 @@ def sphinx_slave(git_mode = 'incremental'):
from buildbot.process.properties import WithProperties
# Was the build started from the force build form with a "fullclean"
# property set? If so, clobber the checkout folders.
cmd = ['bash', '-c',
WithProperties('if [ %(fullclean:-no)s == yes ]; then echo `pwd`; rm -rfv build; echo fully cleaned; fi'),
]
if sys.platform.startswith('win'):
cmd = 'cmd /c '+ WithProperties('IF "%(fullclean:-no)s" == "yes" (echo %CD% && del /q .\* && for /d %x in (.\*) do @rd /s /q %x && echo "fully cleaned")')
else:
cmd = ['bash', '-c',
WithProperties('if [ %(fullclean:-no)s == yes ]; then echo `pwd`; rm -rfv build; echo fully cleaned; fi'),
]
factory.addStep(ShellCommand(command=cmd, description='fullclean?', workdir=""))
# Check out sources
factory.addStep(Git(repourl='git://github.com/CoolProp/CoolProp', mode=git_mode, submodules = True, progress=True, haltOnFailure = True))
@@ -76,9 +80,12 @@ def javascript_slave(cmake_args = [], cmake_env = {}, build_args = [], git_mode
from buildbot.process.properties import WithProperties
# Was the build started from the force build form with a "fullclean"
# property set? If so, clobber the checkout folders.
cmd = ['bash', '-c',
WithProperties('if [ %(fullclean:-no)s == yes ]; then echo `pwd`; rm -rfv build; echo fully cleaned; fi'),
]
if sys.platform.startswith('win'):
cmd = 'cmd /c '+ WithProperties('IF "%(fullclean:-no)s" == "yes" (echo %CD% && del /q .\* && for /d %x in (.\*) do @rd /s /q %x && echo "fully cleaned")')
else:
cmd = ['bash', '-c',
WithProperties('if [ %(fullclean:-no)s == yes ]; then echo `pwd`; rm -rfv build; echo fully cleaned; fi'),
]
factory.addStep(ShellCommand(command=cmd, description='fullclean?', workdir=""))
# Check out sources
@@ -101,7 +108,10 @@ def python_slave(key, cmake_args = [], cmake_env = {}, build_args = [], git_mode
from buildbot.process.properties import WithProperties
# Was the build started from the force build form with a "fullclean"
# property set? If so, clobber the checkout folders.
cmd = ['bash', '-c',
if sys.platform.startswith('win'):
cmd = 'cmd /c '+ WithProperties('IF "%(fullclean:-no)s" == "yes" (echo %CD% && del /q .\* && for /d %x in (.\*) do @rd /s /q %x && echo "fully cleaned")')
else:
cmd = ['bash', '-c',
WithProperties('if [ %(fullclean:-no)s == yes ]; then echo pwd; rm -rfv *; echo fully cleaned; fi'),
]
factory.addStep(ShellCommand(command=cmd, description='fullclean?', workdir=""))
@@ -139,19 +149,22 @@ def cmake_slave(mod_name, git_mode = 'incremental', install = True, cmake_args =
List of strings of arguments to be passed to ctest
"""
factory = BuildFactory()
working_folder = "build/" + mod_name
working_folder = "build"
from buildbot.process.properties import WithProperties
# Was the build started from the force build form with a "fullclean"
# property set? If so, clobber the checkout folders.
cmd = ['bash', '-c',
WithProperties('if [ %(fullclean:-no)s == yes ]; then echo pwd; rm -rf build; echo fully cleaned; fi'),
]
if sys.platform.startswith('win'):
cmd = 'cmd /c '+ WithProperties('IF "%(fullclean:-no)s" == "yes" (echo %CD% && del /q destination\* && for /d %x in (destination\*) do @rd /s /q %x && echo "fully cleaned")')
else:
cmd = ['bash', '-c',
WithProperties('if [ %(fullclean:-no)s == yes ]; then echo pwd; rm -rf *; echo fully cleaned; fi'),
]
factory.addStep(ShellCommand(command=cmd, description='fullclean?', workdir=""))
# check out the source
factory.addStep(Git(repourl='git://github.com/CoolProp/CoolProp', mode=git_mode, submodules = True, progress=True, haltOnFailure = True))
factory.addStep(MakeDirectory(dir="build/"+working_folder, haltOnFailure = True))
factory.addStep(MakeDirectory(dir=working_folder, haltOnFailure = True))
factory.addStep(RemoveDirectory(dir="build/install_root", haltOnFailure = True))
factory.addStep(ShellCommand(command=["cmake", "..", "-DCOOLPROP_"+mod_name.upper()+"_MODULE=ON","-DBUILD_TESTING=ON"]+cmake_args,
env = cmake_env,