* Fixes #3648

Code now builds without either MAEParser or coordgen integration enabled.

* add CI build with minimal dependencies

* remove doctests from the new CI build

they need the cairo support
This commit is contained in:
Greg Landrum
2020-12-17 15:29:59 +01:00
committed by GitHub
parent a7c438f870
commit 72340e33c2
6 changed files with 90 additions and 7 deletions

View File

@@ -0,0 +1,70 @@
steps:
- bash: |
sudo apt-get install g++ wget make libgl1-mesa-dev mesa-common-dev
source ${CONDA}/etc/profile.d/conda.sh
sudo chown -R ${USER} ${CONDA}
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda info -a
conda create --name rdkit_build $(python) cmake \
boost-cpp=$(boost_version) \
py-boost=$(boost_version) \
numpy pillow eigen pandas \
qt
conda activate rdkit_build
conda install -c rdkit nox cairo=1.14.6
displayName: Setup build environment
- bash: |
source ${CONDA}/etc/profile.d/conda.sh
conda activate rdkit_build
mkdir build && cd build && \
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DRDK_INSTALL_INTREE=ON \
-DRDK_INSTALL_STATIC_LIBS=OFF \
-DRDK_BUILD_CPP_TESTS=ON \
-DRDK_BUILD_PYTHON_WRAPPERS=ON \
-DRDK_USE_BOOST_REGEX=OFF \
-DRDK_BUILD_COORDGEN_SUPPORT=OFF \
-DRDK_BUILD_MAEPARSER_SUPPORT=OFF \
-DRDK_OPTIMIZE_POPCNT=ON \
-DRDK_BUILD_TEST_GZIP=OFF \
-DRDK_BUILD_FREESASA_SUPPORT=OFF \
-DRDK_BUILD_AVALON_SUPPORT=OFF \
-DRDK_BUILD_INCHI_SUPPORT=OFF \
-DRDK_BUILD_CAIRO_SUPPORT=OFF \
-DRDK_BUILD_QT_SUPPORT=OFF \
-DQt5_DIR=/usr/lib/x86_64-linux-gnu/cmake/Qt5 \
-DRDK_BUILD_SWIG_WRAPPERS=OFF \
-DRDK_SWIG_STATIC=OFF \
-DRDK_BUILD_THREADSAFE_SSS=ON \
-DRDK_TEST_MULTITHREADED=ON \
-DBoost_NO_SYSTEM_PATHS=ON \
-DBoost_NO_BOOST_CMAKE=TRUE \
-DRDK_BOOST_PYTHON3_NAME=$(python_name) \
-DPYTHON_EXECUTABLE=${CONDA_PREFIX}/bin/python3 \
-DCMAKE_INCLUDE_PATH="${CONDA_PREFIX}/include" \
-DCMAKE_LIBRARY_PATH="${CONDA_PREFIX}/lib"
displayName: Configure build (Run CMake)
- bash: |
source ${CONDA}/etc/profile.d/conda.sh
conda activate rdkit_build
cd build
make -j $( $(number_of_cores) ) install
displayName: Build
- bash: |
source ${CONDA}/etc/profile.d/conda.sh
conda activate rdkit_build
export RDBASE=`pwd`
export PYTHONPATH=${RDBASE}:${PYTHONPATH}
export LD_LIBRARY_PATH=${RDBASE}/lib:${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}
echo "LD_LIBRARY_PATH: " $LD_LIBRARY_PATH
export QT_QPA_PLATFORM='offscreen'
cd build
ctest -j $( $(number_of_cores) ) --output-on-failure -T Test
displayName: Run tests
- task: PublishTestResults@2
inputs:
testResultsFormat: 'CTest'
testResultsFiles: 'build/Testing/*/Test.xml'
testRunTitle: $(system.phasedisplayname) CTest Test Run

View File

@@ -33,9 +33,9 @@
#include <algorithm>
namespace RDDepict {
#ifdef RDK_BUILD_COORDGEN_SUPPORT
bool preferCoordGen = false;
#endif
namespace DepictorLocal {
// arings: indices of atoms in rings
void embedFusedSystems(const RDKit::ROMol &mol,

View File

@@ -22,9 +22,8 @@ class ROMol;
namespace RDDepict {
#ifdef RDK_BUILD_COORDGEN_SUPPORT
RDKIT_DEPICTOR_EXPORT extern bool preferCoordGen;
#endif
RDKIT_DEPICTOR_EXPORT extern bool
preferCoordGen; // Ignored if coordgen support isn't active
typedef boost::shared_array<double> DOUBLE_SMART_PTR;

View File

@@ -144,14 +144,14 @@ std::unique_ptr<MolSupplier> getSupplier(const std::string& path,
std::unique_ptr<MolSupplier> p(smsup);
return p;
}
#ifdef RDK_BUILD_MAEPARSER_SUPPORT
else if (fileFormat == "mae") {
MaeMolSupplier* maesup =
new MaeMolSupplier(strm, true, opt.sanitize, opt.removeHs);
std::unique_ptr<MolSupplier> p(maesup);
return p;
}
#endif
else if (fileFormat == "tdt") {
TDTMolSupplier* tdtsup = new TDTMolSupplier(
strm, true, opt.nameRecord, opt.confId2D, opt.confId3D, opt.sanitize);

View File

@@ -163,6 +163,7 @@ void testSmi() {
}
void testMae() {
#ifdef RDK_BUILD_MAEPARSER_SUPPORT
//! Open uncompressed MAE file format
std::string rdbase = getenv("RDBASE");
std::string fname =
@@ -227,6 +228,7 @@ void testMae() {
TEST_ASSERT(info->getResidueName() == "ARG ");
TEST_ASSERT(info->getChainId() == "A");
TEST_ASSERT(info->getResidueNumber() == 5);
#endif
}
void testTdt() {

View File

@@ -102,3 +102,15 @@ jobs:
number_of_cores: nproc
steps:
- template: .azure-pipelines/linux_build_fuzzer.yml
- job: Ubuntu_18_04_x64_limitexternaldependencies
timeoutInMinutes: 90
pool:
vmImage: ubuntu-18.04
variables:
python: python=3.8
boost_version: 1.71.0
compiler: gxx_linux-64
number_of_cores: nproc
python_name: python38
steps:
- template: .azure-pipelines/linux_build_limitexternal.yml