|
2 | 2 |
|
3 | 3 | jobs:
|
4 | 4 |
|
5 |
| -- job: 'Test' |
| 5 | +- job: 'Linux' |
6 | 6 | pool:
|
7 | 7 | vmImage: 'Ubuntu-16.04'
|
8 | 8 | strategy:
|
@@ -113,3 +113,87 @@ jobs:
|
113 | 113 | testResultsFiles: '**/test-results.xml'
|
114 | 114 | testRunTitle: 'Python $(python.version)'
|
115 | 115 | condition: succeededOrFailed()
|
| 116 | + |
| 117 | +- job: 'Win' |
| 118 | + pool: |
| 119 | + vmImage: 'vs2017-win2016' |
| 120 | + strategy: |
| 121 | + matrix: |
| 122 | + # No python 2.x since no available ONNX package for Windows |
| 123 | + Python36-onnx1.2: |
| 124 | + python.version: '3.6' |
| 125 | + ONNX_PATH: onnx==1.2.3 |
| 126 | + TENSORFLOW_PATH: tensorflow==1.15.0 |
| 127 | + INSTALL_ORT: pip install onnxruntime==1.8.0 |
| 128 | + |
| 129 | + Python36-onnx1.5: |
| 130 | + python.version: '3.6' |
| 131 | + ONNX_PATH: onnx==1.5.0 |
| 132 | + TENSORFLOW_PATH: tensorflow==1.15.0 |
| 133 | + INSTALL_ORT: pip install onnxruntime==1.8.0 |
| 134 | + |
| 135 | + Python37-tf2.1: |
| 136 | + python.version: '3.7' |
| 137 | + ONNX_PATH: onnx==1.6.0 |
| 138 | + TENSORFLOW_PATH: tensorflow-cpu==2.1.0 |
| 139 | + INSTALL_ORT: pip install onnxruntime==1.8.0 |
| 140 | + |
| 141 | + Python37-tf2.2: |
| 142 | + python.version: '3.7' |
| 143 | + ONNX_PATH: onnx==1.7.0 |
| 144 | + TENSORFLOW_PATH: tensorflow-cpu==2.2.0 |
| 145 | + INSTALL_ORT: pip install onnxruntime==1.8.0 |
| 146 | + |
| 147 | + Python37-tf2.3: |
| 148 | + python.version: '3.7' |
| 149 | + ONNX_PATH: onnx==1.9.0 |
| 150 | + TENSORFLOW_PATH: tensorflow-cpu==2.3.0 |
| 151 | + INSTALL_ORT: pip install onnxruntime==1.8.0 |
| 152 | + |
| 153 | + Python37-tf2.5: |
| 154 | + python.version: '3.7' |
| 155 | + ONNX_PATH: onnx==1.9.0 |
| 156 | + TENSORFLOW_PATH: tensorflow-cpu==2.5.0 |
| 157 | + INSTALL_ORT: pip install onnxruntime==1.8.0 |
| 158 | + |
| 159 | + maxParallel: 3 |
| 160 | + |
| 161 | + steps: |
| 162 | + - task: UsePythonVersion@0 |
| 163 | + inputs: |
| 164 | + versionSpec: '$(python.version)' |
| 165 | + architecture: 'x64' |
| 166 | + |
| 167 | + - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" |
| 168 | + displayName: Add conda to PATH |
| 169 | + |
| 170 | + - script: conda create --yes --quiet --name py$(python.version) -c conda-forge python=$(python.version) numpy protobuf |
| 171 | + displayName: Create Anaconda environment |
| 172 | + |
| 173 | + - script: | |
| 174 | + call activate py$(python.version) |
| 175 | + python -m pip install --upgrade pip numpy==1.19 |
| 176 | + echo Test numpy installation... && python -c "import numpy" |
| 177 | + pip install %ONNX_PATH% |
| 178 | + pip uninstall -y protobuf |
| 179 | + pip install protobuf |
| 180 | + pip install h5py==2.9.0 |
| 181 | + pip install %TENSORFLOW_PATH% |
| 182 | + pip install git+https://github.com/microsoft/onnxconverter-common |
| 183 | + pip install pytest pytest-cov pytest-runner |
| 184 | + %INSTALL_ORT% |
| 185 | + displayName: 'Install dependencies' |
| 186 | +
|
| 187 | + - script: | |
| 188 | + call activate py$(python.version) |
| 189 | + pip install -e . |
| 190 | + echo Test onnxruntime installation... && python -c "import onnxruntime" |
| 191 | + python -c "import onnxconverter_common" |
| 192 | + pytest keras2onnx_tests --doctest-modules --junitxml=junit/test-results.xml |
| 193 | + displayName: 'pytest' |
| 194 | +
|
| 195 | + - task: PublishTestResults@2 |
| 196 | + inputs: |
| 197 | + testResultsFiles: '**/test-results.xml' |
| 198 | + testRunTitle: 'Python $(python.version)' |
| 199 | + condition: succeededOrFailed() |
0 commit comments