forked from onnx/onnx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Windows-CI.yml
85 lines (71 loc) · 2.22 KB
/
Windows-CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
trigger:
- main
jobs:
- job: 'Test'
pool:
vmImage: 'windows-2019'
strategy:
matrix:
py39:
python.version: '3.9'
onnx_ml: 0
onnx_verify_proto: 0
py39_verify_proto:
python.version: '3.9'
onnx_ml: 0
onnx_verify_proto: 1
py38:
python.version: '3.8'
onnx_ml: 0
onnx_verify_proto: 0
py37:
python.version: '3.7'
onnx_ml: 0
onnx_verify_proto: 0
py37_onnx_ml:
python.version: '3.7'
onnx_ml: 1
onnx_verify_proto: 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) python=$(python.version)
conda install -n py$(python.version) -y -c conda-forge numpy libprotobuf=3.16.0
displayName: Create Anaconda environment
- script: |
call activate py$(python.version)
python -m pip install -q --upgrade pip
python -m pip install -q -r requirements-release.txt
git submodule update --init --recursive
set ONNX_BUILD_TESTS=1
set ONNX_ML=$(onnx_ml)
set CMAKE_ARGS=-DONNX_USE_PROTOBUF_SHARED_LIBS=ON -DONNX_USE_LITE_PROTO=ON -DONNX_WERROR=ON
python setup.py -q install
pytest
IF NOT %ERRORLEVEL% EQU 0 (
@echo "pytest failed"
EXIT 1
)
python onnx/defs/gen_doc.py
python onnx/gen_proto.py -l
python onnx/gen_proto.py -l --ml
git diff --exit-code -- . :(exclude)onnx/onnx-data.proto :(exclude)onnx/onnx-data.proto3
IF NOT %ERRORLEVEL% EQU 0 (
@echo "git diff returned failures"
EXIT 1
)
python onnx/backend/test/cmd_tools.py generate-data
git status
git diff --exit-code -- . :!onnx/onnx-data.proto :!onnx/onnx-data.proto3 :!*output_*.pb :!*input_*.pb
IF NOT %ERRORLEVEL% EQU 0 (
@echo "git diff for test generation returned failures. Please check updated node test files"
EXIT 1
)
rm -rf .setuptools-cmake-build
displayName: Install and test ONNX