Use templates to outsource the build steps.
This commit is contained in:
+28
-239
@@ -13,69 +13,12 @@ jobs:
|
||||
Python37:
|
||||
python.version: '3.7'
|
||||
CMakeArgs: '-DDEBUG=OFF -DPROFILE=OFF -DPYTHON_EXECUTABLE=/usr/bin/python3'
|
||||
Markdown:
|
||||
python.version: '2.7'
|
||||
CMakeArgs: '-DDEBUG=OFF -DPROFILE=OFF -DBUILD_MARKDOWN_BINDINGS=ON -DBUILD_PYTHON_BINDINGS=OFF'
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '$(python.version)'
|
||||
|
||||
# Fetch build dependencies.
|
||||
- script: |
|
||||
sudo apt-get update
|
||||
unset BOOST_ROOT
|
||||
sudo apt-get install -y --allow-unauthenticated libopenblas-dev liblapack-dev g++ libboost-math-dev libboost-program-options-dev libboost-test-dev libboost-serialization-dev libarmadillo-dev xz-utils
|
||||
|
||||
if [ '$(python.version)' == '2.7' ]; then
|
||||
sudo apt-get install -y --allow-unauthenticated python-pip cython python-numpy python-pandas
|
||||
sudo pip install --upgrade --ignore-installed setuptools cython
|
||||
fi
|
||||
|
||||
if [ '$(python.version)' == '3.7' ]; then
|
||||
sudo apt-get install -y --allow-unauthenticated python3-pip cython3 python3-numpy
|
||||
sudo pip3 install --upgrade --ignore-installed setuptools cython pandas
|
||||
fi
|
||||
|
||||
# Install armadillo.
|
||||
curl https://ftp.fau.de/macports/distfiles/armadillo/armadillo-8.400.0.tar.xz | tar -xvJ && cd armadillo*
|
||||
cmake . && make && sudo make install && cd ..
|
||||
sudo cp .travis/config.hpp /usr/include/armadillo_bits/config.hpp
|
||||
displayName: 'Install Build Dependencies'
|
||||
|
||||
# Configure mlpack.
|
||||
- script: unset BOOST_ROOT && mkdir build && cd build && cmake $(CMakeArgs) ..
|
||||
displayName: 'CMake'
|
||||
|
||||
# Build mlpack.
|
||||
- script: cd build && make -j2
|
||||
displayName: 'Build'
|
||||
|
||||
# Run tests.
|
||||
- script: cd build && bin/mlpack_test --result_code=no --report_level=detailed --log_level=test_suite --log_format=HRF --log_sink=res.txt
|
||||
displayName: 'Run tests'
|
||||
|
||||
# Process test results
|
||||
- bash: |
|
||||
curl https://gist.githubusercontent.com/zoq/9ccf753c4b61efcc5e6f0452c9c22e26/raw/a7790189a530925a5575b2dc45fdc6b915b01313/convert.py -O
|
||||
python convert.py > mlpack_test.xml
|
||||
displayName: 'Process test results'
|
||||
|
||||
# Publish test results to Azure Pipelines
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFormat: JUnit
|
||||
testResultsFiles: 'mlpack_test.xml'
|
||||
failTaskOnFailedTests: true
|
||||
displayName: 'Publish tests'
|
||||
|
||||
# Publish build artifacts to Azure Pipelines
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: 'mlpack_test.xml'
|
||||
artifactName: 'mlpack_test.xml'
|
||||
displayName: 'Publish artifacts test results'
|
||||
- template: ci/linux-steps.yaml
|
||||
|
||||
- job: macOS
|
||||
pool:
|
||||
@@ -93,60 +36,21 @@ jobs:
|
||||
CMakeArgs: '-DDEBUG=OFF -DPROFILE=OFF'
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '$(python.version)'
|
||||
- template: ci/macos-steps.yaml
|
||||
|
||||
# Fetch build dependencies.
|
||||
- script: |
|
||||
set -e
|
||||
sudo xcode-select --switch /Applications/Xcode_10.1.app/Contents/Developer
|
||||
unset BOOST_ROOT
|
||||
pip install cython numpy pandas
|
||||
brew install openblas armadillo boost
|
||||
displayName: 'Install Build Dependencies'
|
||||
- job: WindowsVS14
|
||||
timeoutInMinutes: 360
|
||||
pool:
|
||||
vmImage: vs2015-win2012r2
|
||||
strategy:
|
||||
matrix:
|
||||
Plain:
|
||||
CMakeArgs: '-DDEBUG=ON -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF'
|
||||
|
||||
# Configure mlpack.
|
||||
- script: |
|
||||
unset BOOST_ROOT
|
||||
mkdir build && cd build
|
||||
export PYPATH=$(which python)
|
||||
cmake $(CMakeArgs) -DPYTHON_EXECUTABLE=$PYPATH ..
|
||||
displayName: 'CMake'
|
||||
steps:
|
||||
- template: ci/windows-vs14-steps.yaml
|
||||
|
||||
# Build mlpack.
|
||||
- script: cd build && make -j2
|
||||
displayName: 'Build'
|
||||
|
||||
# Run tests.
|
||||
- script: cd build && bin/mlpack_test --result_code=no --report_level=detailed --log_level=test_suite --log_format=HRF --log_sink=res.txt
|
||||
displayName: 'Run tests'
|
||||
|
||||
# Process test results.
|
||||
- bash: |
|
||||
curl https://gist.githubusercontent.com/zoq/9ccf753c4b61efcc5e6f0452c9c22e26/raw/a7790189a530925a5575b2dc45fdc6b915b01313/convert.py -O
|
||||
python convert.py > mlpack_test.xml
|
||||
displayName: 'Process test results'
|
||||
|
||||
# Publish test results to Azure Pipelines.
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFormat: JUnit
|
||||
testResultsFiles: 'mlpack_test.xml'
|
||||
failTaskOnFailedTests: true
|
||||
displayName: 'Publish tests'
|
||||
|
||||
# Publish build artifacts to Azure Pipelines.
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: 'mlpack_test.xml'
|
||||
artifactName: 'mlpack_test.xml'
|
||||
displayName: 'Publish artifacts test results'
|
||||
|
||||
- job: Windows
|
||||
- job: WindowsVS15
|
||||
timeoutInMinutes: 360
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
@@ -157,132 +61,17 @@ jobs:
|
||||
python.version: '2.7'
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '$(python.version)'
|
||||
- task: NuGetToolInstaller@0
|
||||
inputs:
|
||||
versionSpec: '5.3.0'
|
||||
- template: ci/windows-vs15-steps.yaml
|
||||
|
||||
# Fetch build dependencies.
|
||||
- bash: |
|
||||
nuget install OpenBLAS -o $(Agent.ToolsDirectory)
|
||||
nuget install boost -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_unit_test_framework-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_program_options-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_random-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_serialization-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_math_c99-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install OpenBLAS -o $(Agent.ToolsDirectory)
|
||||
- job: WindowsVS16
|
||||
timeoutInMinutes: 360
|
||||
pool:
|
||||
vmImage: windows-2019
|
||||
strategy:
|
||||
matrix:
|
||||
Plain:
|
||||
CMakeArgs: '-DDEBUG=ON -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF'
|
||||
python.version: '2.7'
|
||||
|
||||
mkdir -p $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_program_options-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_math_c99-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_random-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_serialization-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_unit_test_framework-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
|
||||
curl https://ftp.fau.de/macports/distfiles/armadillo/armadillo-8.400.0.tar.xz | tar -xvJ
|
||||
displayName: 'Fetch build dependencies'
|
||||
|
||||
# Configure armadillo.
|
||||
- bash: |
|
||||
cd armadillo-8.400.0/ && cmake -G "Visual Studio 15 2017 Win64" \
|
||||
-DBLAS_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a \
|
||||
-DLAPACK_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a \
|
||||
-DCMAKE_PREFIX:FILEPATH=../../armadillo \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release .
|
||||
displayName: 'Configure armadillo'
|
||||
|
||||
# Build armadillo.
|
||||
- task: MSBuild@1
|
||||
inputs:
|
||||
solution: 'armadillo-8.400.0/*.sln'
|
||||
msbuildLocationMethod: 'location'
|
||||
msbuildVersion: '15.0'
|
||||
configuration: 'Release'
|
||||
msbuildArchitecture: 'x64'
|
||||
msbuildArguments: /m /p:BuildInParallel=true
|
||||
clean: false
|
||||
maximumCpuCount: false
|
||||
displayName: 'Build armadillo'
|
||||
|
||||
# Configure mlpack.
|
||||
- bash: |
|
||||
mkdir build && cd build && \
|
||||
cmake -G "Visual Studio 15 2017 Win64" \
|
||||
-DBLAS_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a \
|
||||
-DLAPACK_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a \
|
||||
-DARMADILLO_INCLUDE_DIR="../armadillo-8.400.0/include" \
|
||||
-DARMADILLO_LIBRARY:FILEPATH="../armadillo-8.400.0/Release/armadillo.lib" \
|
||||
-DBOOST_INCLUDEDIR:PATH=$(Agent.ToolsDirectory)/boost.1.60.0.0/lib/native/include \
|
||||
-DBOOST_LIBRARYDIR:PATH=$(Agent.ToolsDirectory)/boost_libs \
|
||||
-DDEBUG=OFF \
|
||||
-DPROFILE=OFF \
|
||||
-DBUILD_PYTHON_BINDINGS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release .. \
|
||||
displayName: 'Configure mlpack'
|
||||
|
||||
# Build mlpack.
|
||||
- task: MSBuild@1
|
||||
inputs:
|
||||
solution: 'build/*.sln'
|
||||
msbuildLocationMethod: 'location'
|
||||
msbuildVersion: '15.0'
|
||||
configuration: 'Release'
|
||||
msbuildArchitecture: 'x64'
|
||||
msbuildArguments: /m /p:BuildInParallel=true
|
||||
maximumCpuCount: false
|
||||
clean: false
|
||||
displayName: 'Build mlpack'
|
||||
|
||||
# Run tests.
|
||||
- powershell: |
|
||||
cp $(Agent.ToolsDirectory)\boost_libs\*.* build\
|
||||
cp $(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\lib/x64\*.* build\
|
||||
cp $(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\bin\x64\*.* build\
|
||||
|
||||
cd build
|
||||
Release\mlpack_test.exe --result_code=no --report_level=detailed --log_level=test_suite --log_format=HRF --log_sink=res.txt
|
||||
displayName: 'Run tests'
|
||||
|
||||
# Process test results.
|
||||
- bash: |
|
||||
curl https://gist.githubusercontent.com/zoq/9ccf753c4b61efcc5e6f0452c9c22e26/raw/a7790189a530925a5575b2dc45fdc6b915b01313/convert.py -O
|
||||
python convert.py > mlpack_test.xml
|
||||
displayName: 'Process test results'
|
||||
|
||||
# Publish test results to Azure Pipelines.
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFormat: JUnit
|
||||
testResultsFiles: 'mlpack_test.xml'
|
||||
failTaskOnFailedTests: true
|
||||
displayName: 'Publish tests'
|
||||
|
||||
# Build artifacts.
|
||||
- bash: |
|
||||
7z a mlpack-windows-no-libs.zip build/Release/*.exe
|
||||
7z a mlpack-windows.zip build/Release/*.*
|
||||
displayName: 'Build artifacts'
|
||||
|
||||
# Publish build artifacts to Azure Pipelines.
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: 'mlpack-windows-no-libs.zip'
|
||||
artifactName: 'mlpack-windows-no-libs.zip'
|
||||
displayName: 'Publish artifacts no-libs'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: 'mlpack-windows.zip'
|
||||
artifactName: 'mlpack-windows.zip'
|
||||
displayName: 'Publish artifacts complete'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: 'mlpack_test.xml'
|
||||
artifactName: 'mlpack_test.xml'
|
||||
displayName: 'Publish artifacts test results'
|
||||
steps:
|
||||
- template: ci/windows-vs16-steps.yaml
|
||||
@@ -0,0 +1,66 @@
|
||||
steps:
|
||||
# Checkout repository
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
|
||||
# Set python version
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '$(python.version)'
|
||||
|
||||
# Install build dependencies
|
||||
- script: |
|
||||
sudo apt-get update
|
||||
unset BOOST_ROOT
|
||||
sudo apt-get install -y --allow-unauthenticated libopenblas-dev liblapack-dev g++ libboost-math-dev libboost-program-options-dev libboost-test-dev libboost-serialization-dev libarmadillo-dev xz-utils
|
||||
|
||||
if [ '$(python.version)' == '2.7' ]; then
|
||||
sudo apt-get install -y --allow-unauthenticated python-pip cython python-numpy python-pandas
|
||||
sudo pip install --upgrade --ignore-installed setuptools cython
|
||||
fi
|
||||
|
||||
if [ '$(python.version)' == '3.7' ]; then
|
||||
sudo apt-get install -y --allow-unauthenticated python3-pip cython3 python3-numpy
|
||||
sudo pip3 install --upgrade --ignore-installed setuptools cython pandas
|
||||
fi
|
||||
|
||||
# Install armadillo.
|
||||
curl https://ftp.fau.de/macports/distfiles/armadillo/armadillo-8.400.0.tar.xz | tar -xvJ && cd armadillo*
|
||||
cmake . && make && sudo make install && cd ..
|
||||
sudo cp .travis/config.hpp /usr/include/armadillo_bits/config.hpp
|
||||
displayName: 'Install Build Dependencies'
|
||||
|
||||
# Configure mlpack (CMake)
|
||||
- script: unset BOOST_ROOT && mkdir build && cd build && cmake $(CMakeArgs) ..
|
||||
displayName: 'CMake'
|
||||
|
||||
# Build mlpack
|
||||
- script: cd build && make -j2
|
||||
displayName: 'Build'
|
||||
|
||||
# Run tests
|
||||
- script: cd build && bin/mlpack_test --result_code=no --report_level=detailed --log_level=test_suite --log_format=HRF --log_sink=res.txt
|
||||
displayName: 'Run tests'
|
||||
|
||||
# Process test results
|
||||
- bash: |
|
||||
curl https://gist.githubusercontent.com/zoq/9ccf753c4b61efcc5e6f0452c9c22e26/raw/a7790189a530925a5575b2dc45fdc6b915b01313/convert.py -O
|
||||
python convert.py > mlpack_test.xml
|
||||
displayName: 'Process test results'
|
||||
|
||||
# Publish test results to Azure Pipelines
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFormat: JUnit
|
||||
testResultsFiles: 'mlpack_test.xml'
|
||||
failTaskOnFailedTests: true
|
||||
displayName: 'Publish tests'
|
||||
|
||||
# Publish build artifacts to Azure Pipelines
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: 'mlpack_test.xml'
|
||||
artifactName: 'mlpack_test_linux.xml'
|
||||
displayName: 'Publish artifacts test results'
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
steps:
|
||||
# Checkout repository
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
|
||||
# Set python version.
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '$(python.version)'
|
||||
|
||||
# Install Build Dependencies
|
||||
- script: |
|
||||
set -e
|
||||
sudo xcode-select --switch /Applications/Xcode_10.1.app/Contents/Developer
|
||||
unset BOOST_ROOT
|
||||
pip install cython numpy pandas
|
||||
brew install openblas armadillo boost
|
||||
displayName: 'Install Build Dependencies'
|
||||
|
||||
# Configure mlpack (CMake)
|
||||
- script: |
|
||||
unset BOOST_ROOT
|
||||
mkdir build && cd build
|
||||
export PYPATH=$(which python)
|
||||
cmake $(CMakeArgs) -DPYTHON_EXECUTABLE=$PYPATH ..
|
||||
displayName: 'CMake'
|
||||
|
||||
# Build mlpack
|
||||
- script: cd build && make -j2
|
||||
displayName: 'Build'
|
||||
|
||||
# Run tests
|
||||
- script: cd build && bin/mlpack_test --result_code=no --report_level=detailed --log_level=test_suite --log_format=HRF --log_sink=res.txt
|
||||
displayName: 'Run tests'
|
||||
|
||||
# Process test results
|
||||
- bash: |
|
||||
curl https://gist.githubusercontent.com/zoq/9ccf753c4b61efcc5e6f0452c9c22e26/raw/a7790189a530925a5575b2dc45fdc6b915b01313/convert.py -O
|
||||
python convert.py > mlpack_test.xml
|
||||
displayName: 'Process test results'
|
||||
|
||||
# Publish test results to Azure Pipelines
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFormat: JUnit
|
||||
testResultsFiles: 'mlpack_test.xml'
|
||||
failTaskOnFailedTests: true
|
||||
displayName: 'Publish tests'
|
||||
|
||||
# Publish build artifacts to Azure Pipelines
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: 'mlpack_test.xml'
|
||||
artifactName: 'mlpack_test_macos.xml'
|
||||
displayName: 'Publish artifacts test results'
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: NuGetToolInstaller@0
|
||||
inputs:
|
||||
versionSpec: '5.3.0'
|
||||
|
||||
# Fetch build dependencies
|
||||
- powershell: |
|
||||
nuget install OpenBLAS -o $(Agent.ToolsDirectory)
|
||||
nuget install boost -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_unit_test_framework-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_program_options-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_random-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_serialization-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_math_c99-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install OpenBLAS -o $(Agent.ToolsDirectory)
|
||||
|
||||
mkdir -p $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_program_options-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_math_c99-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_random-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_serialization-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_unit_test_framework-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
displayName: 'Fetch build dependencies'
|
||||
|
||||
# Configure armadillo
|
||||
- bash: |
|
||||
curl http://masterblaster.mlpack.org:5005/armadillo-8.400.0.tar.gz | tar xvz
|
||||
|
||||
cd armadillo-8.400.0/ && cmake -G "Visual Studio 14 2015 Win64" \
|
||||
-DBLAS_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a \
|
||||
-DLAPACK_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a \
|
||||
-DCMAKE_PREFIX:FILEPATH=../../armadillo \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release .
|
||||
displayName: 'Configure armadillo'
|
||||
|
||||
# Build armadillo
|
||||
- task: MSBuild@1
|
||||
inputs:
|
||||
solution: 'armadillo-8.400.0/*.sln'
|
||||
msbuildLocationMethod: 'location'
|
||||
msbuildVersion: '14.0'
|
||||
configuration: 'Release'
|
||||
msbuildArchitecture: 'x64'
|
||||
msbuildArguments: /m /p:BuildInParallel=true
|
||||
clean: false
|
||||
maximumCpuCount: false
|
||||
displayName: 'Build armadillo'
|
||||
|
||||
# Configure mlpack
|
||||
- powershell: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake -G "Visual Studio 14 2015 Win64" `
|
||||
$(CMakeArgs) `
|
||||
-DBLAS_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\lib\x64\libopenblas.dll.a `
|
||||
-DLAPACK_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\lib\x64\libopenblas.dll.a `
|
||||
-DARMADILLO_INCLUDE_DIR="..\armadillo-8.400.0\include" `
|
||||
-DARMADILLO_LIBRARY="..\armadillo-8.400.0\Release\armadillo.lib" `
|
||||
-DBOOST_INCLUDEDIR=$(Agent.ToolsDirectory)\boost.1.60.0.0\lib\native\include `
|
||||
-DBOOST_LIBRARYDIR=$(Agent.ToolsDirectory)\boost_libs `
|
||||
-DCMAKE_BUILD_TYPE=Release ..
|
||||
displayName: 'Configure mlpack'
|
||||
|
||||
# Build mlpack
|
||||
- task: MSBuild@1
|
||||
inputs:
|
||||
solution: 'build/*.sln'
|
||||
msbuildLocationMethod: 'location'
|
||||
msbuildVersion: '15.0'
|
||||
configuration: 'Release'
|
||||
msbuildArchitecture: 'x64'
|
||||
msbuildArguments: /m /p:BuildInParallel=true
|
||||
maximumCpuCount: false
|
||||
clean: false
|
||||
displayName: 'Build mlpack'
|
||||
|
||||
# Configure mlpack
|
||||
- powershell: |
|
||||
cp $(Agent.ToolsDirectory)\boost_libs\*.* build\Release\
|
||||
cp $(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\lib\x64\*.* build\Release\
|
||||
cp $(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\bin\x64\*.* build\Release\
|
||||
displayName: 'Configure mlpack'
|
||||
|
||||
# Run tests
|
||||
- bash: |
|
||||
cd build
|
||||
ls
|
||||
Release/mlpack_test.exe --result_code=no --report_level=detailed --log_level=test_suite --log_format=HRF --log_sink=res.txt
|
||||
displayName: 'Run tests'
|
||||
|
||||
# Process test results
|
||||
- bash: |
|
||||
curl https://gist.githubusercontent.com/zoq/9ccf753c4b61efcc5e6f0452c9c22e26/raw/a7790189a530925a5575b2dc45fdc6b915b01313/convert.py -O
|
||||
python convert.py > mlpack_test.xml
|
||||
displayName: 'Process test results'
|
||||
|
||||
# Copy artifacts
|
||||
- powershell: |
|
||||
mkdir exe-archive
|
||||
cp build\Release\*.exe exe-archive\
|
||||
displayName: 'Copy artifacts'
|
||||
|
||||
# Build artifacts archive
|
||||
- task: ArchiveFiles@2
|
||||
inputs:
|
||||
rootFolderOrFile: 'exe-archive\'
|
||||
includeRootFolder: false
|
||||
archiveType: 'zip'
|
||||
archiveFile: 'mlpack-windows-vs14-no-libs.zip'
|
||||
replaceExistingArchive: true
|
||||
displayName: 'Build artifacts'
|
||||
|
||||
- task: ArchiveFiles@2
|
||||
inputs:
|
||||
rootFolderOrFile: 'build\Release\'
|
||||
includeRootFolder: false
|
||||
archiveType: 'zip'
|
||||
archiveFile: 'mlpack-windows-vs14.zip'
|
||||
replaceExistingArchive: true
|
||||
displayName: 'Build artifacts'
|
||||
|
||||
# Publish artifacts to Azure Pipelines
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: 'mlpack-windows-vs14-no-libs.zip'
|
||||
artifactName: 'mlpack-windows-vs14-no-libs.zip'
|
||||
displayName: 'Publish artifacts no-libs'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: 'mlpack-windows-vs14.zip'
|
||||
artifactName: 'mlpack-windows-vs14.zip'
|
||||
displayName: 'Publish artifacts complete'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: 'mlpack_test.xml'
|
||||
artifactName: 'mlpack_test-vs14.xml'
|
||||
displayName: 'Publish artifacts test results'
|
||||
|
||||
# Publish test results to Azure Pipelines
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFormat: JUnit
|
||||
testResultsFiles: 'mlpack_test.xml'
|
||||
failTaskOnFailedTests: true
|
||||
displayName: 'Publish tests'
|
||||
@@ -0,0 +1,131 @@
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '$(python.version)'
|
||||
- task: NuGetToolInstaller@0
|
||||
inputs:
|
||||
versionSpec: '5.3.0'
|
||||
|
||||
# Fetch build dependencies
|
||||
- bash: |
|
||||
nuget install OpenBLAS -o $(Agent.ToolsDirectory)
|
||||
nuget install boost -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_unit_test_framework-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_program_options-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_random-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_serialization-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_math_c99-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install OpenBLAS -o $(Agent.ToolsDirectory)
|
||||
|
||||
mkdir -p $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_program_options-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_math_c99-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_random-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_serialization-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_unit_test_framework-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
|
||||
curl http://masterblaster.mlpack.org:5005/armadillo-8.400.0.tar.gz | tar xvz
|
||||
displayName: 'Fetch build dependencies'
|
||||
|
||||
# Configure armadillo
|
||||
- bash: |
|
||||
cd armadillo-8.400.0/ && cmake -G "Visual Studio 15 2017 Win64" \
|
||||
-DBLAS_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a \
|
||||
-DLAPACK_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a \
|
||||
-DCMAKE_PREFIX:FILEPATH=../../armadillo \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release .
|
||||
displayName: 'Configure armadillo'
|
||||
|
||||
# Build armadillo
|
||||
- task: MSBuild@1
|
||||
inputs:
|
||||
solution: 'armadillo-8.400.0/*.sln'
|
||||
msbuildLocationMethod: 'location'
|
||||
msbuildVersion: '15.0'
|
||||
configuration: 'Release'
|
||||
msbuildArchitecture: 'x64'
|
||||
msbuildArguments: /m /p:BuildInParallel=true
|
||||
clean: false
|
||||
maximumCpuCount: false
|
||||
displayName: 'Build armadillo'
|
||||
|
||||
# Configure mlpack
|
||||
- bash: |
|
||||
mkdir build && cd build && \
|
||||
cmake -G "Visual Studio 15 2017 Win64" \
|
||||
-DBLAS_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a \
|
||||
-DLAPACK_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a \
|
||||
-DARMADILLO_INCLUDE_DIR="../armadillo-8.400.0/include" \
|
||||
-DARMADILLO_LIBRARY:FILEPATH="../armadillo-8.400.0/Release/armadillo.lib" \
|
||||
-DBOOST_INCLUDEDIR:PATH=$(Agent.ToolsDirectory)/boost.1.60.0.0/lib/native/include \
|
||||
-DBOOST_LIBRARYDIR:PATH=$(Agent.ToolsDirectory)/boost_libs \
|
||||
-DDEBUG=OFF \
|
||||
-DPROFILE=OFF \
|
||||
-DBUILD_PYTHON_BINDINGS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release .. \
|
||||
displayName: 'Configure mlpack'
|
||||
|
||||
# Build mlpack
|
||||
- task: MSBuild@1
|
||||
inputs:
|
||||
solution: 'build/*.sln'
|
||||
msbuildLocationMethod: 'location'
|
||||
msbuildVersion: '15.0'
|
||||
configuration: 'Release'
|
||||
msbuildArchitecture: 'x64'
|
||||
msbuildArguments: /m /p:BuildInParallel=true
|
||||
maximumCpuCount: false
|
||||
clean: false
|
||||
displayName: 'Build mlpack'
|
||||
|
||||
# Run tests
|
||||
- powershell: |
|
||||
cp $(Agent.ToolsDirectory)\boost_libs\*.* build\
|
||||
cp $(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\lib/x64\*.* build\
|
||||
cp $(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\bin\x64\*.* build\
|
||||
|
||||
cd build
|
||||
Release\mlpack_test.exe --result_code=no --report_level=detailed --log_level=test_suite --log_format=HRF --log_sink=res.txt
|
||||
displayName: 'Run tests'
|
||||
|
||||
# Process test results
|
||||
- bash: |
|
||||
curl https://gist.githubusercontent.com/zoq/9ccf753c4b61efcc5e6f0452c9c22e26/raw/a7790189a530925a5575b2dc45fdc6b915b01313/convert.py -O
|
||||
python convert.py > mlpack_test.xml
|
||||
displayName: 'Process test results'
|
||||
|
||||
# Publish test results to Azure Pipelines
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFormat: JUnit
|
||||
testResultsFiles: 'mlpack_test.xml'
|
||||
failTaskOnFailedTests: true
|
||||
displayName: 'Publish tests'
|
||||
|
||||
# Build artifacts
|
||||
- bash: |
|
||||
7z a mlpack-windows-vs15-no-libs.zip build/Release/*.exe
|
||||
7z a mlpack-windows-vs15.zip build/Release/*.*
|
||||
displayName: 'Build artifacts'
|
||||
|
||||
# Publish build artifacts to Azure Pipelines
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: 'mlpack-windows-vs15-no-libs.zip'
|
||||
artifactName: 'mlpack-windows-vs15-no-libs.zip'
|
||||
displayName: 'Publish artifacts no-libs'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: 'mlpack-windows-vs15.zip'
|
||||
artifactName: 'mlpack-windows-vs15.zip'
|
||||
displayName: 'Publish artifacts complete'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: 'mlpack_test.xml'
|
||||
artifactName: 'mlpack_test_vs15.xml'
|
||||
displayName: 'Publish artifacts test results'
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '$(python.version)'
|
||||
- task: NuGetToolInstaller@0
|
||||
inputs:
|
||||
versionSpec: '5.3.0'
|
||||
|
||||
# Fetch build dependencies
|
||||
- bash: |
|
||||
nuget install OpenBLAS -o $(Agent.ToolsDirectory)
|
||||
nuget install boost -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_unit_test_framework-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_program_options-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_random-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_serialization-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install boost_math_c99-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
|
||||
nuget install OpenBLAS -o $(Agent.ToolsDirectory)
|
||||
|
||||
mkdir -p $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_program_options-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_math_c99-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_random-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_serialization-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
cp $(Agent.ToolsDirectory)/boost_unit_test_framework-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
|
||||
|
||||
curl http://masterblaster.mlpack.org:5005/armadillo-8.400.0.tar.gz | tar xvz
|
||||
displayName: 'Fetch build dependencies'
|
||||
|
||||
# Configure armadillo
|
||||
- bash: |
|
||||
cd armadillo-8.400.0/ && cmake -G "Visual Studio 16 2019" \
|
||||
-DBLAS_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a \
|
||||
-DLAPACK_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a \
|
||||
-DCMAKE_PREFIX:FILEPATH=../../armadillo \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release .
|
||||
displayName: 'Configure armadillo'
|
||||
|
||||
# Build armadillo
|
||||
- task: MSBuild@1
|
||||
inputs:
|
||||
solution: 'armadillo-8.400.0/*.sln'
|
||||
msbuildLocationMethod: 'location'
|
||||
msbuildVersion: '16.0'
|
||||
configuration: 'Release'
|
||||
msbuildArchitecture: 'x64'
|
||||
msbuildArguments: /m /p:BuildInParallel=true
|
||||
clean: false
|
||||
maximumCpuCount: false
|
||||
displayName: 'Build armadillo'
|
||||
|
||||
# Configure mlpack
|
||||
- bash: |
|
||||
mkdir build && cd build && \
|
||||
cmake -G "Visual Studio 16 2019" \
|
||||
-DBLAS_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a \
|
||||
-DLAPACK_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a \
|
||||
-DARMADILLO_INCLUDE_DIR="../armadillo-8.400.0/include" \
|
||||
-DARMADILLO_LIBRARY:FILEPATH="../armadillo-8.400.0/Release/armadillo.lib" \
|
||||
-DBOOST_INCLUDEDIR:PATH=$(Agent.ToolsDirectory)/boost.1.60.0.0/lib/native/include \
|
||||
-DBOOST_LIBRARYDIR:PATH=$(Agent.ToolsDirectory)/boost_libs \
|
||||
-DDEBUG=OFF \
|
||||
-DPROFILE=OFF \
|
||||
-DBUILD_PYTHON_BINDINGS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release .. \
|
||||
displayName: 'Configure mlpack'
|
||||
|
||||
# Build mlpack
|
||||
- task: MSBuild@1
|
||||
inputs:
|
||||
solution: 'build/*.sln'
|
||||
msbuildLocationMethod: 'location'
|
||||
msbuildVersion: '15.0'
|
||||
configuration: 'Release'
|
||||
msbuildArchitecture: 'x64'
|
||||
msbuildArguments: /m /p:BuildInParallel=true
|
||||
maximumCpuCount: false
|
||||
clean: false
|
||||
displayName: 'Build mlpack'
|
||||
|
||||
# Run tests
|
||||
- powershell: |
|
||||
cp $(Agent.ToolsDirectory)\boost_libs\*.* build\
|
||||
cp $(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\lib/x64\*.* build\
|
||||
cp $(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\bin\x64\*.* build\
|
||||
|
||||
cd build
|
||||
Release\mlpack_test.exe --result_code=no --report_level=detailed --log_level=test_suite --log_format=HRF --log_sink=res.txt
|
||||
displayName: 'Run tests'
|
||||
|
||||
# Process test results
|
||||
- bash: |
|
||||
curl https://gist.githubusercontent.com/zoq/9ccf753c4b61efcc5e6f0452c9c22e26/raw/a7790189a530925a5575b2dc45fdc6b915b01313/convert.py -O
|
||||
python convert.py > mlpack_test.xml
|
||||
displayName: 'Process test results'
|
||||
|
||||
# Publish test results to Azure Pipelines
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFormat: JUnit
|
||||
testResultsFiles: 'mlpack_test.xml'
|
||||
failTaskOnFailedTests: true
|
||||
displayName: 'Publish tests'
|
||||
|
||||
# Build artifacts
|
||||
- bash: |
|
||||
7z a mlpack-windows-vs16-no-libs.zip build/Release/*.exe
|
||||
7z a mlpack-windows-vs16.zip build/Release/*.*
|
||||
displayName: 'Build artifacts'
|
||||
|
||||
# Publish build artifacts to Azure Pipelines
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: 'mlpack-windows-vs16-no-libs.zip'
|
||||
artifactName: 'mlpack-windows-vs16-no-libs.zip'
|
||||
displayName: 'Publish artifacts no-libs'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: 'mlpack-windows-vs16.zip'
|
||||
artifactName: 'mlpack-windows-vs16.zip'
|
||||
displayName: 'Publish artifacts complete'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: 'mlpack_test.xml'
|
||||
artifactName: 'mlpack_test_vs16.xml'
|
||||
displayName: 'Publish artifacts test results'
|
||||
Reference in New Issue
Block a user