diff --git a/.azure-pipelines/linux_build.yml b/.azure-pipelines/linux_build.yml new file mode 100644 index 0000000..1063842 --- /dev/null +++ b/.azure-pipelines/linux_build.yml @@ -0,0 +1,39 @@ +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 maeparser_build $(compiler) cmake \ + boost-cpp=$(boost_version) boost=$(boost_version) \ + libboost=$(boost_version) + displayName: Setup build environment +- bash: | + source ${CONDA}/etc/profile.d/conda.sh + conda activate maeparser_build + mkdir build && cd build && \ + cmake .. \ + -DCMAKE_BUILD_TYPE=Release \ + -DMAEPARSER_RIGOROUS_BUILD=ON \ + -DBoost_NO_SYSTEM_PATHS=ON \ + -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 maeparser_build + cd build + make -j $( $(number_of_cores) ) + displayName: Build +- bash: | + source ${CONDA}/etc/profile.d/conda.sh + conda activate maeparser_build + 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 diff --git a/.azure-pipelines/mac_build.yml b/.azure-pipelines/mac_build.yml new file mode 100644 index 0000000..480b82b --- /dev/null +++ b/.azure-pipelines/mac_build.yml @@ -0,0 +1,59 @@ +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} + echo -e "backend: TkAgg\n" > $HOME/.matplotlib/matplotlibrc + conda config --set always_yes yes --set changeps1 no + conda update -q conda + conda create --name maeparser_build $(compiler) cmake \ + boost-cpp=$(boost_version) boost=$(boost_version) \ + py-boost=$(boost_version) libboost=$(boost_version) + displayName: Setup build environment +- bash: | + source ${CONDA}/etc/profile.d/conda.sh + conda activate maeparser_build + export SDKROOT="$(pwd)/MacOSX$(target_platform).sdk/" + export CONDA_BUILD_SYSROOT=${SDKROOT} + mkdir build && cd build && \ + cmake .. \ + -DCMAKE_BUILD_TYPE=Release \ + -DMAEPARSER_RIGOROUS_BUILD=ON \ + -DBoost_NO_SYSTEM_PATHS=ON \ + -DCMAKE_OSX_SYSROOT=${SDKROOT} \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$(target_platform) \ + -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 maeparser_build + export SDKROOT="$(pwd)/MacOSX$(target_platform).sdk/" + export CONDA_BUILD_SYSROOT=${SDKROOT} + cd build + make -j $( $(number_of_cores) ) + displayName: Build +- bash: | + source ${CONDA}/etc/profile.d/conda.sh + conda activate maeparser_build + export DYLD_FALLBACK_LIBRARY_PATH=${CONDA_PREFIX}/lib:${DYLD_FALLBACK_LIBRARY_PATH} + export SDKROOT="$(pwd)/MacOSX$(target_platform).sdk/" + export CONDA_BUILD_SYSROOT=${SDKROOT} + 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 diff --git a/.azure-pipelines/vs_build.yml b/.azure-pipelines/vs_build.yml new file mode 100644 index 0000000..3621a38 --- /dev/null +++ b/.azure-pipelines/vs_build.yml @@ -0,0 +1,37 @@ +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 info -a + conda create --name maeparser_build $(compiler) cmake ^ + boost-cpp=$(boost_version) boost=$(boost_version) ^ + py-boost=$(boost_version) libboost=$(boost_version) + displayName: Install dependencies +- script: | + set Boost_ROOT= + mkdir build && cd build + call activate maeparser_build + cmake .. ^ + -G "Visual Studio 15 2017 Win64" ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DMAEPARSER_RIGOROUS_BUILD=ON ^ + -DBoost_NO_SYSTEM_PATHS=ON ^ + -DCMAKE_INCLUDE_PATH=%CONDA_PREFIX%/Library/include ^ + -DCMAKE_LIBRARY_PATH="%CONDA_PREFIX%/Library/lib + displayName: Configure build (Run CMake) +- script: | + call activate maeparser_build + cd build + cmake --build . --config Release -j $(number_of_cores) + displayName: Build +- script: | + call activate maeparser_build + cd build + ctest -j $(number_of_cores) --output-on-failure -T Test -C Release + displayName: Run tests +- task: PublishTestResults@2 + inputs: + testResultsFormat: 'CTest' + testResultsFiles: 'build/Testing/*/Test.xml' + testRunTitle: $(system.phasedisplayname) CTest Test Run diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..7016668 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,39 @@ +trigger: +- master +- dev/* + +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