|
|
|
|
@@ -59,7 +59,9 @@ c['slaves'] = [BuildSlave("linux-slave", pass_dict["linux-slave"], **slave_commo
|
|
|
|
|
BuildSlave("OSX-slave", pass_dict["OSX-slave"], **slave_commons),
|
|
|
|
|
BuildSlave("windows-slave", pass_dict["windows-slave"], **slave_commons),
|
|
|
|
|
BuildSlave("windows-DTU-slave", pass_dict["windows-DTU-slave"], **slave_commons),
|
|
|
|
|
BuildSlave("OSX-IPU-slave", pass_dict["OSX-IPU-slave"], **slave_commons)
|
|
|
|
|
BuildSlave("OSX-IPU-slave", pass_dict["OSX-IPU-slave"], **slave_commons),
|
|
|
|
|
BuildSlave("Linux64-IPU-slave", pass_dict["Linux64-IPU-slave"], **slave_commons),
|
|
|
|
|
BuildSlave("Linux32-IPU-slave", pass_dict["Linux32-IPU-slave"], **slave_commons)
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
# 'slavePortnum' defines the TCP port to listen on for connections from slaves.
|
|
|
|
|
@@ -235,37 +237,87 @@ class PythonSlaveConfig(object):
|
|
|
|
|
return IDs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@properties.renderer
|
|
|
|
|
def gitModeInput(props):
|
|
|
|
|
""" If we are doing a full clean, this will tell it to clobber all the files """
|
|
|
|
|
if props.getProperty('fullclean', default = False) or props.getProperty('branch') == 'release':
|
|
|
|
|
return 'full'
|
|
|
|
|
else:
|
|
|
|
|
return 'incremental'
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
@properties.renderer
|
|
|
|
|
def masterdestLocation(props):
|
|
|
|
|
def _branch(props): return props.getProperty('branch')
|
|
|
|
|
|
|
|
|
|
def _master_loc_rel(git_branch):
|
|
|
|
|
"""
|
|
|
|
|
If building from release branch, upload to public_html/release
|
|
|
|
|
If building from master branch, upload to normal public_html/binaries folder
|
|
|
|
|
If another branch, upload to public_html/unstable
|
|
|
|
|
"""
|
|
|
|
|
if props.getProperty('branch') == 'release':
|
|
|
|
|
return 'public_html/release'
|
|
|
|
|
elif props.getProperty('branch') == 'master':
|
|
|
|
|
return 'public_html/binaries'
|
|
|
|
|
else:
|
|
|
|
|
return 'public_html/unstable'
|
|
|
|
|
if git_branch == 'release': return os.path.join('public_html','release')
|
|
|
|
|
elif git_branch == 'master': return os.path.join('public_html','binaries')
|
|
|
|
|
else: return os.path.join('public_html','unstable')
|
|
|
|
|
|
|
|
|
|
@properties.renderer
|
|
|
|
|
def master_loc_rel(props):
|
|
|
|
|
"""
|
|
|
|
|
If building from release branch, upload to public_html/release
|
|
|
|
|
If building from master branch, upload to normal public_html/binaries folder
|
|
|
|
|
If another branch, upload to public_html/unstable
|
|
|
|
|
"""
|
|
|
|
|
return _master_loc_rel(props.getProperty('branch'))
|
|
|
|
|
|
|
|
|
|
def _master_loc_abs(git_branch):
|
|
|
|
|
server_uri = 'coolprop@coolprop.dreamhosters.com'
|
|
|
|
|
server_dir = '/home/coolprop/buildbot/server-master'
|
|
|
|
|
server_dir = os.path.join(server_dir, _master_loc_rel(git_branch))
|
|
|
|
|
server_des = "{0}:{1}".format(server_uri, os.path.abspath(server_dir))
|
|
|
|
|
return server_des
|
|
|
|
|
|
|
|
|
|
@properties.renderer
|
|
|
|
|
def master_loc_abs(props):
|
|
|
|
|
return _master_loc_abs(props.getProperty('branch'))
|
|
|
|
|
|
|
|
|
|
############# Upload folder permissions #######################
|
|
|
|
|
def fixPermissions(factory):
|
|
|
|
|
factory.addStep(MasterShellCommand(command = '${HOME}/scripts/binPerms.sh'))
|
|
|
|
|
|
|
|
|
|
def upload_command(factory, slavesrc, masterdest=None, branch=None, platform=None, pyID=None):
|
|
|
|
|
"""Upload files to the master server. Avoids buildbot upload on platforms other than Windows."""
|
|
|
|
|
if (masterdest is not None and branch is not None):
|
|
|
|
|
raise ValueError("Unknown target, specify either \"masterdest\" or \"branch\".")
|
|
|
|
|
if (platform is not None and pyID is not None):
|
|
|
|
|
raise ValueError("Unknown target, specify either \"platform\" or \"pyID\".")
|
|
|
|
|
|
|
|
|
|
if masterdest is not None: target = masterdest
|
|
|
|
|
elif branch is not None: target = _master_loc_rel(branch)
|
|
|
|
|
else: target = master_loc_rel
|
|
|
|
|
if platform is None and pyID is None: # default
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc=slavesrc, masterdest=target))
|
|
|
|
|
elif (platform is not None and platform == 'windows') or \
|
|
|
|
|
(pyID is not None and checkID(pyID, teID=100, strict=False)):
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc=slavesrc, masterdest=target))
|
|
|
|
|
else:
|
|
|
|
|
if masterdest is not None: target = masterdest
|
|
|
|
|
elif branch is not None: target = _master_loc_abs(branch)
|
|
|
|
|
else: target = master_loc_abs
|
|
|
|
|
rsyncCommand = ['rsync', '-aP', '--no-perms', '--no-owner', '--no-group', '--stats', '{0}/'.format(slavesrc), target]
|
|
|
|
|
factory.addStep(ShellCommand(command=rsyncCommand, haltOnFailure = True))
|
|
|
|
|
fixPermissions(factory)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# A centralised method to provide the objects with some presets
|
|
|
|
|
def getBaseFactory(gitMode = 'incremental'):
|
|
|
|
|
@properties.renderer
|
|
|
|
|
def _git_mode(props):
|
|
|
|
|
""" If we are doing a full clean, this will tell it to clobber all the files """
|
|
|
|
|
if props.getProperty('fullclean',default=False) or props.getProperty('branch',default='master') == 'release':
|
|
|
|
|
return 'full'
|
|
|
|
|
else:
|
|
|
|
|
return 'incremental'
|
|
|
|
|
|
|
|
|
|
def getBaseFactory():
|
|
|
|
|
factory = BuildFactory()
|
|
|
|
|
factory.addStep(Git(repourl='git://github.com/CoolProp/CoolProp', mode=gitModeInput, method = 'fresh', submodules = True, progress=True, haltOnFailure = True))
|
|
|
|
|
factory.addStep(Git(
|
|
|
|
|
repourl= 'git://github.com/CoolProp/CoolProp',
|
|
|
|
|
mode = _git_mode,
|
|
|
|
|
method = 'fresh',
|
|
|
|
|
submodules = True,
|
|
|
|
|
progress=True,
|
|
|
|
|
haltOnFailure = True))
|
|
|
|
|
return factory
|
|
|
|
|
|
|
|
|
|
def docActivateCmd():
|
|
|
|
|
@@ -301,12 +353,12 @@ def rsyncCommand(props):
|
|
|
|
|
|
|
|
|
|
# All what is needed to create the website, it makes sense to run the
|
|
|
|
|
# nightly builds on the same machine. This avoids extra data transfer.
|
|
|
|
|
def websiteFactory(platform, gitMode='incremental', fullBuild=False):
|
|
|
|
|
def websiteFactory(platform, fullBuild=False):
|
|
|
|
|
if 'win' in platform.lower():
|
|
|
|
|
raise ValueError("The docs cannot be build on a Windows machine, we rely on rsync...")
|
|
|
|
|
#
|
|
|
|
|
# Create the factory to add the actions to
|
|
|
|
|
factory = getBaseFactory(gitMode=gitMode)
|
|
|
|
|
factory = getBaseFactory()
|
|
|
|
|
# Make a wheel - this is advantageous because it forces pip to uninstall coolprop, ensuring that all files installed are from this wheel
|
|
|
|
|
factory.addStep(ShellCommand(command=' '.join([docActivateCmd(), "python", "setup.py", "bdist_wheel", '--dist-dir', 'dist']), workdir= 'build/wrappers/Python', haltOnFailure = True))
|
|
|
|
|
# List the files in the dist directory
|
|
|
|
|
@@ -339,17 +391,14 @@ def websiteFactory(platform, gitMode='incremental', fullBuild=False):
|
|
|
|
|
# Currently, it only supports Windows, but the plan is to integrate MacOS and Linux builds here as well.
|
|
|
|
|
# You have to have both CMake and Git available on your standard command line, pay attention when installing
|
|
|
|
|
# these two tools on your Windows machine.
|
|
|
|
|
def pythonFactory(pyID, pyCFG=PythonSlaveConfig("name"), gitMode='incremental'):
|
|
|
|
|
def pythonFactory(pyID, pyCFG=PythonSlaveConfig("name")):
|
|
|
|
|
#
|
|
|
|
|
# Some basic settings for all builders
|
|
|
|
|
workingFolder = "build/wrappers/Python"
|
|
|
|
|
installFolder = "build/install_root"
|
|
|
|
|
relinstFolder = "../../install_root" # relative path
|
|
|
|
|
uploadFolder = "install_root" # relative to build
|
|
|
|
|
# Create the factory to add the actions to
|
|
|
|
|
factory = getBaseFactory(gitMode=gitMode)
|
|
|
|
|
# Remove the temporary folder for installs
|
|
|
|
|
factory.addStep(RemoveDirectory(dir=installFolder, haltOnFailure = False))
|
|
|
|
|
# Do you want me to install the required packages? Enable this for new slaves.
|
|
|
|
|
installPackages = False
|
|
|
|
|
buildPyPI = checkID(pyID, teID=100, strict=False) or checkID(pyID, teID=200, strict=False) # Only build and upload Windows and Mac wheels
|
|
|
|
|
buildConda = True
|
|
|
|
|
workingFolder = "build/wrappers/Python"
|
|
|
|
|
installFolder = "install_root"
|
|
|
|
|
#
|
|
|
|
|
# Setting the appropriate virtual environment activator
|
|
|
|
|
pyact = pyCFG.getPyact(pyID)
|
|
|
|
|
@@ -366,28 +415,57 @@ def pythonFactory(pyID, pyCFG=PythonSlaveConfig("name"), gitMode='incremental'):
|
|
|
|
|
# Getting the appropriate installer options
|
|
|
|
|
if pyins is None:
|
|
|
|
|
raise ValueError("Your selected Python environment \"{0}\" does not have installer options in this builder factory".format(pyID))
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
pkgs = ["requests", "jinja2", "pyyaml", "numpy", "scipy", "matplotlib", "pandas", "cython"]
|
|
|
|
|
if checkID(pyID, teID=100, strict=False):
|
|
|
|
|
pkgs.extend(["unxutils","pywin32"]) # Add Windows-only dependency
|
|
|
|
|
if checkID(pyID, teID=101, strict=False):
|
|
|
|
|
pkgs.append("ndg-httpsclient") # Add Windows-only and python2 dependency
|
|
|
|
|
#
|
|
|
|
|
activateCMD = " ".join([pyact, pyenv]) # We always activate an environment, regardless of the host
|
|
|
|
|
installCMD = " ".join(["python", "setup.py"] + pyins)
|
|
|
|
|
combinedCMD = " && ".join([activateCMD, installCMD])
|
|
|
|
|
factory.addStep(ShellCommand(command = combinedCMD, workdir = workingFolder, haltOnFailure = True))
|
|
|
|
|
def combinedCMD(cmd): return " && ".join([activateCMD, cmd])
|
|
|
|
|
#
|
|
|
|
|
#factory.addStep(ShellCommand(command="python -c \"import CoolProp; print(CoolProp.__file___)\"", workdir= workingFolder, haltOnFailure = True))
|
|
|
|
|
#
|
|
|
|
|
if not checkID(pyID, teID=300, strict=False): # Only upload non-Linux files
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc=uploadFolder, masterdest=masterdestLocation, url="binaries", compress="bz2"))
|
|
|
|
|
fixPermissions(factory)
|
|
|
|
|
# Create the factory to add the actions to
|
|
|
|
|
factory = getBaseFactory()
|
|
|
|
|
#
|
|
|
|
|
if buildPyPI:
|
|
|
|
|
# Install dependencies
|
|
|
|
|
if installPackages and False: # disabled
|
|
|
|
|
installCMD = " ".join(["pip", "install"]) + " " + " ".join(pkgs)
|
|
|
|
|
factory.addStep(ShellCommand(command=combinedCMD(installCMD), haltOnFailure=True))
|
|
|
|
|
# setuptools installation for PyPI packages
|
|
|
|
|
factory.addStep(RemoveDirectory(dir=os.path.join('build',installFolder), haltOnFailure = False))
|
|
|
|
|
installCMD = " ".join(["python", "setup.py"] + pyins)
|
|
|
|
|
factory.addStep(ShellCommand(command=combinedCMD(installCMD), workdir=workingFolder, haltOnFailure=True))
|
|
|
|
|
installCMD = " ".join(["python", "setup.py", "clean"])
|
|
|
|
|
factory.addStep(ShellCommand(command=combinedCMD(installCMD), workdir=workingFolder, haltOnFailure=True))
|
|
|
|
|
upload_command(factory, installFolder, pyID=pyID)
|
|
|
|
|
|
|
|
|
|
if buildConda:
|
|
|
|
|
# Install dependencies
|
|
|
|
|
if installPackages:
|
|
|
|
|
installCMD = " ".join(["conda", "install", "-yq"]) + " " + " ".join(pkgs)
|
|
|
|
|
factory.addStep(ShellCommand(command=combinedCMD(installCMD), haltOnFailure=True))
|
|
|
|
|
# conda installation for binstar packages
|
|
|
|
|
factory.addStep(RemoveDirectory(dir=os.path.join('build',installFolder), haltOnFailure = False))
|
|
|
|
|
factory.addStep(RemoveDirectory(dir=os.path.join(workingFolder,'build'), haltOnFailure = False))
|
|
|
|
|
factory.addStep(RemoveDirectory(dir=os.path.join(workingFolder,'src'), haltOnFailure = False))
|
|
|
|
|
installCMD = " ".join(["python", "generate_meta.yaml.py"])
|
|
|
|
|
factory.addStep(ShellCommand(command=combinedCMD(installCMD), workdir=workingFolder, haltOnFailure=True))
|
|
|
|
|
installCMD = " ".join(["python", "runner.py"])
|
|
|
|
|
factory.addStep(ShellCommand(command=combinedCMD(installCMD), workdir='build', haltOnFailure=True))
|
|
|
|
|
upload_command(factory, installFolder, pyID=pyID)
|
|
|
|
|
|
|
|
|
|
return factory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def cmakeFactory(mod_name = None, gitMode = 'incremental', install = True, pre_cmd = [], cmake_args = [], build_args = [], ctest_args = [], cmake_env={}, test = True):
|
|
|
|
|
def cmakeFactory(mod_name = None, install = True, pre_cmd = [], cmake_args = [], build_args = [], ctest_args = [], cmake_env={}, test = True):
|
|
|
|
|
"""
|
|
|
|
|
Parameters
|
|
|
|
|
----------
|
|
|
|
|
mod_name: string
|
|
|
|
|
The module to be built, one of 'Octave','python','Csharp', etc. - turns on the macro -DCOOLPROP_OCTAVE_MODULE=ON for instance if you pass octave
|
|
|
|
|
gitMode: string
|
|
|
|
|
What mode to use, one of 'incremental' or 'full'
|
|
|
|
|
install: bool
|
|
|
|
|
True for install, False for just build
|
|
|
|
|
pre_cmd: list of strings
|
|
|
|
|
@@ -404,7 +482,7 @@ def cmakeFactory(mod_name = None, gitMode = 'incremental', install = True, pre_c
|
|
|
|
|
working_folder = "build/build"
|
|
|
|
|
|
|
|
|
|
# Create the factory to add the actions to
|
|
|
|
|
factory = getBaseFactory(gitMode=gitMode)
|
|
|
|
|
factory = getBaseFactory()
|
|
|
|
|
#
|
|
|
|
|
factory.addStep(MakeDirectory(dir=working_folder, haltOnFailure = True))
|
|
|
|
|
factory.addStep(RemoveDirectory(dir="build/install_root", haltOnFailure = False))
|
|
|
|
|
@@ -436,7 +514,7 @@ def cmakeFactory(mod_name = None, gitMode = 'incremental', install = True, pre_c
|
|
|
|
|
if install:
|
|
|
|
|
factory.addStep(DirectoryUpload(
|
|
|
|
|
slavesrc="install_root",
|
|
|
|
|
masterdest=masterdestLocation,
|
|
|
|
|
masterdest=master_loc_rel,
|
|
|
|
|
url="binaries",
|
|
|
|
|
compress="bz2"))
|
|
|
|
|
return factory
|
|
|
|
|
@@ -479,13 +557,13 @@ def fortranFactory(platform=1,bitness=1):
|
|
|
|
|
return factory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def javascript_slave(platform, cmake_args = [], cmake_env = {}, build_args = [], gitMode = 'incremental'):
|
|
|
|
|
def javascript_slave(platform, cmake_args = [], cmake_env = {}, build_args = []):
|
|
|
|
|
|
|
|
|
|
working_folder = "build/Javascript"
|
|
|
|
|
from buildbot.process.properties import WithProperties
|
|
|
|
|
|
|
|
|
|
# Create the factory to add the actions to
|
|
|
|
|
factory = getBaseFactory(gitMode=gitMode)
|
|
|
|
|
factory = getBaseFactory()
|
|
|
|
|
|
|
|
|
|
# Remove the temporary folder for installs
|
|
|
|
|
factory.addStep(RemoveDirectory(dir="build/install_root", haltOnFailure = False))
|
|
|
|
|
@@ -494,15 +572,15 @@ def javascript_slave(platform, cmake_args = [], cmake_env = {}, build_args = [],
|
|
|
|
|
workdir= working_folder,
|
|
|
|
|
haltOnFailure = True))
|
|
|
|
|
factory.addStep(ShellCommand(command=["cmake", "--build", ".", "--target", "install"]+build_args, workdir = working_folder, haltOnFailure = True))
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc="install_root", masterdest=masterdestLocation, url="binaries", compress="bz2"))
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc="install_root", masterdest=master_loc_rel, url="binaries", compress="bz2"))
|
|
|
|
|
fixPermissions(factory)
|
|
|
|
|
return factory
|
|
|
|
|
|
|
|
|
|
def python_source_slave(key, platform, conda_env, cmake_args = [], cmake_env = {}, build_args = [], gitMode = 'incremental'):
|
|
|
|
|
def python_source_slave(key, platform, conda_env, cmake_args = [], cmake_env = {}, build_args = []):
|
|
|
|
|
working_folder = "build/build"
|
|
|
|
|
|
|
|
|
|
# Create the factory to add the actions to
|
|
|
|
|
factory = getBaseFactory(gitMode=gitMode)
|
|
|
|
|
factory = getBaseFactory()
|
|
|
|
|
|
|
|
|
|
# Remove the temporary folder for installs
|
|
|
|
|
factory.addStep(RemoveDirectory(dir="build/install_root", haltOnFailure = False))
|
|
|
|
|
@@ -512,16 +590,16 @@ def python_source_slave(key, platform, conda_env, cmake_args = [], cmake_env = {
|
|
|
|
|
env = cmake_env,
|
|
|
|
|
workdir= working_folder,
|
|
|
|
|
haltOnFailure = True))
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc="install_root", masterdest=masterdestLocation, url="binaries", compress="bz2"))
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc="install_root", masterdest=master_loc_rel, url="binaries", compress="bz2"))
|
|
|
|
|
fixPermissions(factory)
|
|
|
|
|
return factory
|
|
|
|
|
|
|
|
|
|
# def deb_slave(gitMode = 'incremental'):
|
|
|
|
|
# def deb_slave():
|
|
|
|
|
#
|
|
|
|
|
# working_folder = "build/wrappers/DEB"
|
|
|
|
|
#
|
|
|
|
|
# # Create the factory to add the actions to
|
|
|
|
|
# factory = getBaseFactory(gitMode=gitMode)
|
|
|
|
|
# factory = getBaseFactory()
|
|
|
|
|
#
|
|
|
|
|
# factory.addStep(ShellCommand(command = ' '.join(["chmod","+x","package.bsh","&&", "./package.bsh"]),
|
|
|
|
|
# workdir= working_folder,
|
|
|
|
|
@@ -530,17 +608,17 @@ def python_source_slave(key, platform, conda_env, cmake_args = [], cmake_env = {
|
|
|
|
|
# factory.addStep(ShellCommand(command = ' '.join(["mv","*.deb","DEB/DEB"]),
|
|
|
|
|
# workdir= working_folder,
|
|
|
|
|
# haltOnFailure = True))
|
|
|
|
|
# factory.addStep(DirectoryUpload(slavesrc="wrappers/DEB/DEB", masterdest=masterdestLocation, url="binaries/DEB", compress="bz2"))
|
|
|
|
|
# factory.addStep(DirectoryUpload(slavesrc="wrappers/DEB/DEB", masterdest=master_loc_rel, url="binaries/DEB", compress="bz2"))
|
|
|
|
|
#
|
|
|
|
|
# return factory
|
|
|
|
|
|
|
|
|
|
def excel_slave(gitMode = 'incremental'):
|
|
|
|
|
def excel_slave():
|
|
|
|
|
"""
|
|
|
|
|
"""
|
|
|
|
|
working_folder = "build/build"
|
|
|
|
|
|
|
|
|
|
# Create the factory to add the actions to
|
|
|
|
|
factory = getBaseFactory(gitMode=gitMode)
|
|
|
|
|
factory = getBaseFactory()
|
|
|
|
|
#
|
|
|
|
|
factory.addStep(MakeDirectory(dir='build/bin/MicrosoftExcel', haltOnFailure = True))
|
|
|
|
|
factory.addStep(MakeDirectory(dir=working_folder+'/32bitDLL', haltOnFailure = True))
|
|
|
|
|
@@ -574,17 +652,17 @@ def excel_slave(gitMode = 'incremental'):
|
|
|
|
|
factory.addStep(ShellCommand(command=["copy", "wrappers\Excel\CoolProp.xla", "bin\MicrosoftExcel"], workdir = 'build', haltOnFailure = True))
|
|
|
|
|
factory.addStep(ShellCommand(command=["copy", "wrappers\Excel\TestExcel.xlsx", "bin\MicrosoftExcel"], workdir = 'build', haltOnFailure = True))
|
|
|
|
|
# Upload the files
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc="bin",masterdest=masterdestLocation,url="MicrosoftExcel",compress="bz2"))
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc="bin",masterdest=master_loc_rel,url="MicrosoftExcel",compress="bz2"))
|
|
|
|
|
fixPermissions(factory)
|
|
|
|
|
return factory
|
|
|
|
|
|
|
|
|
|
def smath_builder(gitMode = 'incremental'):
|
|
|
|
|
def smath_builder():
|
|
|
|
|
"""
|
|
|
|
|
"""
|
|
|
|
|
working_folder = "build/build"
|
|
|
|
|
|
|
|
|
|
# Create the factory to add the actions to
|
|
|
|
|
factory = getBaseFactory(gitMode=gitMode)
|
|
|
|
|
factory = getBaseFactory()
|
|
|
|
|
#
|
|
|
|
|
factory.addStep(MakeDirectory(dir='build/bin/SMath', haltOnFailure = True))
|
|
|
|
|
factory.addStep(MakeDirectory(dir=working_folder+'/32bitDLL', haltOnFailure = True))
|
|
|
|
|
@@ -621,35 +699,33 @@ def smath_builder(gitMode = 'incremental'):
|
|
|
|
|
factory.addStep(ShellCommand(command=["build_zip"], workdir = 'build\\wrappers\\SMath\\coolprop_wrapper', haltOnFailure = True))
|
|
|
|
|
factory.addStep(ShellCommand(command=["copy", "/Y", "wrappers\\SMath\\coolprop_wrapper\\coolprop_wrapper.7z", "bin\\SMath"], workdir = 'build', haltOnFailure = True))
|
|
|
|
|
# Upload the files
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc="bin",masterdest=masterdestLocation,url="SMath",compress="bz2"))
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc="bin",masterdest=master_loc_rel,url="SMath",compress="bz2"))
|
|
|
|
|
fixPermissions(factory)
|
|
|
|
|
return factory
|
|
|
|
|
|
|
|
|
|
def julia_builder(gitMode = 'incremental'):
|
|
|
|
|
def julia_builder():
|
|
|
|
|
"""
|
|
|
|
|
"""
|
|
|
|
|
working_folder = "build/build"
|
|
|
|
|
|
|
|
|
|
# Create the factory to add the actions to
|
|
|
|
|
factory = getBaseFactory(gitMode=gitMode)
|
|
|
|
|
factory = getBaseFactory()
|
|
|
|
|
# Clean the install_root
|
|
|
|
|
factory.addStep(RemoveDirectory(dir="build/install_root/Julia", haltOnFailure = False))
|
|
|
|
|
factory.addStep(MakeDirectory(dir='build/install_root/Julia', haltOnFailure = True))
|
|
|
|
|
# Copy other files
|
|
|
|
|
factory.addStep(ShellCommand(command=["cp", "wrappers/Julia/CoolProp.jl", "install_root/Julia/"], workdir = 'build', haltOnFailure = True))
|
|
|
|
|
# Upload the files - TODO: Is this the correct directory?
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc="install_root",masterdest=masterdestLocation,url="binaries",compress="bz2"))
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc="install_root",masterdest=master_loc_rel,url="binaries",compress="bz2"))
|
|
|
|
|
fixPermissions(factory)
|
|
|
|
|
return factory
|
|
|
|
|
|
|
|
|
|
def cmake_slave(mod_name, platform, gitMode = 'incremental', install = True, cmake_args = [], build_args = [], ctest_args = [], cmake_env={}, test = True):
|
|
|
|
|
def cmake_slave(mod_name, platform, install = True, cmake_args = [], build_args = [], ctest_args = [], cmake_env={}, test = True):
|
|
|
|
|
"""
|
|
|
|
|
Parameters
|
|
|
|
|
----------
|
|
|
|
|
mod_name: string
|
|
|
|
|
The module to be built, one of 'Octave','python','Csharp', etc. - turns on the macro -DCOOLPROP_OCTAVE_MODULE=ON for instance if you pass octave
|
|
|
|
|
gitMode: string
|
|
|
|
|
What mode to use, one of 'incremental' or 'full'
|
|
|
|
|
install: bool
|
|
|
|
|
True for install, False for just build
|
|
|
|
|
cmake_args: list of strings
|
|
|
|
|
@@ -664,7 +740,7 @@ def cmake_slave(mod_name, platform, gitMode = 'incremental', install = True, cma
|
|
|
|
|
working_folder = "build/build"
|
|
|
|
|
|
|
|
|
|
# Create the factory to add the actions to
|
|
|
|
|
factory = getBaseFactory(gitMode=gitMode)
|
|
|
|
|
factory = getBaseFactory()
|
|
|
|
|
#
|
|
|
|
|
factory.addStep(MakeDirectory(dir=working_folder, haltOnFailure = True))
|
|
|
|
|
factory.addStep(RemoveDirectory(dir="build/install_root", haltOnFailure = True))
|
|
|
|
|
@@ -681,13 +757,13 @@ def cmake_slave(mod_name, platform, gitMode = 'incremental', install = True, cma
|
|
|
|
|
else:
|
|
|
|
|
factory.addStep(ShellCommand(command=' '.join(pre+["cmake", "--build", "."]+build_args), workdir = working_folder, haltOnFailure = True))
|
|
|
|
|
if test:
|
|
|
|
|
factory.addStep(ShellCommand(command=["ctest", "--extra-verbose"] + ctest_args, workdir = working_folder, haltOnFailure = True))
|
|
|
|
|
factory.addStep(ShellCommand(command=["ctest", "--extra-verbose"] + ctest_args, workdir = working_folder, haltOnFailure = True, env = cmake_env))
|
|
|
|
|
if install:
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc="install_root",masterdest=masterdestLocation,url="binaries",compress="bz2"))
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc="install_root",masterdest=master_loc_rel,url="binaries",compress="bz2"))
|
|
|
|
|
fixPermissions(factory)
|
|
|
|
|
return factory
|
|
|
|
|
|
|
|
|
|
def swig_matlab_builder(platform, gitMode = 'incremental', build_args = [], cmake_args = [], ctest_args = [], cmake_env = None):
|
|
|
|
|
def swig_matlab_builder(platform, build_args = [], cmake_args = [], ctest_args = [], cmake_env = None):
|
|
|
|
|
"""
|
|
|
|
|
Download SWIG+MATLAB version, use it to build _wrap file for MATLAB builder, upload generated file back to master.
|
|
|
|
|
|
|
|
|
|
@@ -704,7 +780,7 @@ def swig_matlab_builder(platform, gitMode = 'incremental', build_args = [], cmak
|
|
|
|
|
return pre_path+cmd
|
|
|
|
|
|
|
|
|
|
# Create the factory to add the actions to
|
|
|
|
|
factory = getBaseFactory(gitMode=gitMode)
|
|
|
|
|
factory = getBaseFactory()
|
|
|
|
|
#
|
|
|
|
|
# Download files from nightly build for swig
|
|
|
|
|
factory.addStep(FileDownload(mastersrc = 'public_html/nightly/swig+MATLAB/'+platform+'/swig_MATLAB.7z',
|
|
|
|
|
@@ -722,15 +798,14 @@ def swig_matlab_builder(platform, gitMode = 'incremental', build_args = [], cmak
|
|
|
|
|
factory.addStep(ShellCommand(command=prepend_path('cmake --build . --target install ' + ' '.join(build_args)),
|
|
|
|
|
workdir= "build/build" , haltOnFailure = True))
|
|
|
|
|
# Run simple integration test, but only on platforms other than windows
|
|
|
|
|
if 'win' not in platform:
|
|
|
|
|
factory.addStep(ShellCommand(command=["ctest", "--extra-verbose"] + ctest_args, workdir = "build/build", haltOnFailure = True))
|
|
|
|
|
factory.addStep(ShellCommand(command=["ctest", "--extra-verbose"] + ctest_args, workdir = "build/build", haltOnFailure = True))
|
|
|
|
|
# Upload the files
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc="install_root",masterdest=masterdestLocation,url="binaries",compress="bz2"))
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc="install_root",masterdest=master_loc_rel,url="binaries",compress="bz2"))
|
|
|
|
|
fixPermissions(factory)
|
|
|
|
|
# Return the object
|
|
|
|
|
return factory
|
|
|
|
|
|
|
|
|
|
def swig_scilab_builder(platform, gitMode = 'incremental'):
|
|
|
|
|
def swig_scilab_builder(platform):
|
|
|
|
|
"""
|
|
|
|
|
Download SWIG+scilab version on linux, use it to build _wrap file for scilab builder, upload generated file(s) back to master.
|
|
|
|
|
|
|
|
|
|
@@ -740,7 +815,7 @@ def swig_scilab_builder(platform, gitMode = 'incremental'):
|
|
|
|
|
working_folder = "build/build"
|
|
|
|
|
|
|
|
|
|
# Create the factory to add the actions to
|
|
|
|
|
factory = getBaseFactory(gitMode=gitMode)
|
|
|
|
|
factory = getBaseFactory()
|
|
|
|
|
#
|
|
|
|
|
# Download files from nightly build for swig
|
|
|
|
|
factory.addStep(FileDownload(mastersrc = 'public_html/nightly/swig+SCILAB/'+platform+'/swig_SCILAB.7z', slavedest = 'swig_SCILAB.7z', haltOnFailure = True))
|
|
|
|
|
@@ -763,14 +838,14 @@ def swig_scilab_builder(platform, gitMode = 'incremental'):
|
|
|
|
|
workdir= "build/build",
|
|
|
|
|
haltOnFailure = True))
|
|
|
|
|
# Upload the files
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc="install_root",masterdest=masterdestLocation,url="binaries",compress="bz2"))
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc="install_root",masterdest=master_loc_rel,url="binaries",compress="bz2"))
|
|
|
|
|
fixPermissions(factory)
|
|
|
|
|
return factory
|
|
|
|
|
|
|
|
|
|
def SWIG_MATLAB_bin_builder(platform, gitMode = 'incremental', windows = False):
|
|
|
|
|
def SWIG_MATLAB_bin_builder(platform, windows = False):
|
|
|
|
|
|
|
|
|
|
# Create the factory to add the actions to
|
|
|
|
|
factory = getBaseFactory(gitMode=gitMode)
|
|
|
|
|
factory = getBaseFactory()
|
|
|
|
|
# Build SWIG with MATLAB
|
|
|
|
|
args = ["python","build_swig_matlab.py"]
|
|
|
|
|
if windows:
|
|
|
|
|
@@ -791,10 +866,10 @@ def SWIG_MATLAB_bin_builder(platform, gitMode = 'incremental', windows = False):
|
|
|
|
|
compress="bz2"))
|
|
|
|
|
return factory
|
|
|
|
|
|
|
|
|
|
def SWIG_scilab_bin_builder(platform, gitMode = 'incremental', windows = False):
|
|
|
|
|
def SWIG_scilab_bin_builder(platform, windows = False):
|
|
|
|
|
|
|
|
|
|
# Create the factory to add the actions to
|
|
|
|
|
factory = getBaseFactory(gitMode=gitMode)
|
|
|
|
|
factory = getBaseFactory()
|
|
|
|
|
# Build SWIG with scilab
|
|
|
|
|
args = ["python","build_swig_scilab.py"]
|
|
|
|
|
if windows:
|
|
|
|
|
@@ -825,13 +900,13 @@ def memory_sanitizer_builder():
|
|
|
|
|
commons = dict(workdir = 'build/asan', haltOnFailure = True, env = dict(CLANG_ROOT = CLANG_ROOT))
|
|
|
|
|
|
|
|
|
|
# Create the factory to add the actions to
|
|
|
|
|
factory = getBaseFactory(gitMode=gitMode)
|
|
|
|
|
factory = getBaseFactory()
|
|
|
|
|
factory.addStep(MakeDirectory(dir='build/asan', haltOnFailure = True))
|
|
|
|
|
factory.addStep(ShellCommand(command='cmake .. -DCOOLPROP_CLANG_ADDRESS_SANITIZER=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_C_COMPILER=${CLANG_ROOT}/bin/clang -DCMAKE_CXX_COMPILER=${CLANG_ROOT}/bin/clang++', **commons))
|
|
|
|
|
factory.addStep(ShellCommand(command='DYLD_LIBRARY_PATH=${CLANG_ROOT}/lib/clang/3.5.0/lib/darwin/ ASAN_SYMBOLIZER_PATH=${CLANG_ROOT}/bin/llvm-symbolizer ASAN_OPTIONS=verbosity=1 cmake --build .', **commons))
|
|
|
|
|
return factory
|
|
|
|
|
|
|
|
|
|
def vxworks_module_builder(gitMode = 'incremental', cmake_args = [], cmake_env = None):
|
|
|
|
|
def vxworks_module_builder(cmake_args = [], cmake_env = None):
|
|
|
|
|
"""
|
|
|
|
|
These generated files are needed for the other swig builders and are cross-platform
|
|
|
|
|
"""
|
|
|
|
|
@@ -839,7 +914,7 @@ def vxworks_module_builder(gitMode = 'incremental', cmake_args = [], cmake_env =
|
|
|
|
|
working_folder = "build/build"
|
|
|
|
|
|
|
|
|
|
# Create the factory to add the actions to
|
|
|
|
|
factory = getBaseFactory(gitMode=gitMode)
|
|
|
|
|
factory = getBaseFactory()
|
|
|
|
|
# Directory for build
|
|
|
|
|
factory.addStep(MakeDirectory(dir='build/build', haltOnFailure = True))
|
|
|
|
|
# Generate makefile
|
|
|
|
|
@@ -847,7 +922,7 @@ def vxworks_module_builder(gitMode = 'incremental', cmake_args = [], cmake_env =
|
|
|
|
|
# Build
|
|
|
|
|
factory.addStep(ShellCommand(command = 'cmake --build . --target install', workdir = 'build/build', haltOnFailure = True))
|
|
|
|
|
# Upload the files
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc="install_root", masterdest=masterdestLocation,url="binaries",compress="bz2"))
|
|
|
|
|
factory.addStep(DirectoryUpload(slavesrc="install_root", masterdest=master_loc_rel,url="binaries",compress="bz2"))
|
|
|
|
|
fixPermissions(factory)
|
|
|
|
|
return factory
|
|
|
|
|
|
|
|
|
|
@@ -914,8 +989,8 @@ relinstFolder = "../../install_root" # relative path
|
|
|
|
|
baseins = ['bdist_wheel', '--dist-dir', relinstFolder+'/Python']
|
|
|
|
|
|
|
|
|
|
windowsDTUslave = PythonSlaveConfig("windows-DTU-slave")
|
|
|
|
|
windowsDTUslave.pyact[getIDstr("windows", "32bit", 0 )] = "\"C:\\Program Files (x86)\\Miniconda32_27\\Scripts\\activate.bat\""
|
|
|
|
|
windowsDTUslave.pyact[getIDstr("windows", "64bit", 0 )] = "\"C:\\Program Files\\Miniconda64_27\\Scripts\\activate.bat\""
|
|
|
|
|
windowsDTUslave.pyact[getIDstr("windows", "32bit", 0 )] = "set \"PATH=C:\\Program Files (x86)\\Miniconda32_27\\Scripts;%PATH%\" && activate"
|
|
|
|
|
windowsDTUslave.pyact[getIDstr("windows", "64bit", 0 )] = "set \"PATH=C:\\Program Files\\Miniconda64_27\\Scripts;%PATH%\" && activate"
|
|
|
|
|
windowsDTUslave.pyenv[getIDstr("windows", 0 , "py27")] = "CoolProp27"
|
|
|
|
|
windowsDTUslave.pyenv[getIDstr("windows", 0 , "py33")] = "CoolProp33"
|
|
|
|
|
windowsDTUslave.pyenv[getIDstr("windows", 0 , "py34")] = "CoolProp34"
|
|
|
|
|
@@ -948,7 +1023,21 @@ osxIPUslave.pyenv[getIDstr( "osx" , "64bit", "py33")] = "CoolProp33"
|
|
|
|
|
osxIPUslave.pyenv[getIDstr( "osx" , "64bit", "py34")] = "CoolProp34"
|
|
|
|
|
osxIPUslave.pyins[getIDstr( "osx" , 0 , 0 )] = baseins
|
|
|
|
|
|
|
|
|
|
pythonSlaves = [windowsDTUslave, osxIPUslave]
|
|
|
|
|
l64IPUslave = PythonSlaveConfig("Linux64-IPU-slave")
|
|
|
|
|
l64IPUslave.pyact[getIDstr( "linux" , "64bit", 0 )] = "source /home/jowr/miniconda3/bin/activate"
|
|
|
|
|
l64IPUslave.pyenv[getIDstr( "linux" , "64bit", "py27")] = "CoolProp27"
|
|
|
|
|
l64IPUslave.pyenv[getIDstr( "linux" , "64bit", "py33")] = "CoolProp33"
|
|
|
|
|
l64IPUslave.pyenv[getIDstr( "linux" , "64bit", "py34")] = "CoolProp34"
|
|
|
|
|
l64IPUslave.pyins[getIDstr( "linux" , 0 , 0 )] = baseins
|
|
|
|
|
|
|
|
|
|
l32IPUslave = PythonSlaveConfig("Linux32-IPU-slave")
|
|
|
|
|
l32IPUslave.pyact[getIDstr( "linux" , "32bit", 0 )] = "source /home/jowr/miniconda3/bin/activate"
|
|
|
|
|
l32IPUslave.pyenv[getIDstr( "linux" , "32bit", "py27")] = "CoolProp27"
|
|
|
|
|
l32IPUslave.pyenv[getIDstr( "linux" , "32bit", "py33")] = "CoolProp33"
|
|
|
|
|
l32IPUslave.pyenv[getIDstr( "linux" , "32bit", "py34")] = "CoolProp34"
|
|
|
|
|
l32IPUslave.pyins[getIDstr( "linux" , 0 , 0 )] = baseins
|
|
|
|
|
|
|
|
|
|
pythonSlaves = [windowsDTUslave, osxIPUslave, l64IPUslave, l32IPUslave]
|
|
|
|
|
|
|
|
|
|
for slave in pythonSlaves:
|
|
|
|
|
for pyID in slave.getIDs():
|
|
|
|
|
@@ -956,7 +1045,7 @@ for slave in pythonSlaves:
|
|
|
|
|
BuilderConfig(
|
|
|
|
|
name="-".join(["Python", "binaries", getJobName(pyID)]),
|
|
|
|
|
slavenames=[slave.name],
|
|
|
|
|
factory = pythonFactory(pyID, pyCFG=slave, gitMode = 'incremental')
|
|
|
|
|
factory = pythonFactory(pyID, pyCFG=slave)
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -977,12 +1066,12 @@ for slave in pythonSlaves:
|
|
|
|
|
# BuilderConfig(
|
|
|
|
|
# name="-".join(["Python", "binaries", getJobName(pyID)]),
|
|
|
|
|
# slavenames=enabledIDs[pyID],
|
|
|
|
|
# factory = pythonFactory(pyID, pyCFG=slave, gitMode = 'incremental')
|
|
|
|
|
# factory = pythonFactory(pyID, pyCFG=slave)
|
|
|
|
|
# )
|
|
|
|
|
# )
|
|
|
|
|
|
|
|
|
|
windowsDTUslave.pyact[getIDstr("windows", "32bit", 0 )] = "\"C:\\Program Files (x86)\\Miniconda32_27\\Scripts\\activate.bat\""
|
|
|
|
|
windowsDTUslave.pyact[getIDstr("windows", "64bit", 0 )] = "\"C:\\Program Files\\Miniconda64_27\\Scripts\\activate.bat\""
|
|
|
|
|
windowsDTUslave.pyact[getIDstr("windows", "32bit", 0 )] = "set \"PATH=C:\\Program Files (x86)\\Miniconda32_27\\Scripts;%PATH%\" && activate"
|
|
|
|
|
windowsDTUslave.pyact[getIDstr("windows", "64bit", 0 )] = "set \"PATH=C:\\Program Files\\Miniconda64_27\\Scripts;%PATH%\" && activate"
|
|
|
|
|
windowsDTUslave.pyenv[getIDstr("windows", 0 , "py27")] = "CoolProp27"
|
|
|
|
|
|
|
|
|
|
c['builders'].append(
|
|
|
|
|
@@ -1034,17 +1123,26 @@ c['builders'].append(
|
|
|
|
|
#Common boring 64-bit modules for windows, linux and OSX
|
|
|
|
|
### OSX
|
|
|
|
|
for platform in ['OSX', 'linux', 'windows']:
|
|
|
|
|
for wrapper in ['Java','Csharp','Octave','PHP','64BIT_SHARED_LIBRARY','64BIT_STATIC_LIBRARY','MATHEMATICA','VBDOTNET']:
|
|
|
|
|
for wrapper in ['Java','Csharp','Octave','PHP','64BIT_SHARED_LIBRARY','64BIT_STATIC_LIBRARY','MATHEMATICA','VBDOTNET','R']:
|
|
|
|
|
if wrapper == 'PHP' and platform != 'linux': continue # only build PHP on linux
|
|
|
|
|
if wrapper == 'VBDOTNET' and not platform.startswith('windows'): continue # only build VB.net on windows
|
|
|
|
|
ctest_args, cmake_args, build_args = [], ['-DCMAKE_BUILD_TYPE=Release','-DCMAKE_VERBOSE_MAKEFILE=ON'], ['--config','Release']
|
|
|
|
|
cmake_env = {}
|
|
|
|
|
if wrapper == '64BIT_SHARED_LIBRARY':
|
|
|
|
|
cmake_args += ['-DCOOLPROP_SHARED_LIBRARY=ON']
|
|
|
|
|
if wrapper == '64BIT_STATIC_LIBRARY':
|
|
|
|
|
cmake_args += ['-DCOOLPROP_STATIC_LIBRARY=ON','-DCOOLPROP_EXTERNC_LIBRARY=ON']
|
|
|
|
|
if wrapper == 'R':
|
|
|
|
|
if platform.startswith('windows'):
|
|
|
|
|
cmake_args += ['-DR_BIN="C:/Program Files/R/R-3.2.1/bin/x64"']
|
|
|
|
|
elif platform == 'OSX':
|
|
|
|
|
cmake_args += ['-DR_BIN="/usr/bin"']
|
|
|
|
|
cmake_env = {'DYLD_LIBRARY_PATH': '/opt/refprop'}
|
|
|
|
|
else:
|
|
|
|
|
cmake_args += ['-DR_BIN="/usr/bin"']
|
|
|
|
|
if platform.startswith('windows'):
|
|
|
|
|
ctest_args = ['-C', 'Release']
|
|
|
|
|
if wrapper == 'Octave':
|
|
|
|
|
if wrapper in ['Octave', 'R']:
|
|
|
|
|
cmake_args += ['-G', '"MinGW Makefiles"']
|
|
|
|
|
elif wrapper == 'VBDOTNET':
|
|
|
|
|
cmake_args += ['-G', '"Visual Studio 11 2012 Win64"']
|
|
|
|
|
@@ -1058,6 +1156,7 @@ for platform in ['OSX', 'linux', 'windows']:
|
|
|
|
|
slavenames=[platform + platmod +"-slave"],
|
|
|
|
|
factory = cmake_slave(wrapper,
|
|
|
|
|
platform = platform,
|
|
|
|
|
cmake_env = cmake_env,
|
|
|
|
|
ctest_args = ctest_args,
|
|
|
|
|
cmake_args = cmake_args,
|
|
|
|
|
build_args = build_args)
|
|
|
|
|
|