mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
1. Remove openmp because the default thread pool is already good enough. 2. Remove scipy from build pipelines because it stops support python 3.5.
127 lines
4.3 KiB
YAML
127 lines
4.3 KiB
YAML
parameters:
|
|
DoDebugBuild: 'true'
|
|
DoCompliance: 'false'
|
|
BuildCommand: ''
|
|
JobName: 'Windows_CI_Dev'
|
|
DoNugetPack: 'false'
|
|
NuPackScript : ''
|
|
ArtifactName: 'drop-nuget'
|
|
DoEsrp: 'false'
|
|
BuildArch: 'x64'
|
|
DoTestCoverage: 'false'
|
|
sln_platform: 'Arm64' # Options: Win32, x64,Arm64
|
|
SetVcvars: 'false'
|
|
MsbuildArguments: '/m'
|
|
EnvSetupScript: 'setup_env.bat'
|
|
CudaVersion: ''
|
|
|
|
jobs:
|
|
- job: ${{ parameters.JobName }}
|
|
workspace:
|
|
clean: all
|
|
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
|
|
- powershell: |
|
|
if($env:TELEMETRYGUID)
|
|
{
|
|
$length = $env:TELEMETRYGUID.length
|
|
$fileContent = "#define ENABLE_TELEMETRY`n#define TraceLoggingOptionMicrosoftTelemetry() \
|
|
TraceLoggingOptionGroup("+$env:TELEMETRYGUID.substring(1, $length-2)+")"
|
|
New-Item -Path "$(Build.SourcesDirectory)\include\onnxruntime\core\platform\windows\TraceLoggingConfigPrivate.h" -ItemType "file" -Value "$fileContent" -Force
|
|
Write-Output "Enabling TELEMETRY"
|
|
}
|
|
displayName: 'Create TraceLoggingConfigPrivate.h For WinML Telemetry'
|
|
env:
|
|
TELEMETRYGUID: $(TELEMETRYGUID)
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'setup env'
|
|
inputs:
|
|
filename: '$(Build.SourcesDirectory)\tools\ci_build\github\windows\${{ parameters.EnvSetupScript }}'
|
|
modifyEnvironment: true
|
|
workingFolder: '$(Build.BinariesDirectory)'
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Setup VS2019 env vars'
|
|
inputs:
|
|
filename: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat'
|
|
arguments: amd64_arm
|
|
modifyEnvironment: true
|
|
|
|
- task: UsePythonVersion@0
|
|
inputs:
|
|
versionSpec: '3.7'
|
|
addToPath: true
|
|
architecture: x64
|
|
|
|
- script: |
|
|
python -m pip install -q pyopenssl setuptools wheel numpy
|
|
workingDirectory: '$(Build.BinariesDirectory)'
|
|
displayName: 'Install python modules'
|
|
|
|
- task: PythonScript@0
|
|
displayName: 'Generate cmake config'
|
|
inputs:
|
|
scriptPath: '$(Build.SourcesDirectory)\tools\ci_build\build.py'
|
|
arguments: '$(BuildCommand) --update --config RelWithDebInfo'
|
|
workingDirectory: '$(Build.BinariesDirectory)'
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build'
|
|
inputs:
|
|
solution: '$(Build.BinariesDirectory)\RelWithDebInfo\onnxruntime.sln'
|
|
platform: ${{ parameters.sln_platform }}
|
|
configuration: RelWithDebInfo
|
|
msbuildArchitecture: ${{ parameters.BuildArch }}
|
|
maximumCpuCount: true
|
|
logProjectEvents: true
|
|
workingFolder: '$(Build.BinariesDirectory)\RelWithDebInfo'
|
|
createLogFile: true
|
|
|
|
# Build RelWithDebInfo -- this variable required to build C#
|
|
- script: |
|
|
@echo ##vso[task.setvariable variable=Configuration]RelWithDebInfo
|
|
|
|
|
|
# Nuget packaging if needed
|
|
- ${{ if eq(parameters['DoNugetPack'], 'true') }}:
|
|
# Esrp signing
|
|
- template: win-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: PublishSymbols@2
|
|
displayName: 'Publish Build Symbols'
|
|
condition: eq(variables['IsReleaseBuild'], 'true')
|
|
inputs:
|
|
symbolsFolder: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo'
|
|
searchPattern: '**/*.pdb'
|
|
symbolServerType: teamServices
|
|
|
|
- template: component-governance-component-detection-steps.yml
|
|
parameters :
|
|
condition : 'succeeded'
|
|
|
|
- template: clean-agent-build-directory-step.yml
|