Skip to content

Commit 3288f87

Browse files
committed
the intial checkin for the azure pipelines.
1 parent 49fd648 commit 3288f87

File tree

2 files changed

+126
-0
lines changed

2 files changed

+126
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Python package
2+
# Create and test a Python package on multiple Python versions.
3+
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
4+
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
5+
6+
trigger:
7+
- master
8+
9+
jobs:
10+
11+
- job: 'Test'
12+
pool:
13+
vmImage: 'Ubuntu-16.04'
14+
strategy:
15+
matrix:
16+
Python27:
17+
python.version: '2.7'
18+
# Python35:
19+
# python.version: '3.5'
20+
Python36:
21+
python.version: '3.6'
22+
maxParallel: 3
23+
24+
steps:
25+
- task: CondaEnvironment@1
26+
inputs:
27+
createCustomEnvironment: true
28+
environmentName: 'py$(python.version)'
29+
packageSpecs: 'python=$(python.version)'
30+
31+
- script: |
32+
python -m pip install --upgrade pip
33+
conda config --set always_yes yes --set changeps1 no
34+
conda install -c conda-forge protobuf
35+
conda install -c conda-forge numpy
36+
conda install -c conda-forge cmake
37+
conda install -c conda-forge openmpi
38+
conda install -c conda-forge tensorflow
39+
pip install -r requirements.txt
40+
pip install -r requirements-dev.txt
41+
test '$(python.version)' != '2.7' && pip install onnxruntime
42+
pip install pytest
43+
git clone --recursive https://github.com/cjlin1/libsvm libsvm
44+
cd libsvm
45+
make lib
46+
displayName: 'Install dependencies'
47+
48+
- script: |
49+
export PYTHONPATH=$PYTHONPATH:libsvm/python
50+
python -c "import svmutil"
51+
test '$(python.version)' != '2.7' && python -c "import onnxruntime"
52+
pytest tests --doctest-modules --junitxml=junit/test-results.xml
53+
displayName: 'pytest'
54+
55+
- task: PublishTestResults@2
56+
inputs:
57+
testResultsFiles: '**/test-results.xml'
58+
testRunTitle: 'Python $(python.version)'
59+
condition: succeededOrFailed()
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Python package
2+
# Create and test a Python package on multiple Python versions.
3+
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
4+
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
5+
6+
trigger:
7+
- master
8+
9+
jobs:
10+
11+
- job: 'Test'
12+
pool:
13+
vmImage: 'vs2017-win2016'
14+
strategy:
15+
matrix:
16+
# No python 2.x since no available ONNX package for Windows
17+
# Python27:
18+
# python.version: '2.7'
19+
Python35:
20+
python.version: '3.5'
21+
ONNX_PATH: onnx==1.2.3
22+
KERAS: keras==2.1.6
23+
COREML_PATH: https://github.com/apple/coremltools/archive/v2.0.zip
24+
25+
Python36:
26+
python.version: '3.6'
27+
ONNX_PATH: onnx
28+
KERAS: keras
29+
COREML_PATH: git+https://github.com/apple/coremltools
30+
31+
maxParallel: 3
32+
33+
steps:
34+
- task: CondaEnvironment@1
35+
inputs:
36+
createCustomEnvironment: true
37+
environmentName: 'py$(python.version)'
38+
packageSpecs: 'python=$(python.version)'
39+
40+
- script: |
41+
conda install -y -c conda-forge protobuf numpy
42+
python -m pip install --upgrade pip
43+
pip install %COREML_PATH% %ONNX_PATH% cntk==2.5.1
44+
pip install -r requirements-dev.txt"
45+
pip install %KERAS%
46+
install libsvm from github
47+
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
48+
git clone --recursive https://github.com/cjlin1/libsvm libsvm
49+
cd libsvm
50+
nmake -f Makefile.win lib
51+
copy windows\*.dll python
52+
cd ..
53+
set PYTHONPATH=libsvm\python;%PYTHONPATH%
54+
dir libsvm\python
55+
python -c "import svmutil"
56+
displayName: 'Install dependencies'
57+
58+
- script: |
59+
pip install -e .
60+
pytest tests --doctest-modules --junitxml=junit/test-results.xml
61+
displayName: 'pytest'
62+
63+
- task: PublishTestResults@2
64+
inputs:
65+
testResultsFiles: '**/test-results.xml'
66+
testRunTitle: 'Python $(python.version)'
67+
condition: succeededOrFailed()

0 commit comments

Comments
 (0)