mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
103 lines
3.5 KiB
YAML
103 lines
3.5 KiB
YAML
parameters:
|
|
AgentPool : 'Win-CPU'
|
|
DoDebugBuild: 'true'
|
|
BuildCommand: ''
|
|
JobName: 'Windows_CI_Dev'
|
|
DoNugetPack: 'false'
|
|
NuPackScript : ''
|
|
ArtifactName: 'drop-nuget'
|
|
DoEsrp: 'false'
|
|
BuildArch: 'x64'
|
|
SetVcvars: 'false'
|
|
MsbuildArguments: '/m'
|
|
EnvSetupScript: 'setup_env.bat'
|
|
CudaVersion: ''
|
|
|
|
jobs:
|
|
- job: ${{ parameters.JobName }}
|
|
timeoutInMinutes: 120
|
|
pool: ${{ parameters.AgentPool }}
|
|
variables:
|
|
buildDirectory: '$(Build.BinariesDirectory)'
|
|
BuildCommand: ${{ parameters.BuildCommand }}
|
|
OnnxRuntimeBuildDirectory: '$(Build.BinariesDirectory)'
|
|
DotNetExe: 'dotnet.exe'
|
|
CUDA_VERSION: ${{ parameters.CudaVersion }}
|
|
|
|
steps:
|
|
- template: set-test-data-variables-step.yml
|
|
- template: windows-build-tools-setup-steps.yml
|
|
parameters:
|
|
EnvSetupScript: ${{ parameters.EnvSetupScript }}
|
|
buildArch: ${{ parameters.BuildArch }}
|
|
setVcvars: ${{ parameters.SetVcvars }}
|
|
|
|
- task: CmdLine@1
|
|
displayName: 'Download test data and generate cmake config'
|
|
inputs:
|
|
filename: '$(Build.BinariesDirectory)\packages\python\python.exe'
|
|
arguments: '$(BuildCommand) --update --config Debug RelWithDebInfo'
|
|
workingDirectory: "$(Build.BinariesDirectory)"
|
|
|
|
# Build Debug Mode
|
|
- ${{ if eq(parameters['DoDebugBuild'], 'true') }}:
|
|
- task: VSBuild@1
|
|
displayName: 'Build Debug'
|
|
inputs:
|
|
solution: '$(Build.BinariesDirectory)\Debug\onnxruntime.sln'
|
|
platform: 'arm64'
|
|
configuration: 'Debug'
|
|
msbuildArguments: ${{ parameters.MsbuildArguments }}
|
|
msbuildArchitecture: 'x64'
|
|
logProjectEvents: true
|
|
workingFolder: '$(Build.BinariesDirectory)\Debug'
|
|
createLogFile: true
|
|
|
|
# Build RelWithDebInfo -- this variable required to build C#
|
|
- script: |
|
|
@echo ##vso[task.setvariable variable=Configuration]RelWithDebInfo
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build RelWithDebInfo'
|
|
inputs:
|
|
solution: '$(Build.BinariesDirectory)\RelWithDebInfo\onnxruntime.sln'
|
|
platform: 'arm64'
|
|
configuration: 'RelWithDebInfo'
|
|
msbuildArguments: ${{ parameters.MsbuildArguments }}
|
|
msbuildArchitecture: 'x64'
|
|
logProjectEvents: true
|
|
workingFolder: '$(Build.BinariesDirectory)\RelWithDebInfo'
|
|
|
|
# Nuget packaging if needed
|
|
- ${{ if eq(parameters['DoNugetPack'], 'true') }}:
|
|
- task: BatchScript@1
|
|
displayName: 'Setup VS2017 env vars'
|
|
inputs:
|
|
filename: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat'
|
|
arguments: 'x64'
|
|
modifyEnvironment: true
|
|
|
|
# Esrp signing
|
|
- template: esrp_dll.yml
|
|
parameters:
|
|
FolderPath: '$(Build.BinariesDirectory)\RelWithDebInfo'
|
|
DisplayName: 'ESRP - Sign Native dlls'
|
|
DoEsrp: ${{ parameters.DoEsrp }}
|
|
|
|
- script: |
|
|
${{ parameters.NuPackScript }}
|
|
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
|
displayName: 'Create NuGet Package'
|
|
|
|
- task: PublishPipelineArtifact@0
|
|
displayName: 'Publish Pipeline Artifact: drop-nuget'
|
|
inputs:
|
|
artifactName: ${{ parameters.ArtifactName }}
|
|
targetPath: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
|
displayName: 'Component Detection'
|
|
condition: succeeded()
|
|
|
|
- template: clean-agent-build-directory-step.yml
|
|
|