Some cleanups to make Travis builds faster (#1464)

* a bit of cleanup and modernization

* switch to -j3

* back to -j2

* disable static libs

* allow dynamic linking of swig wrappers

* turn off the py27 builds while we are testing

* Install java and SWIG

* re-enable python2.7
This commit is contained in:
Greg Landrum
2017-06-19 03:55:24 +02:00
committed by Brian Kelley
parent 83d62a71f2
commit 66779dfc8d
3 changed files with 37 additions and 50 deletions

View File

@@ -10,7 +10,7 @@ sudo: false
before_install:
# download and install miniconda
- wget http://repo.continuum.io/miniconda/Miniconda-3.5.5-Linux-x86_64.sh -O miniconda.sh;
- wget https://repo.continuum.io/miniconda/Miniconda3-4.3.21-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/conda
- export PATH="$HOME/conda/bin:$PATH"
- hash -r
@@ -20,7 +20,7 @@ before_install:
- conda info -a
# create and activate the build/test environment
- conda create -q -n tenv python=$TRAVIS_PYTHON_VERSION pip cmake
- conda create -q -n tenv python=$TRAVIS_PYTHON_VERSION cmake
- source activate tenv
# additional .debs we need:
@@ -60,8 +60,7 @@ script:
- cd $RDBASE
- mkdir build
- cd build
- cmake -D Python_ADDITIONAL_VERSIONS=$TRAVIS_PYTHON_VERSION -D PYTHON_EXECUTABLE=$PYTHON -D PYTHON_LIBRARY=`find $PY_PREFIX -name "libpython$TRAVIS_PYTHON_VERSION*.so"` -D PYTHON_NUMPY_INCLUDE_PATH=$PY_SP_DIR/numpy/core/include -D BOOST_ROOT=$PY_PREFIX -D Boost_NO_SYSTEM_PATHS=ON -D RDK_BUILD_SWIG_WRAPPERS=ON -D RDK_BUILD_AVALON_SUPPORT=ON -D RDK_BUILD_INCHI_SUPPORT=ON -DRDK_BUILD_THREADSAFE_SSS=on -DRDK_TEST_MULTITHREADED=on ..
- cat CMakeCache.txt # useful for debugging/troubleshooting
- cmake -D Python_ADDITIONAL_VERSIONS=$TRAVIS_PYTHON_VERSION -D PYTHON_EXECUTABLE=$PYTHON -D PYTHON_LIBRARY=`find $PY_PREFIX -name "libpython$TRAVIS_PYTHON_VERSION*.so"` -D PYTHON_NUMPY_INCLUDE_PATH=$PY_SP_DIR/numpy/core/include -D BOOST_ROOT=$PY_PREFIX -D Boost_NO_SYSTEM_PATHS=ON -D RDK_BUILD_AVALON_SUPPORT=ON -D RDK_BUILD_INCHI_SUPPORT=ON -DRDK_BUILD_THREADSAFE_SSS=on -DRDK_TEST_MULTITHREADED=on -DRDK_INSTALL_STATIC_LIBS=OFF -DRDK_BUILD_SWIG_WRAPPERS=ON -DRDK_SWIG_STATIC=OFF ..
- make -j2
- make install

View File

@@ -31,6 +31,7 @@ option(RDK_BUILD_SLN_SUPPORT "include support for the SLN format" ON )
option(RDK_TEST_MULTITHREADED "run some tests of multithreading" ON )
option(RDK_BUILD_SWIG_JAVA_WRAPPER "build the SWIG JAVA wrappers (does nothing if RDK_BUILD_SWIG_WRAPPERS is not set)" ON )
option(RDK_BUILD_SWIG_CSHARP_WRAPPER "build the experimental SWIG C# wrappers (does nothing if RDK_BUILD_SWIG_WRAPPERS is not set)" OFF )
option(RDK_SWIG_STATIC "statically link rdkit libraries into the SWIG wrappers" ON )
option(RDK_TEST_MMFF_COMPLIANCE "run MMFF compliance tests (requires tar/gzip)" ON )
option(RDK_BUILD_CPP_TESTS "build the c++ tests (disabing can speed up builds" ON)
option(RDK_USE_FLEXBISON "use flex/bison, if available, to build the SMILES/SMARTS/SLN parsers" OFF)
@@ -51,6 +52,14 @@ if(RDK_BUILD_SWIG_WRAPPERS!=ON)
set(RDK_BUILD_SWIG_CSHARP_WRAPPER OFF)
endif()
if(RDK_SWIG_STATIC AND RDK_BUILD_SWIG_WRAPPERS)
if(NOT RDK_INSTALL_STATIC_LIBS)
message("Enabling RDK_INSTALL_STATIC_LIBS because RDK_SWIG_STATIC is set.")
set(RDK_INSTALL_STATIC_LIBS ON CACHE BOOL "install the rdkit static libraries" FORCE)
endif(NOT RDK_INSTALL_STATIC_LIBS)
endif()
if(RDK_PGSQL_STATIC AND RDK_BUILD_PGSQL)
if(NOT RDK_INSTALL_STATIC_LIBS)
message("Enabling RDK_INSTALL_STATIC_LIBS because RDK_PGSQL_STATIC is set.")

View File

@@ -5,53 +5,32 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
SET(CMAKE_SWIG_FLAGS "")
if(WIN32)
set(RDKit_Wrapper_Libs
FilterCatalog
Catalogs
${Boost_SERIALIZATION_LIBRARY}
FMCS MolDraw2D
FileParsers SmilesParse
Depictor SubstructMatch ChemReactions Fingerprints ChemTransforms
Descriptors MolTransforms PartialCharges
Subgraphs GraphMol DataStructs Trajectory
DistGeomHelpers DistGeometry ForceFieldHelpers ForceField
EigenSolvers
Optimizer
MolAlign
Alignment
SimDivPickers
RDGeometryLib RDGeneral )
if(RDK_BUILD_INCHI_SUPPORT)
set(RDKit_Wrapper_Libs RDInchiLib Inchi ${RDKit_Wrapper_Libs})
endif(RDK_BUILD_INCHI_SUPPORT)
if(RDK_BUILD_AVALON_SUPPORT)
set(RDKit_Wrapper_Libs AvalonLib avalon_clib ${RDKit_Wrapper_Libs})
endif(RDK_BUILD_AVALON_SUPPORT)
else()
set(RDKit_Wrapper_Libs
Catalogs_static
FilterCatalog_static
${Boost_SERIALIZATION_LIBRARY}
FMCS_static MolDraw2D_static
FileParsers_static SmilesParse_static
Depictor_static SubstructMatch_static ChemReactions_static Fingerprints_static ChemTransforms_static
Subgraphs_static GraphMol_static DataStructs_static Trajectory_static Descriptors_static
PartialCharges_static MolTransforms_static DistGeomHelpers_static DistGeometry_static
ForceFieldHelpers_static ForceField_static
EigenSolvers_static
Optimizer_static
MolAlign_static
Alignment_static
SimDivPickers_static
RDGeometryLib_static RDGeneral_static )
if(RDK_BUILD_INCHI_SUPPORT)
set(RDKit_Wrapper_Libs RDInchiLib_static Inchi_static ${RDKit_Wrapper_Libs})
endif(RDK_BUILD_INCHI_SUPPORT)
if(RDK_BUILD_AVALON_SUPPORT)
set(RDKit_Wrapper_Libs AvalonLib_static avalon_clib_static ${RDKit_Wrapper_Libs})
endif(RDK_BUILD_AVALON_SUPPORT)
set(swigRDKitLibSuffix "")
if(RDK_SWIG_STATIC AND (NOT MSVC))
set(swigRDKitLibSuffix "_static")
endif()
set(swigRDKitLibList "")
if(RDK_BUILD_AVALON_SUPPORT)
set(swigRDKitLibList "${swigRDKitLibList}AvalonLib;avalon_clib;")
endif(RDK_BUILD_AVALON_SUPPORT)
if(RDK_BUILD_INCHI_SUPPORT)
set(swigRDKitLibList "${swigRDKitLibList}RDInchiLib;${INCHI_LIBRARIES};")
endif(RDK_BUILD_INCHI_SUPPORT)
set(swigRDKitLibList "${swigRDKitLibList}"
"FilterCatalog;Catalogs;FMCS;MolDraw2D;FileParsers;SmilesParse;"
"Depictor;SubstructMatch;ChemReactions;Fingerprints;ChemTransforms;"
"Subgraphs;GraphMol;DataStructs;Trajectory;Descriptors;"
"PartialCharges;MolTransforms;DistGeomHelpers;DistGeometry;"
"ForceFieldHelpers;ForceField;EigenSolvers;Optimizer;MolAlign;"
"Alignment;SimDivPickers;RDGeometryLib;RDGeneral;"
)
foreach(swigRDKitLib ${swigRDKitLibList})
set(swigRDKitLibs "${swigRDKitLibs}${swigRDKitLib}${swigRDKitLibSuffix};")
endforeach()
set(swigRDKitLibs "${swigRDKitLibs}${Boost_SERIALIZATION_LIBRARY}")
set(RDKit_Wrapper_Libs ${swigRDKitLibs})
if(RDK_BUILD_SWIG_JAVA_WRAPPER)
add_subdirectory(gmwrapper)