Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python

trigger:
- master

jobs:

- job: 'Test'
pool:
vmImage: 'Ubuntu-16.04'
strategy:
matrix:
Python27:
python.version: '2.7'
# Python35:
# python.version: '3.5'
Python36:
python.version: '3.6'
maxParallel: 3

steps:
- task: CondaEnvironment@1
inputs:
createCustomEnvironment: true
environmentName: 'py$(python.version)'
packageSpecs: 'python=$(python.version)'

- script: |
python -m pip install --upgrade pip
conda config --set always_yes yes --set changeps1 no
conda install -c conda-forge protobuf
conda install -c conda-forge numpy
conda install -c conda-forge cmake
conda install -c conda-forge openmpi
conda install -c conda-forge tensorflow
pip install -r requirements.txt
pip install -r requirements-dev.txt
test '$(python.version)' != '2.7' && pip install onnxruntime
pip install pytest
git clone --recursive https://github.com/cjlin1/libsvm libsvm
cd libsvm
make lib
displayName: 'Install dependencies'

- script: |
export PYTHONPATH=$PYTHONPATH:libsvm/python
python -c "import svmutil"
test '$(python.version)' != '2.7' && python -c "import onnxruntime"
pytest tests --doctest-modules --junitxml=junit/test-results.xml
displayName: 'pytest'

- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()