forked from rdkit/rdkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mac_build.yml
86 lines (86 loc) · 3.33 KB
/
mac_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
steps:
- bash: |
wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/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 config --set solver libmamba
conda config --set channel_priority strict
conda config --add channels conda-forge
conda create --name rdkit_build $(python) $(compiler) libcxx cmake \
libboost=$(boost_version) libboost-devel=$(boost_version) \
libboost-python=$(boost_version) libboost-python-devel=$(boost_version) \
qt \
numpy matplotlib=3.8 cairo pillow eigen pandas=2.1 \
jupyter=1.0 ipython=8.20 sphinx myst-parser pytest nbval
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}
export CXXFLAGS="${CXXFLAGS} -Wall -Werror"
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_BUILD_COORDGEN_SUPPORT=ON \
-DRDK_BUILD_MAEPARSER_SUPPORT=ON \
-DRDK_OPTIMIZE_POPCNT=ON \
-DRDK_BUILD_TEST_GZIP=ON \
-DRDK_BUILD_FREESASA_SUPPORT=ON \
-DRDK_BUILD_AVALON_SUPPORT=ON \
-DRDK_BUILD_INCHI_SUPPORT=ON \
-DRDK_BUILD_YAEHMOP_SUPPORT=ON \
-DRDK_BUILD_XYZ2MOL_SUPPORT=ON \
-DRDK_BUILD_CAIRO_SUPPORT=ON \
-DRDK_BUILD_QT_SUPPORT=ON \
-DRDK_BUILD_SWIG_WRAPPERS=OFF \
-DRDK_SWIG_STATIC=OFF \
-DRDK_BUILD_THREADSAFE_SSS=ON \
-DRDK_TEST_MULTITHREADED=ON \
-DRDK_BUILD_CFFI_LIB=ON \
-DCMAKE_OSX_SYSROOT=${SDKROOT} \
-DCMAKE_OSX_DEPLOYMENT_TARGET=$(target_platform)
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