Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create nightly CI #184

Merged
merged 3 commits into from
Jun 9, 2021
Merged
Changes from 1 commit
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
147 changes: 147 additions & 0 deletions .azure-pipelines/nightly-CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# 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

jobs:

- job: 'linux-conda-CI nightly test'
pool:
vmImage: 'Ubuntu-16.04'
strategy:
matrix:
Python35:
python.version: '3.5'
ONNX_PATH: onnx==1.3.0

Python36:
python.version: '3.6'
ONNX_PATH: onnx==1.5.0

Python37:
python.version: '3.7'
ONNX_PATH: onnx==1.6.0

Python381:
python.version: '3.8'
ONNX_PATH: onnx==1.7.0

Python382:
python.version: '3.8'
ONNX_PATH: onnx==1.8.0

maxParallel: 4

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
pip install -r requirements.txt
pip install --index-url https://test.pypi.org/simple/ ort-nightly
pip install $(ONNX_PATH)
pip install pytest
pip install -e .
displayName: 'Install dependencies'

- script: |
pip install flake8
python -m flake8 onnxconverter_common
displayName: 'run flake8 check'

- script: |
python -c "import onnxconverter_common"
pytest 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()

- job: 'win32-conda-CI nightly test'
pool:
vmImage: 'vs2017-win2016'
strategy:
matrix:
Python35:
python.version: '3.5'
ONNX_PATH: onnx==1.3.0

Python36:
python.version: '3.6'
ONNX_PATH: onnx==1.5.0

Python37:
python.version: '3.7'
ONNX_PATH: onnx==1.6.0

Python381:
python.version: '3.8'
ONNX_PATH: onnx==1.7.0

Python382:
python.version: '3.8'
ONNX_PATH: onnx==1.8.0

maxParallel: 4

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 -r requirements.txt
pip install --index-url https://test.pypi.org/simple/ ort-nightly
pip install %ONNX_PATH%
pip install pytest
pip install -e .
displayName: 'Install dependencies'

- script: |
call activate py$(python.version)
pip install flake8
python -m flake8 onnxconverter_common
displayName: 'run flake8 check'

- script: |
call activate py$(python.version)
pytest 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()


schedules:
- cron: "0 10 * * *"
displayName: Daily onnxruntime nightly unittest
branches:
include:
- master
always: true