Fixed bb to get SWIG+MATLAB working

This commit is contained in:
coolprop
2014-10-02 07:43:48 -07:00
parent 642b4cc698
commit c25762a6ef

View File

@@ -289,14 +289,15 @@ def swig_matlab_pre(git_mode = 'incremental'):
working_folder = "build/build"
factory.addStep(ShellCommand(command=cleanCommand, description='fullclean?', workdir=""))
factory.addStep(Git(repourl='git://github.com/CoolProp/CoolProp', mode=git_mode, submodules = True, progress=True, haltOnFailure = True))
# Download files from nightly build for swig
factory.addStep(FileDownload(mastersrc = 'public_html/nightly/swig-MATLAB/swig_MATLAB.tar.bz2', slavedest = 'swig_MATLAB.tar.bz2', haltOnFailure = True))
factory.addStep(FileDownload(mastersrc = 'public_html/nightly/swig-MATLAB/swig_MATLAB.7z', slavedest = 'swig_MATLAB.7z', haltOnFailure = True))
# Directory for build
factory.addStep(MakeDirectory(dir='build/build', haltOnFailure = True))
# Untar
factory.addStep(ShellCommand(command = 'tar -C build -xf swig_MATLAB.tar.bz2', workdir = 'build', haltOnFailure = True))
# Unzip
factory.addStep(ShellCommand(command = '7z -y -obuild x swig_MATLAB.7z', workdir = 'build', haltOnFailure = True))
factory.addStep(ShellCommand(command=' '.join(["PATH=swig-matlab-bin/bin:${PATH}","cmake", "..", "-DCOOLPROP_SWIG_MATLAB_MODULE=ON"]),
factory.addStep(ShellCommand(command=' '.join(["PATH=swig-matlab-bin/bin:${PATH}","cmake", "..", "-DCOOLPROP_MATLAB_SWIG_MODULE=ON"]),
workdir= "build/build",
haltOnFailure = True))
factory.addStep(ShellCommand(command=["cmake", "--build", "."],
@@ -304,11 +305,13 @@ def swig_matlab_pre(git_mode = 'incremental'):
haltOnFailure = True))
factory.addStep(MakeDirectory(dir='build/bin', haltOnFailure = True))
# Collect the generated files
factory.addStep(ShellCommand(command=["cp", "CoolProp", "build/bin"], workdir= "build/build", haltOnFailure = True))
factory.addStep(ShellCommand(command=["cp", "CoolProp*.cpp", "build/bin"], workdir= "build/build", haltOnFailure = True))
factory.addStep(ShellCommand(command=["cp", "-avr", "+CoolProp", "../bin"], workdir= "build/build", haltOnFailure = True))
factory.addStep(ShellCommand(command=' '.join(["cp", "-avr", "CoolProp*.cxx", "../bin"]), workdir= "build/build", haltOnFailure = True))
factory.addStep(ShellCommand(command=' '.join(["cp", "-avr", "CoolProp*.mex*", "../bin"]), workdir= "build/build", haltOnFailure = True))
factory.addStep(ShellCommand(command=' '.join(["7z", "a", "../bin/+CoolProp.7z", "+CoolProp"]), workdir= "build/build", haltOnFailure = True))
# Upload the files
factory.addStep(DirectoryUpload(slavesrc="bin",masterdest="public_html/binaries",url="MicrosoftExcel",compress="bz2"))
factory.addStep(DirectoryUpload(slavesrc="bin",masterdest="public_html/binaries/MATLAB",url="MATLAB",compress="bz2"))
return factory
def SWIG_MATLAB_bin_builder():
@@ -325,7 +328,7 @@ def SWIG_MATLAB_bin_builder():
haltOnFailure = True))
factory.addStep(MakeDirectory(dir='build/dev/scripts/swig-MATLAB', haltOnFailure = True))
# Zip up the directory that was generated using bzip
factory.addStep(ShellCommand(command=' '.join(["tar","-cjf","../swig-MATLAB/swig_MATLAB.tar.bz2","swig-matlab-bin"]),
factory.addStep(ShellCommand(command=' '.join(["7z","a","../swig-MATLAB/swig_MATLAB.7z","swig-matlab-bin"]),
workdir= "build/dev/scripts/swig-matlab",
haltOnFailure = True))
# Upload swig+MATLAB