Skip to content

Commit c2cf4dc

Browse files
author
Wenbing Li
authored
fix the ci build on Win32 (#240)
1 parent 11a1712 commit c2cf4dc

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

.azure-pipelines/win32-conda-CI.yml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,31 +31,35 @@ jobs:
3131
maxParallel: 3
3232

3333
steps:
34-
- task: CondaEnvironment@1
34+
- task: UsePythonVersion@0
3535
inputs:
36-
createCustomEnvironment: true
37-
environmentName: 'py$(python.version)'
38-
packageSpecs: 'python=$(python.version)'
36+
versionSpec: '$(python.version)'
37+
architecture: 'x64'
38+
39+
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
40+
displayName: Add conda to PATH
41+
42+
- script: conda create --yes --quiet --name py$(python.version) -c conda-forge python=$(python.version) numpy protobuf
43+
displayName: Create Anaconda environment
3944

4045
- 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
46+
call activate py$(python.version)
47+
python -m pip install --upgrade pip numpy
48+
echo Test numpy installation... && python -c "import numpy"
49+
pip install %COREML_PATH% %ONNX_PATH%
4450
pip install -r requirements-dev.txt
51+
echo Test onnxruntime installation... && python -c "import onnxruntime"
4552
pip install %KERAS%
46-
# install libsvm from github
47-
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
53+
REM install libsvm from github
4854
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 ..
55+
copy libsvm\windows\*.dll libsvm\python
5356
set PYTHONPATH=libsvm\python;%PYTHONPATH%
5457
dir libsvm\python
55-
python -c "import svmutil"
58+
echo Test libsvm installation... && python -c "import svmutil"
5659
displayName: 'Install dependencies'
5760
5861
- script: |
62+
call activate py$(python.version)
5963
set PYTHONPATH=libsvm\python;%PYTHONPATH%
6064
pip install -e .
6165
pytest tests --doctest-modules --junitxml=junit/test-results.xml

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ numpy
33
protobuf
44
onnx
55
skl2onnx
6+
keras2onnx

0 commit comments

Comments
 (0)