@@ -122,10 +122,7 @@ jobs:
122122 - template : templates/clean-agent-build-directory-step.yml
123123
124124- job : Windows_py_Wheels
125- workspace :
126- clean : all
127- pool : Win-CPU
128- timeoutInMinutes : 120
125+ pool : ' Win-CPU-2019'
129126 strategy :
130127 matrix :
131128 Python35 :
@@ -135,38 +132,68 @@ jobs:
135132 Python37 :
136133 python.version : ' 3.7'
137134 variables :
138- buildDirectory : ' $(Build.SourcesDirectory)\build'
139- steps :
140- - task : CondaEnvironment@1
141- inputs :
142- createCustomEnvironment : true
143- environmentName : ' py$(python.version)'
144- packageSpecs : ' python=$(python.version)'
145- cleanEnvironment : true
135+ OrtPackageId : ' Microsoft.ML.OnnxRuntime'
136+ MsbuildArguments : ' -maxcpucount'
137+ OnnxRuntimeBuildDirectory : ' $(Build.BinariesDirectory)'
138+ EnvSetupScript : setup_env.bat
139+ buildArch : x64
140+ setVcvars : true
141+ BuildConfig : ' Release'
142+ timeoutInMinutes : 60
143+ workspace :
144+ clean : all
145+ steps :
146+ - task : UsePythonVersion@0
147+ inputs :
148+ versionSpec : $(python.version)
149+ addToPath : true
150+ architecture : ' x64'
151+ - template : templates/set-test-data-variables-step.yml
146152
147- - task : BatchScript@1
148- displayName : ' Run build script '
149- inputs :
150- filename : ' build.bat '
151- arguments : ' --build_dir $(buildDirectory) --config Release --use_openmp --build_wheel '
152- workingFolder : " $(Build.SourcesDirectory) "
153+ - task : BatchScript@1
154+ displayName : ' setup env '
155+ inputs :
156+ filename : ' $(Build.SourcesDirectory)\tools\ci_build\github\windows\$(EnvSetupScript) '
157+ modifyEnvironment : true
158+ workingFolder : ' $(Build.BinariesDirectory) '
153159
154- - task : CopyFiles@2
155- displayName : ' Copy Python Wheel to: $(Build.ArtifactStagingDirectory)'
156- inputs :
157- SourceFolder : ' $(buildDirectory)'
158- Contents : ' **\dist\*.whl'
159- TargetFolder : ' $(Build.ArtifactStagingDirectory)'
160+ - script : |
161+ python -m pip install -q pyopenssl setuptools wheel numpy
162+
163+ workingDirectory: '$(Build.BinariesDirectory)'
164+ displayName: 'Install python modules'
160165
161- - task : PublishBuildArtifacts@1
162- displayName : ' Publish Artifact: ONNXRuntime python wheel'
163- inputs :
164- ArtifactName : onnxruntime
166+ - task : PythonScript@0
167+ displayName : ' Download test data'
168+ inputs :
169+ scriptPath : ' $(Build.SourcesDirectory)\tools\ci_build\github\download_test_data.py'
170+ arguments : --test_data_url $(TestDataUrl) --build_dir $(Build.BinariesDirectory)
171+ workingDirectory : $(Build.BinariesDirectory)
165172
166- - task : ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
167- displayName : ' Component Detection'
173+ - task : PythonScript@0
174+ displayName : ' BUILD'
175+ inputs :
176+ scriptPath : ' $(Build.SourcesDirectory)\tools\ci_build\build.py'
177+ arguments : ' --config $(BuildConfig) --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_generator "Visual Studio 16 2019" --build_wheel --use_automl --enable_onnx_tests --parallel'
178+ workingDirectory : ' $(Build.BinariesDirectory)'
179+
180+ - task : CopyFiles@2
181+ displayName : ' Copy Python Wheel to: $(Build.ArtifactStagingDirectory)'
182+ inputs :
183+ SourceFolder : ' $(Build.BinariesDirectory)\$(BuildConfig)'
184+ Contents : ' **\dist\*.whl'
185+ TargetFolder : ' $(Build.ArtifactStagingDirectory)'
168186
169- - template : templates/clean-agent-build-directory-step.yml
187+ - task : PublishBuildArtifacts@1
188+ displayName : ' Publish Artifact: ONNXRuntime python wheel'
189+ inputs :
190+ ArtifactName : onnxruntime
191+
192+ - task : ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
193+ displayName : ' Component Detection'
194+ condition : succeeded()
195+
196+ - template : templates/clean-agent-build-directory-step.yml
170197
171198- job : Windows_py_GPU_Wheels
172199 workspace :
@@ -185,13 +212,11 @@ jobs:
185212 Python37 :
186213 python.version : ' 3.7'
187214 steps :
188- - task : CondaEnvironment@1
189- inputs :
190- createCustomEnvironment : true
191- environmentName : ' py$(python.version)'
192- packageSpecs : ' python=$(python.version)'
193- cleanEnvironment : true
194-
215+ - task : UsePythonVersion@0
216+ inputs :
217+ versionSpec : $(python.version)
218+ addToPath : true
219+ architecture : ' x64'
195220 - task : BatchScript@1
196221 displayName : ' Setup VS2017 env vars'
197222 inputs :
0 commit comments