forked from xadupre/scikit-onnxruntime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
94 lines (80 loc) · 2.72 KB
/
azure-pipelines.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
87
88
89
90
91
92
93
94
# 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:
Py37-OnnxGit-Npy1611:
python.version: '3.7'
onnx.version: 'git'
skl2onnx.version: 'git'
numpy.version: '==1.16.1'
maxParallel: 4
steps:
- task: CondaEnvironment@1
inputs:
createCustomEnvironment: true
environmentName: 'py$(python.version)'
packageSpecs: 'python=$(python.version)'
- script: |
test '$(python.version)' == '3.7' && apt-get install protobuf-compiler libprotoc-dev
conda config --set always_yes yes --set changeps1 no
conda install -c conda-forge numpy
conda install protobuf
python -m pip install --upgrade pip
displayName: 'Install environment'
- script: |
pip install numpy$(numpy.version)
displayName: 'install numpy'
- script: |
if [ '$(onnx.version)' == 'git' ]
then
git clone https://github.com/onnx/onnx.git --recursive
export ONNX_ML=1
cd onnx
python setup.py install
cd ..
else
pip install onnx$(onnx.version)
fi
displayName: 'install onnx'
- script: pip install -r requirements.txt
displayName: 'Install dependencies'
- script: pip install -r requirements-dev.txt
displayName: 'Install dev dependencies'
- script: |
pip install -e .
displayName: 'install scikit-onnxruntime'
- script: |
if [ '$(skl2onnx.version)' == 'git' ]
then
git clone https://github.com/onnx/sklearn-onnx.git --recursive
cd sklearn-onnx
python setup.py install
cd ..
else
pip install skl2onnx$(skl2onnx.version)
fi
displayName: 'install skl2onnx'
- script: |
python -c "import numpy;print('numpy',numpy.__version__)"
python -c "import pandas;print('pandas',pandas.__version__)"
python -c "import scipy;print('scipy',scipy.__version__)"
python -c "import onnx;print('onnx',onnx.__version__)"
python -c "import skl2onnx;print('skl2onnx',skl2onnx.__version__)"
python -c "import onnxruntime;print('onnxruntime',onnxruntime.__version__)"
displayName: 'versions'
- script: |
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()