Master config updated, Fortran 64 bit and new Python slaves

This commit is contained in:
Jorrit Wronski
2014-11-17 23:51:28 +01:00
parent ff91925a27
commit 7d7c32301a
2 changed files with 38 additions and 17 deletions

View File

@@ -77,7 +77,7 @@ steps on a Windows machine::
pip install wheel
deactivate
Please repeat the steps above for both 32bit and 64bit Python environments.
Please repeat the steps above for both 32bit and 64bit Python environments.
On a Linux system, things only change a little bit::
@@ -100,7 +100,7 @@ POSIX specification.
At the moment, it is not possible to use several slaves for the same build job.
We have to find a new way to generate the configuration.
Information on building the single wrappers can be found on
Information on building the single wrappers can be found on
:ref:`this dedicated page<wrapper_common_prereqs>`.
For uploading generated binary python files to PYPI, you should create a file ``~\.pypirc`` with the contents::
@@ -142,14 +142,14 @@ also use a service wrapper like `NSSM <http://nssm.cc/>`_ to start the script.
Buildbot as a daemon (Linux)
----------------------------
On linux, you can add the following lines to the end of your ``~/.profile`` file (similar
ideas apply on other platforms) to autostart the slave when the user logs in::
On Linux, you can add the following lines to the end of your ``~/.profile`` file (similar
ideas apply on other platforms) to start the slave automatically at user log in::
# Connect to the buildbot master
buildslave start ~/slave
... or even better, you install a service that gets started and shutdown together with
your computer. For Debian/Ubuntu, we recommend as script like::
your computer. For Debian/Ubuntu, we recommend a script like::
#! /bin/sh
### BEGIN INIT INFO
@@ -225,11 +225,11 @@ your computer. For Debian/Ubuntu, we recommend as script like::
esac
exit 0
Which the can be added to the scheduler with ``update-rc.d buildslave defaults``.
Which then can be added to the scheduler with ``update-rc.d buildslave defaults``.
This should gracefully terminate the bot at shutdown and restart it again after reboot.
To disable the service, run ``update-rc.d -f buildslave remove``. You can enable and
disable the daemon by runnning ``update-rc.d buildslave enable|disable``. Note that the
example above call a user-script that activates the virtual environment and starts
example above calls a user-script that activates the virtual environment and starts
the buildslave. Such a script could look like this::
#! /bin/bash

View File

@@ -19,6 +19,7 @@ c['slaves'] = [BuildSlave("linux-slave", pass_dict["linux-slave"], max_builds =
BuildSlave("OSX-slave", pass_dict["OSX-slave"], max_builds = 1),
BuildSlave("windows-slave", pass_dict["windows-slave"], max_builds = 1),
BuildSlave("linux32-slave", pass_dict["linux32-slave"], max_builds = 1),
BuildSlave("linux64-slave", pass_dict["linux64-slave"], max_builds = 1),
BuildSlave("windows-DTU-slave", pass_dict["windows-DTU-slave"], max_builds = 1)
]
@@ -369,18 +370,24 @@ def cmakeFactory(mod_name = None, gitMode = 'incremental', install = True, pre_c
return factory
def fortranFactory(platform=1):
def fortranFactory(platform=1,bitness=1):
working_folder = "build/build" # Same as in cmakeFactory
fortran_folder = "build/wrappers/Fortran/detailed_example" #
#
if platform==platformID["windows"]:
cmake_args = ["-DCOOLPROP_EXTERNC_STATIC_LIBRARY=ON","-G", "\"MinGW Makefiles\""]
if bitness==bitnessID["32bit"]:
cmake_args = ["-DCOOLPROP_EXTERNC_STATIC_LIBRARY=ON","-G", "\"MinGW Makefiles\""]
else:
cmake_args = ["-DSTATIC_LIBRARY=ON","-G", "\"MinGW Makefiles\""]
cp_cmd = "copy /Y *.f90 ..\\..\\..\\build"
build_cmd = "gfortran -c -Wall cpinterface.f90 cool_fortran_bind.f90"
link_cmd = "gfortran -o main *.o libCoolProp.a -lstdc++"
exec_cmd = "main"
elif platform==platformID["linux"]:
cmake_args = ["-DCOOLPROP_EXTERNC_STATIC_LIBRARY=ON"]
if bitness==bitnessID["32bit"]:
cmake_args = ["-DCOOLPROP_EXTERNC_STATIC_LIBRARY=ON"]
else:
cmake_args = ["-DSTATIC_LIBRARY=ON"]
cp_cmd = "cp *.f90 ../../../build/"
build_cmd = "gfortran -c -Wall cpinterface.f90 cool_fortran_bind.f90"
link_cmd = "gfortran -o main *.o libCoolProp.a -lstdc++ -ldl"
@@ -472,7 +479,7 @@ def excel_slave(gitMode = 'incremental'):
factory.addStep(ShellCommand(command=["cmake", "--build", ".", "--target", "install", "--config", "Release"], workdir = working_folder+'/32bitDLL', haltOnFailure = True))
# Copy the created DLL
factory.addStep(ShellCommand(command=' '.join(["copy", "/Y", "install_root\\shared_library\\Windows\\32bit__stdcall_calling_convention\\CoolProp.dll", "bin\\MicrosoftExcel"]), workdir = 'build', haltOnFailure = True))
# ***************
# Make 64-bit DLL
# ***************
@@ -483,7 +490,7 @@ def excel_slave(gitMode = 'incremental'):
factory.addStep(MakeDirectory(dir='build\\bin\\MicrosoftExcel', haltOnFailure = True))
factory.addStep(ShellCommand(command=' '.join(["copy", "/Y", "install_root\\shared_library\\Windows\\64bit\\CoolProp.dll", "bin\\MicrosoftExcel\\CoolProp_x64.dll"]), workdir = 'build', haltOnFailure = True))
# Copy other files
factory.addStep(ShellCommand(command=["copy", "wrappers\Excel\CoolProp.xlam", "bin\MicrosoftExcel"], workdir = 'build', haltOnFailure = True))
factory.addStep(ShellCommand(command=["copy", "wrappers\Excel\CoolProp.xla", "bin\MicrosoftExcel"], workdir = 'build', haltOnFailure = True))
@@ -662,7 +669,7 @@ def SWIG_scilab_bin_builder(platform, gitMode = 'incremental', windows = False):
url="nightly/swig+SCILAB/"+platform,
compress="bz2"))
return factory
def vxworks_module_builder(gitMode = 'incremental', cmake_args = [], cmake_env = None):
"""
These generated files are needed for the other swig builders and are cross-platform
@@ -680,7 +687,7 @@ def vxworks_module_builder(gitMode = 'incremental', cmake_args = [], cmake_env =
factory.addStep(ShellCommand(command = 'cmake --build . --target install', workdir = 'build/build', haltOnFailure = True))
# Upload the files
factory.addStep(DirectoryUpload(slavesrc="install_root", masterdest="public_html/binaries",url="binaries",compress="bz2"))
return factory
return factory
from buildbot.config import BuilderConfig
@@ -754,6 +761,13 @@ linuxDTUslave.pyenv[getIDstr( "linux" , 0 , "py33")] = "CoolProp33"
linuxDTUslave.pyenv[getIDstr( "linux" , 0 , "py34")] = "CoolProp34"
linuxDTUslave.pyins[getIDstr( "linux" , "32bit", 0 )] = baseins
linuxJorritSlave = PythonSlaveConfig("linux64-slave")
linuxJorritSlave.pyact[getIDstr( "linux" , "64bit", 0 )] = "source /home/jorrit/miniconda/bin/activate"
linuxJorritSlave.pyenv[getIDstr( "linux" , 0 , "py27")] = "CoolProp27"
linuxJorritSlave.pyenv[getIDstr( "linux" , 0 , "py33")] = "CoolProp33"
linuxJorritSlave.pyenv[getIDstr( "linux" , 0 , "py34")] = "CoolProp34"
linuxJorritSlave.pyins[getIDstr( "linux" , "64bit", 0 )] = baseins
osxIANslave = PythonSlaveConfig("OSX-slave")
osxIANslave.pyact[getIDstr( "osx" , "64bit", 0 )] = "source activate"
osxIANslave.pyenv[getIDstr( "osx" , "64bit", "py27")] = "py27"
@@ -761,7 +775,7 @@ osxIANslave.pyenv[getIDstr( "osx" , "64bit", "py33")] = "py33"
osxIANslave.pyenv[getIDstr( "osx" , "64bit", "py34")] = "py34"
osxIANslave.pyins[getIDstr( "osx" , 0 , 0 )] = baseins
pythonSlaves = [windowsDTUslave, linuxDTUslave, osxIANslave]
pythonSlaves = [windowsDTUslave, linuxDTUslave, linuxJorritSlave, osxIANslave]
for slave in pythonSlaves:
for pyID in slave.getIDs():
@@ -811,16 +825,23 @@ c['builders'].append(
BuilderConfig(
name="Fortran-executable-windows-32bit-MinGW-ExternC",
slavenames=["windows-DTU-slave"],
factory = fortranFactory(platform=platformID["windows"])
factory = fortranFactory(platform=platformID["windows"],bitness=bitnessID["32bit"])
)
)
c['builders'].append(
BuilderConfig(
name="Fortran-executable-linux-32bit-GCC-ExternC",
slavenames=["linux32-slave"],
factory = fortranFactory(platform=platformID["linux"])
factory = fortranFactory(platform=platformID["linux"],bitness=bitnessID["32bit"])
)
)
c['builders'].append(
BuilderConfig(
name="Fortran-executable-linux-64bit-GCC",
slavenames=["linux64-slave"],
factory = fortranFactory(platform=platformID["linux"],bitness=bitnessID["64bit"])
)
)
#Common boring 64-bit modules for windows, linux and OSX
### OSX