@@ -38,10 +38,6 @@ parameters:
38
38
- RelWithDebInfo
39
39
- MinSizeRel
40
40
41
- - name : publish_symbols
42
- type : boolean
43
- default : false
44
-
45
41
stages :
46
42
- stage : Win_py_${{ parameters.EP_NAME }}_Wheels_${{ replace(parameters.PYTHON_VERSION,'.','_') }}_Build
47
43
dependsOn : []
@@ -52,6 +48,22 @@ stages:
52
48
clean : all
53
49
pool :
54
50
name : onnxruntime-Win-CPU-2022
51
+ os : windows
52
+ templateContext :
53
+ codeSignValidation :
54
+ enabled : true
55
+ break : true
56
+ psscriptanalyzer :
57
+ enabled : true
58
+ sdl :
59
+ binskim :
60
+ enabled : true
61
+ scanOutputDirectoryOnly : true
62
+ targetPathPattern : ' +:file|*.dll;-:file|DirectML.dll'
63
+ outputs :
64
+ - output : pipelineArtifact
65
+ targetPath : $(Build.ArtifactStagingDirectory)
66
+ artifactName : win_${{ parameters.EP_NAME }}_wheel_${{ parameters.PYTHON_VERSION }}
55
67
variables :
56
68
GRADLE_OPTS : ' -Dorg.gradle.daemon=false'
57
69
VSGenerator : ' Visual Studio 17 2022'
@@ -73,12 +85,6 @@ stages:
73
85
addToPath : true
74
86
architecture : ' x64'
75
87
76
- - task : onebranch.pipeline.tsaoptions@1
77
- displayName : ' OneBranch TSAOptions'
78
- inputs :
79
- tsaConfigFilePath : ' $(Build.SourcesDirectory)\.config\tsaoptions.json'
80
- appendSourceBranchName : false
81
-
82
88
- template : ../templates/download-deps.yml
83
89
84
90
- ${{ if ne(parameters.ENV_SETUP_SCRIPT, '') }} :
@@ -106,13 +112,6 @@ stages:
106
112
arguments : --new_dir $(Build.BinariesDirectory)/deps
107
113
workingDirectory : $(Build.BinariesDirectory)
108
114
109
- - task : PowerShell@2
110
- displayName : ' Install ONNX'
111
- inputs :
112
- filePath : ' $(Build.SourcesDirectory)/tools/ci_build/github/windows/install_third_party_deps.ps1'
113
- workingDirectory : ' $(Build.BinariesDirectory)'
114
- arguments : -cpu_arch x64 -install_prefix $(Build.BinariesDirectory)\${{ parameters.cmake_build_type }}\installed -build_config ${{ parameters.cmake_build_type }}
115
-
116
115
- template : ../templates/set-nightly-build-option-variable-step.yml
117
116
118
117
- task : PythonScript@0
@@ -126,19 +125,7 @@ stages:
126
125
--cmake_generator "$(VSGenerator)"
127
126
--enable_pybind
128
127
--enable_onnx_tests
129
- --parallel --use_binskim_compliant_compile_flags --update
130
- $(TelemetryOption) ${{ parameters.BUILD_PY_PARAMETERS }} ${{ parameters.EP_BUILD_FLAGS }}
131
- workingDirectory : ' $(Build.BinariesDirectory)'
132
-
133
- # building with build.py so the parallelization parameters are added to the msbuild command
134
- - task : PythonScript@0
135
- displayName : ' Build'
136
- inputs :
137
- scriptPath : ' $(Build.SourcesDirectory)\tools\ci_build\build.py'
138
- arguments : >
139
- --config ${{ parameters.cmake_build_type }}
140
- --build_dir $(Build.BinariesDirectory)
141
- --parallel --build
128
+ --parallel --use_binskim_compliant_compile_flags --update --build
142
129
$(TelemetryOption) ${{ parameters.BUILD_PY_PARAMETERS }} ${{ parameters.EP_BUILD_FLAGS }}
143
130
workingDirectory : ' $(Build.BinariesDirectory)'
144
131
@@ -164,48 +151,11 @@ stages:
164
151
Contents : ' *.whl'
165
152
TargetFolder : ' $(Build.ArtifactStagingDirectory)'
166
153
167
- - task : PublishBuildArtifacts@1
168
- displayName : ' Publish Artifact: ONNXRuntime python wheel'
169
- inputs :
170
- ArtifactName : onnxruntime_${{ parameters.EP_NAME }}
171
-
172
- - ${{ if eq(parameters.publish_symbols, true) }} :
173
- - task : PublishSymbols@2
174
- displayName : ' Publish symbols'
175
- condition : and (succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/rel-')))
176
- inputs :
177
- SymbolsFolder : ' $(Build.BinariesDirectory)\${{ parameters.cmake_build_type }}\${{ parameters.cmake_build_type }}'
178
- SearchPattern : |
179
- onnxruntime_pybind11_state.pdb
180
- onnxruntime_providers_shared.pdb
181
- IndexSources : true
182
- SymbolServerType : TeamServices
183
- SymbolExpirationInDays : 3650
184
- SymbolsArtifactName : ' win_${{ parameters.EP_NAME }}_${{ parameters.PYTHON_VERSION }}_$(Build.BuildNumber)'
185
-
186
154
- script : |
187
155
7z x *.whl
188
156
workingDirectory: '$(Build.ArtifactStagingDirectory)'
189
157
displayName: 'unzip the package'
190
158
191
- - task : CredScan@3
192
- displayName : ' Run CredScan'
193
- inputs :
194
- debugMode : false
195
- continueOnError : true
196
-
197
- - task : BinSkim@4
198
- displayName : ' Run BinSkim'
199
- inputs :
200
- AnalyzeTargetGlob : ' +:file|$(Build.ArtifactStagingDirectory)\**\*.dll;-:file|$(Build.ArtifactStagingDirectory)\**\DirectML.dll'
201
-
202
- - task : TSAUpload@2
203
- displayName : ' TSA upload'
204
- condition : and (succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
205
- inputs :
206
- GdnPublishTsaOnboard : false
207
- GdnPublishTsaConfigFile : ' $(Build.sourcesDirectory)\.gdn\.gdntsa'
208
-
209
159
- template : ../templates/component-governance-component-detection-steps.yml
210
160
parameters :
211
161
condition : ' succeeded'
@@ -235,7 +185,7 @@ stages:
235
185
236
186
- template : ../templates/flex-downloadPipelineArtifact.yml
237
187
parameters :
238
- ArtifactName : onnxruntime_ ${{ parameters.EP_NAME }}
188
+ ArtifactName : win_ ${{ parameters.EP_NAME }}_wheel_${{ parameters.PYTHON_VERSION }}
239
189
StepName : ' Download Pipeline Artifact - Windows GPU Build'
240
190
TargetPath : ' $(Build.ArtifactStagingDirectory)'
241
191
0 commit comments