-
Notifications
You must be signed in to change notification settings - Fork 177
/
linux-conda-CI.yml
112 lines (102 loc) · 3.74 KB
/
linux-conda-CI.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# 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-latest'
strategy:
matrix:
Python39-190-RT180-xgb11:
python.version: '3.9'
ONNX_PATH: onnx==1.9.0
ONNXRT_PATH: onnxruntime==1.8.0
COREML_PATH: git+https://github.com/apple/coremltools@3.1
xgboost.version: '>=1.2'
Python38-181-RT170-xgb11:
python.version: '3.8'
ONNX_PATH: onnx==1.8.1
ONNXRT_PATH: onnxruntime==1.7.0
COREML_PATH: git+https://github.com/apple/coremltools@3.1
xgboost.version: '>=1.2'
Python37-180-RT160-xgb11:
python.version: '3.7'
ONNX_PATH: onnx==1.8.0
ONNXRT_PATH: onnxruntime==1.6.0
COREML_PATH: git+https://github.com/apple/coremltools@3.1
xgboost.version: '>=1.2'
Python37-150-RT100:
python.version: '3.7'
ONNX_PATH: onnx==1.5.0
ONNXRT_PATH: onnxruntime==1.0.0
COREML_PATH: git+https://github.com/apple/coremltools@3.1
xgboost.version: ''
Python37-160-RT111-XGB0:
python.version: '3.7'
ONNX_PATH: onnx==1.6.0
ONNXRT_PATH: onnxruntime==1.1.1
COREML_PATH: git+https://github.com/apple/coremltools@3.1
xgboost.version: '<1.0'
Python37-160-RT111:
python.version: '3.7'
ONNX_PATH: onnx==1.6.0
ONNXRT_PATH: onnxruntime==1.1.1
COREML_PATH: git+https://github.com/apple/coremltools@3.1
xgboost.version: '>=1.0'
Python37-170-RT130:
python.version: '3.7'
ONNX_PATH: onnx==1.7.0
ONNXRT_PATH: onnxruntime==1.3.0
COREML_PATH: git+https://github.com/apple/coremltools@3.1
xgboost.version: '>=1.0'
Python37-180-RT160:
python.version: '3.7'
ONNX_PATH: onnx==1.8.0
ONNXRT_PATH: onnxruntime==1.6.0
COREML_PATH: git+https://github.com/apple/coremltools@3.1
xgboost.version: '>=1.0'
maxParallel: 3
steps:
- script: sudo install -d -m 0777 /home/vsts/.conda/envs
displayName: Fix Conda permissions
- 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
pip install $(COREML_PATH)
pip install $(ONNX_PATH)
pip install hummingbird-ml --no-deps
pip install -r requirements.txt
pip install torch==1.8.1+cpu torchvision==0.9.1+cpu torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
pip install -r requirements-dev.txt
pip install xgboost$(xgboost.version)
pip install $(ONNXRT_PATH)
pip install pytest
displayName: 'Install dependencies'
- script: |
python -m flake8 ./onnxmltools
displayName: 'run flake8 check'
- script: |
pip install -e .
displayName: 'local installation'
- script: |
export PYTHONPATH=.
python -c "import onnxconverter_common;print(onnxconverter_common.__version__)"
python -c "import onnxruntime;print(onnxruntime.__version__)"
pytest tests --doctest-modules --junitxml=junit/test-results.xml
displayName: 'pytest - onnxmltools'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()