| 1 |
steps: |
| 2 |
- bash: | |
| 3 |
wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX$(target_platform).sdk.tar.xz |
| 4 |
tar Jxvf MacOSX$(target_platform).sdk.tar.xz |
| 5 |
displayName: Install MacOSX $(target_platform) SDK |
| 6 |
- script: | |
| 7 |
echo "Removing homebrew from Azure to avoid conflicts." |
| 8 |
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall > ~/uninstall_homebrew |
| 9 |
chmod +x ~/uninstall_homebrew |
| 10 |
~/uninstall_homebrew -fq |
| 11 |
rm ~/uninstall_homebrew |
| 12 |
displayName: Remove homebrew |
| 13 |
- bash: | |
| 14 |
source ${CONDA}/etc/profile.d/conda.sh |
| 15 |
sudo chown -R ${USER} ${CONDA} |
| 16 |
echo -e "backend: TkAgg\n" > $HOME/.matplotlib/matplotlibrc |
| 17 |
conda config --set always_yes yes --set changeps1 no |
| 18 |
conda update -q conda |
| 19 |
conda create --name maeparser_build $(compiler) cmake \ |
| 20 |
boost-cpp=$(boost_version) boost=$(boost_version) \ |
| 21 |
py-boost=$(boost_version) libboost=$(boost_version) |
| 22 |
displayName: Setup build environment |
| 23 |
- bash: | |
| 24 |
source ${CONDA}/etc/profile.d/conda.sh |
| 25 |
conda activate maeparser_build |
| 26 |
export SDKROOT="$(pwd)/MacOSX$(target_platform).sdk/" |
| 27 |
export CONDA_BUILD_SYSROOT=${SDKROOT} |
| 28 |
mkdir build && cd build && \ |
| 29 |
cmake .. \ |
| 30 |
-DCMAKE_BUILD_TYPE=Release \ |
| 31 |
-DMAEPARSER_RIGOROUS_BUILD=ON \ |
| 32 |
-DBoost_NO_SYSTEM_PATHS=ON \ |
| 33 |
-DCMAKE_OSX_SYSROOT=${SDKROOT} \ |
| 34 |
-DCMAKE_OSX_DEPLOYMENT_TARGET=$(target_platform) \ |
| 35 |
-DCMAKE_INCLUDE_PATH="${CONDA_PREFIX}/include" \ |
| 36 |
-DCMAKE_LIBRARY_PATH="${CONDA_PREFIX}/lib" \ |
| 37 |
-DMAEPARSER_BUILD_SHARED_LIBS=$(shared_lib) |
| 38 |
displayName: Configure build (Run CMake) |
| 39 |
- bash: | |
| 40 |
source ${CONDA}/etc/profile.d/conda.sh |
| 41 |
conda activate maeparser_build |
| 42 |
export SDKROOT="$(pwd)/MacOSX$(target_platform).sdk/" |
| 43 |
export CONDA_BUILD_SYSROOT=${SDKROOT} |
| 44 |
cd build |
| 45 |
make -j $( $(number_of_cores) ) |
| 46 |
displayName: Build |
| 47 |
- bash: | |
| 48 |
source ${CONDA}/etc/profile.d/conda.sh |
| 49 |
conda activate maeparser_build |
| 50 |
export DYLD_FALLBACK_LIBRARY_PATH=${CONDA_PREFIX}/lib:${DYLD_FALLBACK_LIBRARY_PATH} |
| 51 |
export SDKROOT="$(pwd)/MacOSX$(target_platform).sdk/" |
| 52 |
export CONDA_BUILD_SYSROOT=${SDKROOT} |
| 53 |
cd build |
| 54 |
ctest -j $( $(number_of_cores) ) --output-on-failure -T Test |
| 55 |
displayName: Run tests |
| 56 |
- task: PublishTestResults@2 |
| 57 |
inputs: |
| 58 |
testResultsFormat: "CTest" |
| 59 |
testResultsFiles: "build/Testing/*/Test.xml" |
| 60 |
testRunTitle: $(system.phasedisplayname) CTest Test Run |