mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
Enable Azure Pipelines builds for CI (#2409)
* working build * enable parallel building under linux, windows * publish test results to azure
This commit is contained in:
60
.azure-pipelines/linux_build.yml
Normal file
60
.azure-pipelines/linux_build.yml
Normal file
@@ -0,0 +1,60 @@
|
||||
steps:
|
||||
- bash: |
|
||||
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 $(compiler) cmake \
|
||||
boost-cpp=$(boost_version) boost=$(boost_version) \
|
||||
py-boost=$(boost_version) libboost=$(boost_version) \
|
||||
numpy matplotlib cairo pillow eigen pandas
|
||||
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=ON \
|
||||
-DRDK_BUILD_COORDGEN_SUPPORT=ON \
|
||||
-DRDK_OPTIMIZE_NATIVE=ON \
|
||||
-DRDK_BUILD_TEST_GZIP=ON \
|
||||
-DRDK_BUILD_FREESASA_SUPPORT=ON \
|
||||
-DRDK_BUILD_AVALON_SUPPORT=ON \
|
||||
-DRDK_BUILD_INCHI_SUPPORT=ON \
|
||||
-DRDK_BUILD_SWIG_WRAPPERS=OFF \
|
||||
-DRDK_SWIG_STATIC=OFF \
|
||||
-DRDK_BUILD_THREADSAFE_SSS=ON \
|
||||
-DRDK_TEST_MULTITHREADED=ON \
|
||||
-DBoost_NO_SYSTEM_PATHS=ON \
|
||||
-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:${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
|
||||
80
.azure-pipelines/mac_build.yml
Normal file
80
.azure-pipelines/mac_build.yml
Normal file
@@ -0,0 +1,80 @@
|
||||
steps:
|
||||
- bash: |
|
||||
wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX$(target_platform).sdk.tar.xz
|
||||
tar Jxvf MacOSX$(target_platform).sdk.tar.xz
|
||||
displayName: Install MacOSX $(target_platform) SDK
|
||||
- script: |
|
||||
echo "Removing homebrew from Azure to avoid conflicts."
|
||||
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall > ~/uninstall_homebrew
|
||||
chmod +x ~/uninstall_homebrew
|
||||
~/uninstall_homebrew -fq
|
||||
rm ~/uninstall_homebrew
|
||||
displayName: Remove homebrew
|
||||
- bash: |
|
||||
source ${CONDA}/etc/profile.d/conda.sh
|
||||
sudo chown -R ${USER} ${CONDA}
|
||||
mkdir -p $HOME/.matplotlib
|
||||
echo -e "backend: TkAgg\n" > $HOME/.matplotlib/matplotlibrc
|
||||
conda config --set always_yes yes --set changeps1 no
|
||||
conda update -q conda
|
||||
conda create --name rdkit_build $(compiler) cmake \
|
||||
boost-cpp=$(boost_version) boost=$(boost_version) \
|
||||
py-boost=$(boost_version) libboost=$(boost_version) \
|
||||
numpy matplotlib cairo pillow eigen pandas
|
||||
displayName: Setup build environment
|
||||
- bash: |
|
||||
source ${CONDA}/etc/profile.d/conda.sh
|
||||
conda activate rdkit_build
|
||||
export SDKROOT="$(pwd)/MacOSX$(target_platform).sdk/"
|
||||
export CONDA_BUILD_SYSROOT=${SDKROOT}
|
||||
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=ON \
|
||||
-DRDK_BUILD_COORDGEN_SUPPORT=ON \
|
||||
-DRDK_OPTIMIZE_NATIVE=ON \
|
||||
-DRDK_BUILD_TEST_GZIP=ON \
|
||||
-DRDK_BUILD_FREESASA_SUPPORT=ON \
|
||||
-DRDK_BUILD_AVALON_SUPPORT=ON \
|
||||
-DRDK_BUILD_INCHI_SUPPORT=ON \
|
||||
-DRDK_BUILD_SWIG_WRAPPERS=OFF \
|
||||
-DRDK_SWIG_STATIC=OFF \
|
||||
-DRDK_BUILD_THREADSAFE_SSS=ON \
|
||||
-DRDK_TEST_MULTITHREADED=ON \
|
||||
-DBoost_NO_SYSTEM_PATHS=ON \
|
||||
-DCMAKE_OSX_SYSROOT=${SDKROOT} \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=$(target_platform) \
|
||||
-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
|
||||
export SDKROOT="$(pwd)/MacOSX$(target_platform).sdk/"
|
||||
export CONDA_BUILD_SYSROOT=${SDKROOT}
|
||||
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 DYLD_FALLBACK_LIBRARY_PATH=${RDBASE}/lib:${RDBASE}/rdkit:${CONDA_PREFIX}/lib:${DYLD_FALLBACK_LIBRARY_PATH}
|
||||
export SDKROOT="$(pwd)/MacOSX$(target_platform).sdk/"
|
||||
export CONDA_BUILD_SYSROOT=${SDKROOT}
|
||||
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
|
||||
56
.azure-pipelines/vs_build.yml
Normal file
56
.azure-pipelines/vs_build.yml
Normal file
@@ -0,0 +1,56 @@
|
||||
steps:
|
||||
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
|
||||
displayName: Setup build environment
|
||||
- script: |
|
||||
conda config --set always_yes yes --set changeps1 no
|
||||
conda update -q conda
|
||||
conda info -a
|
||||
conda create --name rdkit_build $(compiler) cmake ^
|
||||
boost-cpp=$(boost_version) boost=$(boost_version) ^
|
||||
py-boost=$(boost_version) libboost=$(boost_version) ^
|
||||
numpy matplotlib cairo pillow eigen pandas
|
||||
displayName: Install dependencies
|
||||
- script: |
|
||||
set Boost_ROOT=
|
||||
mkdir build && cd build
|
||||
call activate rdkit_build
|
||||
cmake .. ^
|
||||
-G "Visual Studio 15 2017 Win64" ^
|
||||
-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=ON ^
|
||||
-DRDK_BUILD_COORDGEN_SUPPORT=ON ^
|
||||
-DRDK_OPTIMIZE_NATIVE=ON ^
|
||||
-DRDK_BUILD_TEST_GZIP=ON ^
|
||||
-DRDK_BUILD_FREESASA_SUPPORT=OFF ^
|
||||
-DRDK_BUILD_AVALON_SUPPORT=ON ^
|
||||
-DRDK_BUILD_INCHI_SUPPORT=ON ^
|
||||
-DRDK_BUILD_THREADSAFE_SSS=ON ^
|
||||
-DRDK_BUILD_SWIG_WRAPPERS=OFF ^
|
||||
-DRDK_SWIG_STATIC=OFF ^
|
||||
-DRDK_TEST_MULTITHREADED=ON ^
|
||||
-DRDK_BOOST_PYTHON3_NAME=$(python_name) ^
|
||||
-DCMAKE_INCLUDE_PATH=%CONDA_PREFIX%/Library/include ^
|
||||
-DCMAKE_LIBRARY_PATH="%CONDA_PREFIX%/Library/lib
|
||||
displayName: Configure build (Run CMake)
|
||||
- script: |
|
||||
call activate rdkit_build
|
||||
cd build
|
||||
cmake --build . --config Release --target install -j $(number_of_cores)
|
||||
displayName: Build
|
||||
- script: |
|
||||
call activate rdkit_build
|
||||
set RDBASE=%cd%
|
||||
set PYTHONPATH=%RDBASE%;%PYTHONPATH%
|
||||
set PATH=%RDBASE%\lib;%PATH%
|
||||
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
|
||||
38
azure-pipelines.yml
Normal file
38
azure-pipelines.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
trigger:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
- job: Ubuntu_16_04_x64
|
||||
timeoutInMinutes: 90
|
||||
pool:
|
||||
vmImage: ubuntu-16.04
|
||||
variables:
|
||||
compiler: gxx_linux-64=7.2.0
|
||||
boost_version: 1.67.0
|
||||
number_of_cores: nproc
|
||||
python_name: python37
|
||||
steps:
|
||||
- template: .azure-pipelines/linux_build.yml
|
||||
- job: macOS_10_13_x64
|
||||
timeoutInMinutes: 90
|
||||
pool:
|
||||
vmImage: macos-10.13
|
||||
variables:
|
||||
compiler: clangxx_osx-64
|
||||
boost_version: 1.67.0
|
||||
number_of_cores: sysctl -n hw.ncpu
|
||||
python_name: python37
|
||||
target_platform: 10.9
|
||||
steps:
|
||||
- template: .azure-pipelines/mac_build.yml
|
||||
- job: Windows_VS2017_x64
|
||||
timeoutInMinutes: 90
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
variables:
|
||||
compiler: vs2017_win-64
|
||||
boost_version: 1.67.0
|
||||
number_of_cores: '%NUMBER_OF_PROCESSORS%'
|
||||
python_name: python37
|
||||
steps:
|
||||
- template: .azure-pipelines/vs_build.yml
|
||||
Reference in New Issue
Block a user