-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add onnxruntime nightly build to CI (#284)
* update svm converter test case failures to account for versioning on nightly ort builds * 2 new nightly linux and win32 pipelines with onnxruntime nightly builds
- Loading branch information
Showing
3 changed files
with
140 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# 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: | ||
Python36-nightly: | ||
python.version: '3.6' | ||
ONNX_PATH: onnx==1.4.1 | ||
ORT_PATH: -i https://test.pypi.org/simple/ ort-nightly | ||
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 | ||
pip install $(ONNX_PATH) | ||
pip install -r requirements.txt | ||
cd onnxutils | ||
pip install -e . | ||
cd .. | ||
pip install -r requirements-dev.txt | ||
pip install $(ORT_PATH) | ||
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" | ||
python -c "import onnxconverter_common" | ||
test '$(python.version)' != '2.7' && python -c "import onnxruntime" | ||
pytest tests --doctest-modules --junitxml=junit/test-results.xml | ||
displayName: 'pytest - onnxmltools' | ||
- script: | | ||
export PYTHONPATH=$PYTHONPATH:libsvm/python | ||
python -c "import onnxconverter_common" | ||
pytest onnxutils/tests --doctest-modules --junitxml=junit/test-results-onnxutils.xml | ||
displayName: 'pytest - onnxutils' | ||
- task: PublishTestResults@2 | ||
inputs: | ||
testResultsFiles: '**/test-results.xml' | ||
testRunTitle: 'Python $(python.version)' | ||
condition: succeededOrFailed() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# 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: 'vs2017-win2016' | ||
strategy: | ||
matrix: | ||
Python36-nightly: | ||
python.version: '3.6' | ||
ONNX_PATH: onnx==1.4.1 | ||
ONNXRT_PATH: -i https://test.pypi.org/simple/ ort-nightly | ||
COREML_PATH: git+https://github.com/apple/coremltools | ||
maxParallel: 3 | ||
|
||
steps: | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: '$(python.version)' | ||
architecture: 'x64' | ||
|
||
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" | ||
displayName: Add conda to PATH | ||
|
||
- script: conda create --yes --quiet --name py$(python.version) -c conda-forge python=$(python.version) numpy protobuf | ||
displayName: Create Anaconda environment | ||
|
||
- script: | | ||
call activate py$(python.version) | ||
python -m pip install --upgrade pip numpy | ||
echo Test numpy installation... && python -c "import numpy" | ||
pip install %COREML_PATH% %ONNX_PATH% | ||
cd onnxutils | ||
pip install -e . | ||
echo Test onnxconverter-common installation... && python -c "import onnxconverter_common" | ||
cd .. | ||
pip install -r requirements-dev.txt | ||
pip install %ONNXRT_PATH% | ||
echo Test onnxruntime installation... && python -c "import onnxruntime" | ||
REM install libsvm from github | ||
git clone --recursive https://github.com/cjlin1/libsvm libsvm | ||
copy libsvm\windows\*.dll libsvm\python | ||
set PYTHONPATH=libsvm\python;%PYTHONPATH% | ||
dir libsvm\python | ||
echo Test libsvm installation... && python -c "import svmutil" | ||
displayName: 'Install dependencies' | ||
- script: | | ||
call activate py$(python.version) | ||
set PYTHONPATH=libsvm\python;%PYTHONPATH% | ||
pip install -e . | ||
pytest tests --doctest-modules --junitxml=junit/test-results.xml | ||
displayName: 'pytest - onnxmltools' | ||
- script: | | ||
call activate py$(python.version) | ||
set PYTHONPATH=libsvm\python;%PYTHONPATH% | ||
pytest onnxutils/tests --doctest-modules --junitxml=junit/test-results-onnxutils.xml | ||
displayName: 'pytest - onnxutils' | ||
- task: PublishTestResults@2 | ||
inputs: | ||
testResultsFiles: '**/test-results.xml' | ||
testRunTitle: 'Python $(python.version)' | ||
condition: succeededOrFailed() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters