This page describes in detail the procedure for building and testing the various binaries and installers that make up the libSBML release. This is done in two main stages: creating and stabilizing the source archives and then building and testing the various installers.
Creating and stabilizing source archives
The first stage is stabilizing the source archives. This involves first creating the archives, then testing the content, doing non-standard builds and repeating the process until everything works as expected.
Create the archives
- The src archive for just libsbml-core is created using a GNU Make build on libsbml trunk SVN.
- Configure enabling the language bindings for C#, Java, Perl, Python, Ruby & Matlab; disabling all SBML L3 packages and enabling check.
- Run
make check
and ensure all tests pass. - Run
make dist-zip
- Rename the files produced to
libsbml-X.Y.Z-core-src
.
- The individual src archives for each SBML L3 package are created by running the windows batch files that generate these.
- In libsbml trunk change to
libsbml/dev/packages/create-archives
and run each of the batch files. - In libsbml-experimental branch change to
libsbml-experimental/dev/packages/create-archives
and run each of the batch files.
- In libsbml trunk change to
- The src archive for core plus stable packages is created.
- Extract the archive created in Step 1.
- Extract the archive for each stable package over the extracted core code.
- Create a CMake build directory for the extracted source.
- Change to the CMake build directory.
- Run
cpack -G ZIP
to create the .zip file. - Run
cpack -G TGZ
to create the .tar.gz file.
- Run
- Rename the files produced to
libsbml-X.Y.Z-core-plus-packages-src
.
- The src archive for core plus all packages is created.
- Extract the archive created in Step 3.
- Extract the archive for each experimental package over the extracted code.
- Create a CMake build directory for the extracted source.
- Change to the CMake build directory.
- Run
cpack -G ZIP
to create the .zip file. - Run
cpack -G TGZ
to create the .tar.gz file.
- Run
- Rename the files produced to
libsbml-X.Y.Z-Source
.
Test archives
- Each archive is extracted somewhere completely separated and checked against the SVN repository to ensure it contains all the necessary files and the correct versions of these. This step is a manual step and requires someone to do a diff on the directories and assess the results.
- At least one build is done from the src archives to double check everything necessary is present.
- If any problems are encountered, the necessary corrections are made and the archives are recreated.
Check non-standard builds
This step involves doing builds with the different possible configurations of libsbml and using platforms/compilers that we do not generally use in day to day development.
LibSBML is built and the unit tests run for each of the listed options below. These builds are done using the source archives that have been produced during the stages above. If any issues are found and fixed it is necessary to recreate and test the affected archives.
Configuration options
with-strict-includes
with-namespace
with-legacy-math
with-expat
with-xerces
- different C++ standards (by overriding the
CXXFLAGS
, orCMAKE_CXX_FLAGS
withstd=c++0x
std=c++11
std=c++14
std=c++98
Platforms/compilers
- Clang compiler
- Borland compiler
- Using cygwin
- Using a standalone gnumake build (no cmake involved) with
- GCC 5.1
- GCC 5.2
- GCC 4.2
- GCC 3.4
- ARM processor
The creation of archives and testing phases cycle until the source archives produce successful builds on all platforms/configuration/compiler options.
Building and testing installers
The next stage is to build and test installers. Installers are built and then tested on a machine that is NOT the machine they were built on. The criteria tested are:
- The Installer itself runs correctly.
- The Installed files work as expected.
- One of the libSBML example programs is built and run.
- Language bindings are tested by running the relevant unit tests.
These builds can be done concurrently and if problems occur then the installer with issues is rebuilt. Note each installer is built twice - once using the stable release and once for experimental.
Windows
The windows installers and binary packages are built automatically on raterule.caltech.edu.
These are all downloaded and individually tested on SMK_Win.
Mac OS X
The Mac OS X Packages are built for the release. At time of writing (December 2015) the following builds are done.
Version | Build machine | Test machine |
---|---|---|
latest | FTB_Mac | SMK_Mac |
Yosemite (10.10) | Remote machine at Caltech | FTB_Mac |
SnowLeopard (10.6) | SMK_Mac | FTB_Mac |
We continue to support the 10.6 build as it is the last Mac OS X to support PowerPC applications.
Linux
The Linux Packages are built for the release. At time of writing (December 2015) the following builds are done.
Version | Build machine | Test machine |
---|---|---|
CentOS 4.8 32-bit (.rpm) | FTB_VM_C | SMK_EBI |
CentOS 4.8 64-bit (.rpm) | FTB_VM_C | SMK_EBI |
Ubuntu 8.08 32-bit (.deb) | FTB_VM_U | SMK_VM_U |
Ubuntu 8.08 64-bit (.deb) | FTB_VM_U | SMK_VM_U |
We use the packages built on these old versions of Linux as the binaries created will work on all newer Linux distributions. (as libc and libstdc++ are backwards compatible).
MATLAB Interface
We provide separate bundles of the only the MATLAB interface for each operating system. The following builds are done.
OS | Build machine | Test machine |
---|---|---|
Linux 32-bit | FTB_VM_C | FTB_VM_U |
Linux 64-bit | FTB_VM_C | FTB_VM_U |
Windows | raterule.caltech.edu | SMK_Win |
Mac OS X | SMK_Mac | FTB_Mac |
Once all the matlab bindings are built, we bundle them all together into a combined archive for release.
R Interface
Here we provide a source package for use on Linux/Mac and a binary package for use on Windows.
The Windows binary package is created on raterule.caltech.edu and tested on SMK_Win.
R source package
The source package is created on FTB_Mac using the following:
- Use a fresh SVN checkout. We have noticed that if a libsbml src tree has been configured with GNUMake some of the files cause conflict when configuring CMake for package creation.
- Configure with cmake option
WITH_CREATE_R_SOURCE=ON
. - Run CMake build to create the R source package.
The R source package needs to be tested manually by running R CMD check <r source archive>
which is done on SMK_Mac.
Python Interface
The source package is created on FTB_Mac using the following:
- Use a fresh SVN checkout. We have noticed that if a libsbml src tree has been configured with GNUMake some of the files cause conflict when configuring CMake for package creation.
- Configure with cmake option
WITH_CREATE_PYTHON_SOURCE=ON
. - Run CMake build to create the Python source package.
This next two stages are done prior to the main Release to allow for testing.
OBS
- Log onto the openbuildservice.
- Upload the source archives to: python-libsbml or python-libsbml-experimental
- Modify the following files on the OBS:
debian.changelog
: add the new line for the new release (Formatting has to be precise, no added spaces or indentations, otherwise debian builds will fail)python-libsbml.changes
: the same new lines for the new release for RPM buildspython-libsbml.dsc
: update the link to the new file by updating the fields: Version, Debtransform-Tar and the Files.python-libsbml.spec
: update the link to the new file by updating the fields: Version and Source0
- Wait for the builds to complete, and spot check download individual files and verify that they work.
- Check that list of distributions is up to date.
PyPi
- Using the Python source package change into the CMake build directory.
- Change into
src/bindings/python/out
. - Run
python setup.py register
. This will create a new release on pypi. - Log into the pypi account.
- Upload the created source archive. (Automatic submission does not work, as not all the files are submitted).
- Test a
pip install python-libsbml
and check python libsbml tests run.
Testing of OBS and PyPi is done on various Mac and Linux VMs.
Test machines
A key to the different machines used for building and testing.
Nickname | Machine OS |
---|---|
FTB_VM_C | VMWare installation of CentOS 4.8 |
FTB_VM_U | VMWare installation of Ubuntu 8.08 |
SMK_Win | Windows 8.1 |
SMK_Mac | Mac OS 10.6 |
FTB_Mac | Mac OS 10.11 |
SMK_VM_U | VMWare installation of Ubuntu 15.04 |
SMK_EBI | RedHat Enterprise Linux 6.7 |