mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Packaging pipeline changes for VS 2019 (#2711)
This commit is contained in:
parent
f0046a1531
commit
b42cb61904
26 changed files with 230 additions and 556 deletions
|
|
@ -218,12 +218,7 @@ else()
|
|||
string(APPEND CMAKE_C_FLAGS_RELEASE " -march=native -mtune=native")
|
||||
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -march=native -mtune=native")
|
||||
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " -march=native -mtune=native")
|
||||
endif()
|
||||
if(onnxruntime_BUILD_x86)
|
||||
set (CMAKE_SYSTEM_PROCESSOR "x86")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse -Wno-narrowing")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mfpmath=sse -Wno-narrowing")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<OnnxRuntimeCsharpRoot>$(MSBuildThisFileDirectory)..\..</OnnxRuntimeCsharpRoot>
|
||||
<PackageName Condition="'$(PackageName)' == ''">Microsoft.ML.OnnxRuntime</PackageName>
|
||||
<OnnxRuntimeSampleCode Condition="'$(OnnxRuntimeSampleCode)' == ''">C_Api_Sample.cpp</OnnxRuntimeSampleCode>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\packages\$(PackageName).$(CurrentOnnxRuntimeVersion)\build\native\$(PackageName).props" Condition="Exists('..\packages\$(PackageName).$(CurrentOnnxRuntimeVersion)\build\native\$(PackageName).props')" />
|
||||
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
|
|
@ -17,7 +15,7 @@
|
|||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
|
|
@ -36,13 +34,13 @@
|
|||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
|
@ -112,7 +110,7 @@
|
|||
<ClCompile Include="$(OnnxRuntimeSampleCode)" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="$(OnnxRuntimeCSharpRoot)\testdata\*">
|
||||
<None Include="$(OnnxRuntimeCSharpRoot)\testdata\*">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</None>
|
||||
|
|
@ -129,4 +127,4 @@
|
|||
<Error Condition="!Exists('..\packages\$(PackageName).$(CurrentOnnxRuntimeVersion)\build\native\$(PackageName).props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\$(PackageName).$(CurrentOnnxRuntimeVersion)\build\native\$(PackageName).props'))" />
|
||||
<Error Condition="!Exists('..\packages\$(PackageName).$(CurrentOnnxRuntimeVersion)\build\native\$(PackageName).targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\$(PackageName).$(CurrentOnnxRuntimeVersion)\build\native\$(PackageName).targets'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
@ -1,11 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<OnnxRuntimeCsharpRoot>$(MSBuildThisFileDirectory)..\..</OnnxRuntimeCsharpRoot>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\packages\Microsoft.ML.OnnxRuntime.Gpu.$(CurrentOnnxRuntimeVersion)\build\native\Microsoft.ML.OnnxRuntime.Gpu.props" Condition="Exists('..\packages\Microsoft.ML.OnnxRuntime.Gpu.$(CurrentOnnxRuntimeVersion)\build\native\Microsoft.ML.OnnxRuntime.Gpu.props')" />
|
||||
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
|
|
@ -26,13 +24,13 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
|
@ -90,7 +88,7 @@
|
|||
<ClCompile Include="C_Api_Sample.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="$(OnnxRuntimeCSharpRoot)\testdata\*">
|
||||
<None Include="$(OnnxRuntimeCSharpRoot)\testdata\*">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</None>
|
||||
|
|
@ -107,4 +105,4 @@
|
|||
<Error Condition="!Exists('..\packages\Microsoft.ML.OnnxRuntime.Gpu.$(CurrentOnnxRuntimeVersion)\build\native\Microsoft.ML.OnnxRuntime.Gpu.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ML.OnnxRuntime.Gpu.$(CurrentOnnxRuntimeVersion)\build\native\Microsoft.ML.OnnxRuntime.Gpu.props'))" />
|
||||
<Error Condition="!Exists('..\packages\Microsoft.ML.OnnxRuntime.Gpu.$(CurrentOnnxRuntimeVersion)\build\native\Microsoft.ML.OnnxRuntime.Gpu.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ML.OnnxRuntime.Gpu.$(CurrentOnnxRuntimeVersion)\build\native\Microsoft.ML.OnnxRuntime.Gpu.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
@ -141,7 +141,6 @@ Use the individual flags to only run the specified stages.
|
|||
parser.add_argument("--use_tvm", action="store_true", help="Build with tvm")
|
||||
parser.add_argument("--use_openmp", action='store_true', help="Build with OpenMP.")
|
||||
parser.add_argument("--use_llvm", action="store_true", help="Build tvm with llvm")
|
||||
parser.add_argument("--use_eigenthreadpool", action="store_true", help="Build with eigenthreadpool")
|
||||
parser.add_argument("--enable_msinternal", action="store_true", help="Enable for Microsoft internal builds only.")
|
||||
parser.add_argument("--llvm_path", help="Path to llvm dir")
|
||||
parser.add_argument("--use_brainslice", action="store_true", help="Build with brain slice")
|
||||
|
|
@ -318,13 +317,11 @@ def generate_build_tree(cmake_path, source_dir, build_dir, cuda_home, cudnn_home
|
|||
"-Donnxruntime_ENABLE_MICROSOFT_INTERNAL=" + ("ON" if args.enable_msinternal else "OFF"),
|
||||
"-Donnxruntime_USE_BRAINSLICE=" + ("ON" if args.use_brainslice else "OFF"),
|
||||
"-Donnxruntime_USE_NUPHAR=" + ("ON" if args.use_nuphar else "OFF"),
|
||||
"-Donnxruntime_USE_EIGEN_THREADPOOL=" + ("ON" if args.use_eigenthreadpool else "OFF"),
|
||||
"-Donnxruntime_USE_TENSORRT=" + ("ON" if args.use_tensorrt else "OFF"),
|
||||
"-Donnxruntime_TENSORRT_HOME=" + (tensorrt_home if args.use_tensorrt else ""),
|
||||
# By default - we currently support only cross compiling for ARM/ARM64 (no native compilation supported through this script)
|
||||
"-Donnxruntime_CROSS_COMPILING=" + ("ON" if args.arm64 or args.arm else "OFF"),
|
||||
"-Donnxruntime_BUILD_SERVER=" + ("ON" if args.build_server else "OFF"),
|
||||
"-Donnxruntime_BUILD_x86=" + ("ON" if args.x86 else "OFF"),
|
||||
# nGraph and TensorRT providers currently only supports full_protobuf option.
|
||||
"-Donnxruntime_USE_FULL_PROTOBUF=" + ("ON" if args.use_full_protobuf or args.use_ngraph or args.use_tensorrt or args.build_server or args.gen_doc else "OFF"),
|
||||
"-Donnxruntime_DISABLE_CONTRIB_OPS=" + ("ON" if args.disable_contrib_ops else "OFF"),
|
||||
|
|
|
|||
|
|
@ -174,13 +174,13 @@ jobs:
|
|||
displayName: 'BUILD'
|
||||
inputs:
|
||||
scriptPath: '$(Build.SourcesDirectory)\tools\ci_build\build.py'
|
||||
arguments: '--config $(BuildConfig) --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_generator "Visual Studio 16 2019" --build_wheel --use_featurizers --enable_onnx_tests --parallel'
|
||||
arguments: '--config RelWithDebInfo --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_generator "Visual Studio 16 2019" --build_wheel --use_featurizers --enable_onnx_tests --parallel'
|
||||
workingDirectory: '$(Build.BinariesDirectory)'
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy Python Wheel to: $(Build.ArtifactStagingDirectory)'
|
||||
inputs:
|
||||
SourceFolder: '$(Build.BinariesDirectory)\$(BuildConfig)'
|
||||
SourceFolder: '$(Build.BinariesDirectory)\RelWithDebInfo'
|
||||
Contents: '**\dist\*.whl'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
|
|
@ -198,11 +198,11 @@ jobs:
|
|||
- job: Windows_py_GPU_Wheels
|
||||
workspace:
|
||||
clean: all
|
||||
pool: Win-GPU-CUDA10
|
||||
pool: 'Win-GPU-2019'
|
||||
timeoutInMinutes: 120
|
||||
variables:
|
||||
buildDirectory: '$(Build.SourcesDirectory)\build'
|
||||
CUDA_VERSION: '10.0'
|
||||
EnvSetupScript: setup_env.bat
|
||||
strategy:
|
||||
matrix:
|
||||
Python35:
|
||||
|
|
@ -217,30 +217,39 @@ jobs:
|
|||
versionSpec: $(python.version)
|
||||
addToPath: true
|
||||
architecture: 'x64'
|
||||
- task: BatchScript@1
|
||||
displayName: 'Setup VS2017 env vars'
|
||||
inputs:
|
||||
filename: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat'
|
||||
arguments: 'amd64'
|
||||
modifyEnvironment: true
|
||||
- task: PowerShell@1
|
||||
displayName: 'Set CUDA path'
|
||||
inputs:
|
||||
scriptName: 'tools/ci_build/github/windows/set_cuda_path.ps1'
|
||||
arguments: '-CudaMsbuildPath C:\local\cudaMsbuildIntegration-10.0.130-win10 -CudaVersion 10.0'
|
||||
|
||||
- task: BatchScript@1
|
||||
displayName: 'Run build script'
|
||||
displayName: 'setup env'
|
||||
inputs:
|
||||
filename: 'build.bat'
|
||||
arguments: ' --use_cuda --cuda_home="C:\local\cuda_10.0.130_win10"
|
||||
--cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda" --build_dir $(buildDirectory) --config Release --build_wheel'
|
||||
workingFolder: "$(Build.SourcesDirectory)"
|
||||
filename: '$(Build.SourcesDirectory)\tools\ci_build\github\windows\$(EnvSetupScript)'
|
||||
modifyEnvironment: true
|
||||
workingFolder: '$(Build.BinariesDirectory)'
|
||||
|
||||
|
||||
- script: |
|
||||
python -m pip install -q pyopenssl setuptools wheel numpy
|
||||
workingDirectory: '$(Build.BinariesDirectory)'
|
||||
displayName: 'Install python modules'
|
||||
|
||||
- template: templates/set-test-data-variables-step.yml
|
||||
- task: PythonScript@0
|
||||
displayName: 'Download test data'
|
||||
inputs:
|
||||
scriptPath: '$(Build.SourcesDirectory)\tools\ci_build\github\download_test_data.py'
|
||||
arguments: --test_data_url $(TestDataUrl) --build_dir $(Build.BinariesDirectory)
|
||||
workingDirectory: $(Build.BinariesDirectory)
|
||||
|
||||
- task: PythonScript@0
|
||||
displayName: 'build'
|
||||
inputs:
|
||||
scriptPath: '$(Build.SourcesDirectory)\tools\ci_build\build.py'
|
||||
arguments: --config RelWithDebInfo --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --cmake_generator "Visual Studio 16 2019" --msvc_toolset 14.16 --build_wheel --enable_onnx_tests --parallel --use_cuda --cuda_version=$(CUDA_VERSION) --cuda_home="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v$(CUDA_VERSION)" --cudnn_home="C:\local\cudnn-$(CUDA_VERSION)-windows10-x64-v7.3.1.20\cuda"
|
||||
workingDirectory: '$(Build.BinariesDirectory)'
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy Python Wheel to: $(Build.ArtifactStagingDirectory)'
|
||||
inputs:
|
||||
SourceFolder: '$(buildDirectory)'
|
||||
SourceFolder: '$(Build.BinariesDirectory)\RelWithDebInfo'
|
||||
Contents: '**\dist\*.whl'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
|
|
@ -249,11 +258,6 @@ jobs:
|
|||
inputs:
|
||||
ArtifactName: onnxruntime_gpu
|
||||
|
||||
- task: PowerShell@1
|
||||
displayName: 'Clean up CUDA props files'
|
||||
inputs:
|
||||
scriptName: 'tools/ci_build/github/windows/clean_up_cuda_prop_files.ps1'
|
||||
arguments: '-CudaVersion 10.0'
|
||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
||||
displayName: 'Component Detection'
|
||||
|
||||
|
|
|
|||
|
|
@ -93,9 +93,6 @@ jobs:
|
|||
msbuildArch: amd64
|
||||
msbuildPlatform: x64
|
||||
buildparameter:
|
||||
variables:
|
||||
buildDirectory: '$(Build.BinariesDirectory)'
|
||||
buildArch: 'x64'
|
||||
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
|
|
@ -161,49 +158,78 @@ jobs:
|
|||
commitId: $(OnnxRuntimeGitCommitHash)
|
||||
- template: templates/clean-agent-build-directory-step.yml
|
||||
|
||||
- job: Windows_Packaging_GPU_x64
|
||||
|
||||
- job: Windows_Packaging_GPU
|
||||
workspace:
|
||||
clean: all
|
||||
timeoutInMinutes: 120
|
||||
pool: 'Win-GPU-CUDA10'
|
||||
pool: 'Win-GPU-2019'
|
||||
timeoutInMinutes: 120
|
||||
variables:
|
||||
buildDirectory: '$(Build.BinariesDirectory)'
|
||||
buildConfig: 'RelWithDebInfo'
|
||||
buildArch: 'x64'
|
||||
|
||||
EnvSetupScript: setup_env.bat
|
||||
buildArch: x64
|
||||
msbuildArch: amd64
|
||||
msbuildPlatform: x64
|
||||
CUDA_VERSION: '10.0'
|
||||
buildparameter: --msvc_toolset 14.16 --use_cuda --cuda_version=$(CUDA_VERSION) --cuda_home="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v$(CUDA_VERSION)" --cudnn_home="C:\local\cudnn-$(CUDA_VERSION)-windows10-x64-v7.3.1.20\cuda"
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '3.7'
|
||||
addToPath: true
|
||||
architecture: $(buildArch)
|
||||
|
||||
- task: BatchScript@1
|
||||
displayName: 'setup env'
|
||||
inputs:
|
||||
filename: '$(Build.SourcesDirectory)\tools\ci_build\github\windows\$(EnvSetupScript)'
|
||||
modifyEnvironment: true
|
||||
workingFolder: '$(Build.BinariesDirectory)'
|
||||
|
||||
- script: |
|
||||
python -m pip install -q pyopenssl setuptools wheel numpy
|
||||
workingDirectory: '$(Build.BinariesDirectory)'
|
||||
displayName: 'Install python modules'
|
||||
|
||||
- template: templates/set-test-data-variables-step.yml
|
||||
- template: templates/set-version-number-variables-step.yml
|
||||
|
||||
- template: templates/windows-build-tools-setup-steps.yml
|
||||
parameters:
|
||||
EnvSetupScript: 'setup_env.bat'
|
||||
buildArch: 'amd64' # amd64 is needed for vcvars target arch
|
||||
setVcvars: true
|
||||
|
||||
- task: PowerShell@1
|
||||
displayName: 'Set CUDA path'
|
||||
- task: PythonScript@0
|
||||
displayName: 'Download test data'
|
||||
inputs:
|
||||
scriptName: 'tools/ci_build/github/windows/set_cuda_path.ps1'
|
||||
arguments: '-CudaMsbuildPath C:\local\cudaMsbuildIntegration-10.0.130-win10 -CudaVersion 10.0'
|
||||
scriptPath: '$(Build.SourcesDirectory)\tools\ci_build\github\download_test_data.py'
|
||||
arguments: --test_data_url $(TestDataUrl) --build_dir $(Build.BinariesDirectory)
|
||||
workingDirectory: $(Build.BinariesDirectory)
|
||||
|
||||
- task: CmdLine@2
|
||||
displayName: 'Build and Test OnnxRuntime'
|
||||
|
||||
- task: PythonScript@0
|
||||
displayName: 'Generate cmake config'
|
||||
inputs:
|
||||
script: |
|
||||
$(Build.BinariesDirectory)\packages\python\python.exe $(Build.SourcesDirectory)\tools\ci_build\build.py --config $(buildConfig) --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --enable_onnx_tests --use_cuda --cuda_version=10.0 --cuda_home="C:\local\cuda_10.0.130_win10" --cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda"
|
||||
scriptPath: '$(Build.SourcesDirectory)\tools\ci_build\build.py'
|
||||
arguments: '--config RelWithDebInfo --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --update --cmake_generator "Visual Studio 16 2019" --use_openmp --build_shared_lib --enable_onnx_tests $(buildparameter)'
|
||||
workingDirectory: '$(Build.BinariesDirectory)'
|
||||
|
||||
|
||||
- task: VSBuild@1
|
||||
displayName: 'Build'
|
||||
inputs:
|
||||
solution: '$(Build.BinariesDirectory)\RelWithDebInfo\onnxruntime.sln'
|
||||
platform: $(msbuildPlatform)
|
||||
configuration: RelWithDebInfo
|
||||
msbuildArchitecture: $(buildArch)
|
||||
maximumCpuCount: true
|
||||
logProjectEvents: true
|
||||
workingFolder: '$(Build.BinariesDirectory)\RelWithDebInfo'
|
||||
createLogFile: true
|
||||
|
||||
- task: PythonScript@0
|
||||
displayName: 'test'
|
||||
inputs:
|
||||
scriptPath: '$(Build.SourcesDirectory)\tools\ci_build\build.py'
|
||||
arguments: '--config RelWithDebInfo --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --test --cmake_generator "Visual Studio 16 2019" --use_openmp --build_shared_lib --enable_onnx_tests $(buildparameter)'
|
||||
workingDirectory: '$(Build.BinariesDirectory)'
|
||||
|
||||
- template: templates/c-api-artifacts-package-and-publish-steps-windows.yml
|
||||
parameters:
|
||||
buildConfig: $(buildConfig)
|
||||
buildConfig: RelWithDebInfo
|
||||
artifactName: 'onnxruntime-win-$(buildArch)-gpu-$(OnnxRuntimeVersion)'
|
||||
commitId: $(OnnxRuntimeGitCommitHash)
|
||||
|
||||
- task: PowerShell@1
|
||||
displayName: 'Clean up CUDA props files'
|
||||
inputs:
|
||||
scriptName: 'tools/ci_build/github/windows/clean_up_cuda_prop_files.ps1'
|
||||
arguments: '-CudaVersion 10.0'
|
||||
|
||||
- template: templates/clean-agent-build-directory-step.yml
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
# Defined as pipeline variables
|
||||
# variables:
|
||||
# AgentPoolWin : 'Win-CPU'
|
||||
# AgentPoolLinux : 'Linux-CPU'
|
||||
# AgentPoolMacOS : 'macOS-10.13'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
# Defined as pipeline variables
|
||||
# variables:
|
||||
# AgentPoolWin : 'Win-CPU'
|
||||
# AgentPoolLinux : 'Linux-CPU'
|
||||
# AgentPoolMacOS : 'macOS-10.13'
|
||||
|
||||
|
|
@ -18,5 +17,5 @@ variables:
|
|||
jobs:
|
||||
- template: templates/cpu-mklml.yml
|
||||
parameters:
|
||||
AgentPool : $(AgentPoolWin)
|
||||
AgentPool : 'Win-CPU-2019'
|
||||
DoEsrp: 'true'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
# Defined as pipeline variables
|
||||
# variables:
|
||||
# AgentPoolWin : 'Win-CPU'
|
||||
# AgentPoolLinux : 'Linux-CPU'
|
||||
# AgentPoolMacOS : 'macOS-10.13'
|
||||
|
||||
|
|
@ -10,5 +9,5 @@ variables:
|
|||
jobs:
|
||||
- template: templates/cpu-mklml.yml
|
||||
parameters:
|
||||
AgentPool : $(AgentPoolWin)
|
||||
AgentPool : 'Win-CPU-2019'
|
||||
DoEsrp: 'false'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
# Defined as pipeline variables
|
||||
# variables:
|
||||
# AgentPoolWin : 'Win-CPU'
|
||||
# AgentPoolLinux : 'Linux-CPU'
|
||||
# AgentPoolMacOS : 'macOS-10.13'
|
||||
|
||||
|
|
@ -18,5 +17,5 @@ variables:
|
|||
jobs:
|
||||
- template: templates/cpu-nocontribops-arm64.yml
|
||||
parameters:
|
||||
AgentPool : $(AgentPoolWin)
|
||||
AgentPool : 'Win-CPU-2019'
|
||||
DoEsrp: 'true'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
# Defined as pipeline variables
|
||||
# variables:
|
||||
# AgentPoolWin : 'Win-CPU'
|
||||
# AgentPoolLinux : 'Linux-CPU'
|
||||
# AgentPoolMacOS : 'macOS-10.13'
|
||||
|
||||
|
|
@ -10,5 +9,5 @@ variables:
|
|||
jobs:
|
||||
- template: templates/cpu-nocontribops-arm64.yml
|
||||
parameters:
|
||||
AgentPool : $(AgentPoolWin)
|
||||
AgentPool : 'Win-CPU-2019'
|
||||
DoEsrp: 'false'
|
||||
|
|
|
|||
|
|
@ -19,5 +19,5 @@ variables:
|
|||
jobs:
|
||||
- template: templates/gpu.yml
|
||||
parameters:
|
||||
AgentPool : $(AgentPoolWin)
|
||||
AgentPool : 'Win-GPU-2019'
|
||||
DoEsrp: 'true'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
# Defined as pipeline variables
|
||||
# variables:
|
||||
# AgentPoolWin : 'Win-CPU-CUDA10'
|
||||
# AgentPoolLinux : 'Linux-CPU'
|
||||
# AgentPoolMacOS : 'macOS-10.13'
|
||||
|
||||
|
|
@ -11,5 +10,5 @@ variables:
|
|||
jobs:
|
||||
- template: templates/gpu.yml
|
||||
parameters:
|
||||
AgentPool : $(AgentPoolWin)
|
||||
AgentPool : 'Win-GPU-2019'
|
||||
DoEsrp: 'false'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
# Defined as pipeline variables
|
||||
# variables:
|
||||
# AgentPoolWin : 'Win-CPU'
|
||||
# AgentPoolLinux : 'Linux-CPU'
|
||||
# AgentPoolMacOS : 'macOS-10.13'
|
||||
|
||||
|
|
@ -13,6 +12,10 @@ jobs:
|
|||
AgentPool : 'Win-CPU-2019'
|
||||
JobName: 'Windows_CI_Dev'
|
||||
BuildCommand: '--build_dir $(Build.BinariesDirectory) --skip_submodule_sync --use_mklml --build_shared_lib --enable_onnx_tests --cmake_generator "Visual Studio 16 2019"'
|
||||
BuildArch: 'x64'
|
||||
msbuildArchitecture: 'amd64'
|
||||
EnvSetupScript: 'setup_env.bat'
|
||||
sln_platform: 'x64'
|
||||
DoDebugBuild: 'false'
|
||||
DoNugetPack : 'true'
|
||||
DoCompliance: 'false'
|
||||
|
|
|
|||
|
|
@ -1,21 +1,24 @@
|
|||
# Defined as pipeline variables
|
||||
# variables:
|
||||
# AgentPoolWin : 'Win-CPU'
|
||||
# AgentPoolLinux : 'Linux-CPU'
|
||||
# AgentPoolMacOS : 'macOS-10.13'
|
||||
|
||||
parameters:
|
||||
DoEsrp: 'false'
|
||||
|
||||
jobs:
|
||||
- template: ../../templates/win-ci.yml
|
||||
- template: ../../templates/win-ci-2019.yml
|
||||
parameters:
|
||||
AgentPool : $(AgentPoolWin)
|
||||
AgentPool : 'Win-CPU-2019'
|
||||
ArtifactName: 'drop-nuget'
|
||||
JobName: 'Windows_CI_Dev'
|
||||
BuildCommand: '$(Build.SourcesDirectory)\tools\ci_build\build.py --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --disable_contrib_ops --enable_msvc_static_runtime --build_shared_lib --build_csharp --enable_onnx_tests'
|
||||
BuildCommand: '--build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --enable_onnx_tests --use_telemetry --cmake_generator "Visual Studio 16 2019" --disable_contrib_ops --enable_msvc_static_runtime'
|
||||
BuildArch: 'x64'
|
||||
msbuildArchitecture: 'amd64'
|
||||
EnvSetupScript: 'setup_env.bat'
|
||||
sln_platform: 'x64'
|
||||
DoDebugBuild: 'false'
|
||||
DoNugetPack : 'true'
|
||||
DoCompliance: 'false'
|
||||
DoCompliance: ${{ parameters.DoCompliance }}
|
||||
DoEsrp: ${{ parameters.DoEsrp }}
|
||||
NuPackScript: |
|
||||
msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /t:CreatePackage
|
||||
|
|
@ -23,11 +26,16 @@ jobs:
|
|||
mkdir $(Build.ArtifactStagingDirectory)\testdata
|
||||
copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\custom_op_library.* $(Build.ArtifactStagingDirectory)\testdata
|
||||
|
||||
- template: ../../templates/win-x86-ci.yml
|
||||
- template: ../../templates/win-ci-2019.yml
|
||||
parameters:
|
||||
AgentPool : $(AgentPoolWin)
|
||||
AgentPool : 'Win-CPU-2019'
|
||||
ArtifactName: 'drop-win-x86-zip'
|
||||
JobName: 'Windows_CI_Dev_x86'
|
||||
BuildCommand: '$(Build.SourcesDirectory)\tools\ci_build\build.py --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --disable_contrib_ops --enable_msvc_static_runtime --build_shared_lib --build_csharp --enable_onnx_tests --x86'
|
||||
BuildCommand: '--build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --enable_onnx_tests --x86 --use_telemetry --cmake_generator "Visual Studio 16 2019" --disable_contrib_ops --enable_msvc_static_runtime'
|
||||
BuildArch: 'x86'
|
||||
msbuildArchitecture: 'x86'
|
||||
EnvSetupScript: 'setup_env_x86.bat'
|
||||
sln_platform: 'Win32'
|
||||
DoDebugBuild: 'false'
|
||||
DoNugetPack : 'true'
|
||||
DoCompliance: 'false'
|
||||
|
|
@ -42,7 +50,7 @@ jobs:
|
|||
|
||||
- template: ../../templates/win-ci-arm.yml
|
||||
parameters:
|
||||
AgentPool : $(AgentPoolWin)
|
||||
AgentPool : 'Win-CPU-2019'
|
||||
JobName: 'Windows_Arm64_Dev'
|
||||
BuildCommand: '$(Build.SourcesDirectory)\tools\ci_build\build.py --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --disable_contrib_ops --enable_msvc_static_runtime --build_shared_lib --arm64'
|
||||
DoDebugBuild: 'false'
|
||||
|
|
@ -76,7 +84,7 @@ jobs:
|
|||
- task: CmdLine@2
|
||||
inputs:
|
||||
script: |
|
||||
docker run --rm --volume $(Build.SourcesDirectory):/onnxruntime_src --volume $(Build.BinariesDirectory):/build -e NIGHTLY_BUILD onnxruntime-centos6 /bin/bash -c "/usr/bin/python3.6 /onnxruntime_src/tools/ci_build/build.py --build_dir /build --config Release --skip_submodule_sync --parallel --build_shared_lib --use_openmp --cmake_path /usr/bin/cmake --ctest_path /usr/bin/ctest --use_featurizers --enable_onnx_tests --disable_contrib_ops && cd /build/Release && make install DESTDIR=/build/linux-x64"
|
||||
docker run --rm --volume $(Build.SourcesDirectory):/onnxruntime_src --volume $(Build.BinariesDirectory):/build -e NIGHTLY_BUILD onnxruntime-centos6 /bin/bash -c "/usr/bin/python3.6 /onnxruntime_src/tools/ci_build/build.py --build_dir /build --config Release --skip_submodule_sync --parallel --build_shared_lib --cmake_path /usr/bin/cmake --ctest_path /usr/bin/ctest --use_featurizers --enable_onnx_tests --disable_contrib_ops && cd /build/Release && make install DESTDIR=/build/linux-x64"
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
- script: |
|
||||
set -e -x
|
||||
|
|
@ -102,7 +110,7 @@ jobs:
|
|||
parameters:
|
||||
AgentPool : $(AgentPoolMacOS)
|
||||
JobName: 'MacOS_CI_Dev'
|
||||
BuildCommand: 'python3 $(Build.SourcesDirectory)/tools/ci_build/build.py --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --parallel --build_shared_lib --disable_contrib_ops --use_openmp --enable_onnx_tests --config RelWithDebInfo'
|
||||
BuildCommand: 'python3 $(Build.SourcesDirectory)/tools/ci_build/build.py --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --parallel --build_shared_lib --disable_contrib_ops --enable_onnx_tests --config RelWithDebInfo'
|
||||
DoNugetPack : 'true'
|
||||
NuPackScript: |
|
||||
set -e -x
|
||||
|
|
@ -123,7 +131,7 @@ jobs:
|
|||
- job: NuGet_Packaging
|
||||
workspace:
|
||||
clean: all
|
||||
pool: $(AgentPoolWin)
|
||||
pool: 'Win-CPU-2019'
|
||||
dependsOn:
|
||||
- Windows_CI_Dev
|
||||
- Windows_CI_Dev_x86
|
||||
|
|
|
|||
|
|
@ -5,14 +5,20 @@
|
|||
|
||||
parameters:
|
||||
DoEsrp: 'false'
|
||||
PackageName: 'Microsoft.ML.OnnxRuntime'
|
||||
DoCompliance: 'false'
|
||||
|
||||
jobs:
|
||||
- template: ../../templates/win-ci-2019.yml
|
||||
parameters:
|
||||
AgentPool : 'Win-CPU-2019'
|
||||
ArtifactName: 'drop-nuget'
|
||||
JobName: 'Windows_CI_Dev'
|
||||
BuildCommand: '--build_dir $(Build.BinariesDirectory) --skip_submodule_sync --use_openmp --build_shared_lib --enable_onnx_tests --use_telemetry --cmake_generator "Visual Studio 16 2019"'
|
||||
BuildArch: 'x64'
|
||||
msbuildArchitecture: 'amd64'
|
||||
EnvSetupScript: 'setup_env.bat'
|
||||
sln_platform: 'x64'
|
||||
DoDebugBuild: 'false'
|
||||
DoNugetPack : 'true'
|
||||
DoCompliance: ${{ parameters.DoCompliance }}
|
||||
|
|
@ -23,11 +29,16 @@ jobs:
|
|||
mkdir $(Build.ArtifactStagingDirectory)\testdata
|
||||
copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\custom_op_library.* $(Build.ArtifactStagingDirectory)\testdata
|
||||
|
||||
- template: ../../templates/win-x86-ci-2019.yml
|
||||
- template: ../../templates/win-ci-2019.yml
|
||||
parameters:
|
||||
AgentPool : 'Win-CPU-2019'
|
||||
ArtifactName: 'drop-win-x86-zip'
|
||||
JobName: 'Windows_CI_Dev_x86'
|
||||
BuildCommand: '--build_dir $(Build.BinariesDirectory) --skip_submodule_sync --use_openmp --build_shared_lib --enable_onnx_tests --x86 --use_telemetry --cmake_generator "Visual Studio 16 2019"'
|
||||
BuildArch: 'x86'
|
||||
msbuildArchitecture: 'x86'
|
||||
EnvSetupScript: 'setup_env_x86.bat'
|
||||
sln_platform: 'Win32'
|
||||
DoDebugBuild: 'false'
|
||||
DoNugetPack : 'true'
|
||||
DoCompliance: 'false'
|
||||
|
|
@ -116,7 +127,6 @@ jobs:
|
|||
inputs:
|
||||
artifactName: 'drop-nuget'
|
||||
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
||||
continueOnError: true
|
||||
|
||||
|
||||
- task: DownloadPipelineArtifact@0
|
||||
|
|
@ -124,21 +134,18 @@ jobs:
|
|||
inputs:
|
||||
artifactName: 'drop-win-x86-zip'
|
||||
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadPipelineArtifact@0
|
||||
displayName: 'Download Pipeline Artifact - Linux'
|
||||
inputs:
|
||||
artifactName: 'drop-linux'
|
||||
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadPipelineArtifact@0
|
||||
displayName: 'Download Pipeline Artifact - MacOS'
|
||||
inputs:
|
||||
artifactName: 'drop-osx'
|
||||
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
||||
continueOnError: true
|
||||
|
||||
- template: bundle_dlls.yml
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
# Defined as pipeline variables
|
||||
# variables:
|
||||
# AgentPoolWin : 'Win-CPU-CUDA10'
|
||||
# AgentPoolLinux : 'Linux-CPU'
|
||||
# AgentPoolMacOS : 'macOS-10.13'
|
||||
|
||||
|
|
@ -9,19 +8,20 @@ parameters:
|
|||
PackageName: 'Microsoft.ML.OnnxRuntime.Gpu'
|
||||
|
||||
jobs:
|
||||
- template: ../../templates/win-ci.yml
|
||||
- template: ../../templates/win-ci-2019.yml
|
||||
parameters:
|
||||
AgentPool : $(AgentPoolWin)
|
||||
AgentPool : 'Win-GPU-2019'
|
||||
ArtifactName: 'drop-nuget'
|
||||
JobName: 'Windows_CI_GPU_Dev'
|
||||
BuildCommand: '$(Build.SourcesDirectory)\tools\ci_build\build.py --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_pybind --build_shared_lib --build_csharp --enable_onnx_tests --use_cuda --cuda_home="C:\local\cuda_10.0.130_win10" --cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda" --cuda_version 10.0'
|
||||
BuildCommand: --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --enable_onnx_tests --use_telemetry --cmake_generator "Visual Studio 16 2019" --msvc_toolset 14.16 --use_cuda --cuda_version=10.0 --cuda_home="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0" --cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda"
|
||||
BuildArch: 'x64'
|
||||
msbuildArchitecture: 'amd64'
|
||||
EnvSetupScript: 'setup_env.bat'
|
||||
sln_platform: 'x64'
|
||||
DoDebugBuild: 'false'
|
||||
DoNugetPack : 'true'
|
||||
DoCompliance: 'false'
|
||||
DoEsrp: ${{ parameters.DoEsrp }}
|
||||
BuildArch: 'amd64'
|
||||
SetVcvars: 'true'
|
||||
MsbuildArguments: '/m /p:CudaToolkitDir=C:\local\cuda_10.0.130_win10\'
|
||||
EnvSetupScript: 'setup_env_cuda.bat'
|
||||
DoEsrp: ${{ parameters.DoEsrp }}
|
||||
CudaVersion: '10.0'
|
||||
OrtPackageId: 'Microsoft.ML.OnnxRuntime.Gpu'
|
||||
NuPackScript: |
|
||||
|
|
@ -65,7 +65,7 @@ jobs:
|
|||
- template: ../../templates/clean-agent-build-directory-step.yml
|
||||
|
||||
- job: NuGet_Packaging
|
||||
pool: $(AgentPoolWin)
|
||||
pool: 'Win-GPU-2019'
|
||||
dependsOn:
|
||||
- Windows_CI_GPU_Dev
|
||||
- Linux_CI_GPU_Dev
|
||||
|
|
@ -76,14 +76,12 @@ jobs:
|
|||
inputs:
|
||||
artifactName: 'drop-nuget'
|
||||
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadPipelineArtifact@0
|
||||
displayName: 'Download Pipeline Artifact - Linux'
|
||||
inputs:
|
||||
artifactName: 'drop-linux'
|
||||
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
||||
continueOnError: true
|
||||
|
||||
- script: |
|
||||
pushd $(Build.BinariesDirectory)\nuget-artifact
|
||||
|
|
@ -122,7 +120,7 @@ jobs:
|
|||
|
||||
- template: test_win.yml
|
||||
parameters:
|
||||
AgentPool : $(AgentPoolWin)
|
||||
AgentPool : 'Win-GPU-2019'
|
||||
- template: test_linux.yml
|
||||
parameters:
|
||||
AgentPool : $(AgentPoolLinux)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
jobs:
|
||||
- template: test_win.yml
|
||||
parameters:
|
||||
AgentPool : $(AgentPoolWin)
|
||||
AgentPool : 'Win-CPU-2019'
|
||||
- template: test_linux.yml
|
||||
parameters:
|
||||
AgentPool : $(AgentPoolLinux)
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@ jobs:
|
|||
- template: win-download-test-data.yml
|
||||
|
||||
- task: BatchScript@1
|
||||
displayName: 'Setup VS2017 env vars'
|
||||
displayName: 'Setup VS2019 env vars'
|
||||
inputs:
|
||||
filename: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat'
|
||||
filename: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat'
|
||||
arguments: 'amd64'
|
||||
modifyEnvironment: true
|
||||
|
||||
|
|
|
|||
|
|
@ -1,35 +1,72 @@
|
|||
# Jobs to run on master after every successful merge is committed
|
||||
jobs:
|
||||
- job: Windows_Debug_CPU_x64
|
||||
pool: 'Win-CPU'
|
||||
pool: 'Win-CPU-2019'
|
||||
timeoutInMinutes: 120
|
||||
variables:
|
||||
- group: dashboard_mysql_secret
|
||||
- name: buildDirectory
|
||||
value: '$(Build.BinariesDirectory)'
|
||||
- name: buildConfig
|
||||
- name: BuildConfig
|
||||
value: 'Debug'
|
||||
- name: buildArch
|
||||
value: 'x64'
|
||||
- name: EnvSetupScript
|
||||
value: 'setup_env.bat'
|
||||
|
||||
steps:
|
||||
- template: templates/set-test-data-variables-step.yml
|
||||
- template: templates/set-version-number-variables-step.yml
|
||||
|
||||
- template: templates/windows-build-tools-setup-steps.yml
|
||||
parameters:
|
||||
EnvSetupScript: 'setup_env.bat'
|
||||
buildArch: 'amd64' # amd64 is needed for vcvars target arch
|
||||
setVcvars: false
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '3.7'
|
||||
addToPath: true
|
||||
architecture: $(buildArch)
|
||||
|
||||
- template: templates/windows-build-and-test-steps.yml
|
||||
parameters:
|
||||
buildAdditionalParams: ' --use_openmp '
|
||||
# --use_openmp is added, similar to the build config of the C-api package distribution.
|
||||
# MLAS(default) with OpenMP is known to produce better performance (latency) than without OpenMP.
|
||||
buildArch: $(buildArch)
|
||||
msbuildPlatform: $(buildArch)
|
||||
buildConfig: $(buildConfig)
|
||||
- task: BatchScript@1
|
||||
displayName: 'setup env'
|
||||
inputs:
|
||||
filename: '$(Build.SourcesDirectory)\tools\ci_build\github\windows\$(EnvSetupScript)'
|
||||
modifyEnvironment: true
|
||||
workingFolder: '$(Build.BinariesDirectory)'
|
||||
|
||||
- task: PythonScript@0
|
||||
displayName: 'Download test data'
|
||||
inputs:
|
||||
scriptPath: '$(Build.SourcesDirectory)\tools\ci_build\github\download_test_data.py'
|
||||
arguments: --test_data_url $(TestDataUrl) --build_dir $(Build.BinariesDirectory)
|
||||
workingDirectory: $(Build.BinariesDirectory)
|
||||
|
||||
|
||||
- powershell: 'Start-Process -FilePath "$(Build.BinariesDirectory)\installer\opencppcoverage\installer.exe" -ArgumentList ''/SP-'', ''/VERYSILENT'', ''/SUPPRESSMSGBOXES'', ''/NORESTART'', ''/DIR="$(Build.BinariesDirectory)\OpenCppCoverage'' -NoNewWindow -Wait'
|
||||
displayName: 'Run OpenCPPCoverage installer'
|
||||
|
||||
- task: PythonScript@0
|
||||
displayName: 'Generate cmake config'
|
||||
inputs:
|
||||
scriptPath: '$(Build.SourcesDirectory)\tools\ci_build\build.py'
|
||||
arguments: '--config $(BuildConfig) --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --update --cmake_generator "Visual Studio 16 2019" --use_openmp --build_shared_lib --enable_onnx_tests'
|
||||
workingDirectory: '$(Build.BinariesDirectory)'
|
||||
|
||||
- task: VSBuild@1
|
||||
displayName: 'Build'
|
||||
inputs:
|
||||
solution: '$(Build.BinariesDirectory)\$(BuildConfig)\onnxruntime.sln'
|
||||
platform: 'x64'
|
||||
configuration: $(BuildConfig)
|
||||
msbuildArchitecture: $(buildArch)
|
||||
maximumCpuCount: true
|
||||
logProjectEvents: false
|
||||
workingFolder: '$(Build.BinariesDirectory)\$(BuildConfig)'
|
||||
createLogFile: true
|
||||
|
||||
- task: PythonScript@0
|
||||
displayName: 'test'
|
||||
inputs:
|
||||
scriptPath: '$(Build.SourcesDirectory)\tools\ci_build\build.py'
|
||||
arguments: '--config $(BuildConfig) --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --test --cmake_generator "Visual Studio 16 2019" --use_openmp --build_shared_lib --enable_onnx_tests'
|
||||
workingDirectory: '$(Build.BinariesDirectory)'
|
||||
|
||||
- template: templates/windows-code-coverage-steps.yml
|
||||
parameters:
|
||||
|
|
@ -38,5 +75,3 @@ jobs:
|
|||
PublishReport: true
|
||||
PostToDashboard: true
|
||||
|
||||
- template: templates/clean-agent-build-directory-step.yml
|
||||
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@ parameters:
|
|||
ArtifactName: 'drop-nuget'
|
||||
DoEsrp: 'false'
|
||||
DoTestCoverage: 'false'
|
||||
BuildArch: 'x64'
|
||||
SetVcvars: 'false'
|
||||
msbuildArchitecture: 'amd64'
|
||||
BuildArch: 'x64' # Optional. Options: x86, x64
|
||||
msbuildArchitecture: 'amd64' # Options: x86, amd64
|
||||
sln_platform: 'x64' # Options: Win32, x64
|
||||
EnvSetupScript: 'setup_env.bat'
|
||||
CudaVersion: ''
|
||||
AgentPool: 'Win-CPU'
|
||||
AgentPool: 'Win-CPU-2019'
|
||||
AgentDemands: []
|
||||
OrtPackageId: Microsoft.ML.OnnxRuntime
|
||||
jobs:
|
||||
|
|
@ -30,6 +30,9 @@ jobs:
|
|||
OnnxRuntimeBuildDirectory: '$(Build.BinariesDirectory)'
|
||||
DotNetExe: 'dotnet.exe'
|
||||
CUDA_VERSION: ${{ parameters.CudaVersion }}
|
||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
||||
PlatformTarget: ${{ parameters.BuildArch }}
|
||||
RuntimeIdentifier: win-${{ parameters.BuildArch }}
|
||||
|
||||
steps:
|
||||
- powershell: |
|
||||
|
|
@ -38,9 +41,12 @@ jobs:
|
|||
$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
|
||||
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: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '3.7'
|
||||
|
|
@ -71,7 +77,7 @@ jobs:
|
|||
displayName: 'Build'
|
||||
inputs:
|
||||
solution: '$(Build.BinariesDirectory)\RelWithDebInfo\onnxruntime.sln'
|
||||
platform: 'x64'
|
||||
platform: ${{ parameters.sln_platform }}
|
||||
configuration: RelWithDebInfo
|
||||
msbuildArchitecture: ${{ parameters.BuildArch }}
|
||||
maximumCpuCount: true
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ parameters:
|
|||
MsbuildArguments: '/m'
|
||||
EnvSetupScript: 'setup_env.bat'
|
||||
CudaVersion: ''
|
||||
AgentPool: 'Win-CPU'
|
||||
AgentPool: 'Win-CPU-2019'
|
||||
AgentDemands: []
|
||||
OrtPackageId: Microsoft.ML.OnnxRuntime
|
||||
jobs:
|
||||
|
|
|
|||
|
|
@ -1,190 +0,0 @@
|
|||
parameters:
|
||||
DoDebugBuild: 'true'
|
||||
DoCompliance: 'false'
|
||||
BuildCommand: ''
|
||||
JobName: 'Windows_CI_Dev_x86'
|
||||
DoNugetPack: 'false'
|
||||
NuPackScript : ''
|
||||
ArtifactName: 'drop-win-x86-zip'
|
||||
DoEsrp: 'false'
|
||||
DoTestCoverage: 'false'
|
||||
BuildArch: 'x86'
|
||||
SetVcvars: 'false'
|
||||
msbuildArchitecture: 'x86'
|
||||
EnvSetupScript: 'setup_env_x86.bat'
|
||||
CudaVersion: ''
|
||||
AgentPool: 'Win-CPU'
|
||||
AgentDemands: []
|
||||
OrtPackageId: Microsoft.ML.OnnxRuntime
|
||||
jobs:
|
||||
- job: ${{ parameters.JobName }}
|
||||
timeoutInMinutes: 120
|
||||
workspace:
|
||||
clean: all
|
||||
pool:
|
||||
name: ${{ parameters.AgentPool }}
|
||||
demands: ${{ parameters.AgentDemands }}
|
||||
variables:
|
||||
buildDirectory: '$(Build.BinariesDirectory)'
|
||||
BuildCommand: ${{ parameters.BuildCommand }}
|
||||
OnnxRuntimeBuildDirectory: '$(Build.BinariesDirectory)'
|
||||
DotNetExe: 'dotnet.exe'
|
||||
CUDA_VERSION: ${{ parameters.CudaVersion }}
|
||||
PlatformTarget: x86
|
||||
RuntimeIdentifier: win-x86
|
||||
|
||||
steps:
|
||||
- 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
|
||||
}
|
||||
displayName: 'Create TraceLoggingConfigPrivate.h For WinML Telemetry'
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '3.7'
|
||||
addToPath: true
|
||||
architecture: ${{ parameters.BuildArch }}
|
||||
|
||||
- task: BatchScript@1
|
||||
displayName: 'setup env'
|
||||
inputs:
|
||||
filename: '$(Build.SourcesDirectory)\tools\ci_build\github\windows\${{ parameters.EnvSetupScript }}'
|
||||
modifyEnvironment: true
|
||||
workingFolder: '$(Build.BinariesDirectory)'
|
||||
|
||||
- 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: 'Win32'
|
||||
configuration: RelWithDebInfo
|
||||
msbuildArchitecture: ${{ parameters.BuildArch }}
|
||||
maximumCpuCount: true
|
||||
logProjectEvents: true
|
||||
workingFolder: '$(Build.BinariesDirectory)\RelWithDebInfo'
|
||||
createLogFile: true
|
||||
clean: true
|
||||
|
||||
# Build RelWithDebInfo -- this variable required to build C#
|
||||
- script: |
|
||||
@echo ##vso[task.setvariable variable=Configuration]RelWithDebInfo
|
||||
|
||||
- template: set-test-data-variables-step.yml
|
||||
|
||||
- task: NuGetToolInstaller@0
|
||||
displayName: Use Nuget 4.9
|
||||
inputs:
|
||||
versionSpec: 4.9.4
|
||||
|
||||
- task: PythonScript@0
|
||||
displayName: 'Download test data'
|
||||
inputs:
|
||||
scriptPath: '$(Build.SourcesDirectory)\tools\ci_build\github\download_test_data.py'
|
||||
arguments: --test_data_url $(TestDataUrl) --build_dir $(Build.BinariesDirectory)
|
||||
workingDirectory: $(Build.BinariesDirectory)
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'Restore nuget packages'
|
||||
inputs:
|
||||
command: restore
|
||||
projects: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
|
||||
configuration: 'RelWithDebInfo'
|
||||
arguments: '--configuration RelWithDebInfo -p:Platform="Any CPU" -p:OrtPackageId=${{ parameters.OrtPackageId }}'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'Build C#'
|
||||
inputs:
|
||||
command: build
|
||||
projects: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
|
||||
configuration: 'RelWithDebInfo'
|
||||
arguments: '--configuration RelWithDebInfo -p:Platform="Any CPU" -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=${{ parameters.OrtPackageId }}'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'Test C#'
|
||||
inputs:
|
||||
command: test
|
||||
projects: '$(Build.SourcesDirectory)\csharp\test\Microsoft.ML.OnnxRuntime.Tests\Microsoft.ML.OnnxRuntime.Tests.csproj'
|
||||
configuration: 'RelWithDebInfo'
|
||||
arguments: '--configuration RelWithDebInfo -p:Platform="Any CPU" -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=${{ parameters.OrtPackageId }}'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- script: |
|
||||
mklink /D /J $(Build.BinariesDirectory)\RelWithDebInfo\models $(Build.BinariesDirectory)\models
|
||||
DIR dist\ /S /B > wheel_filename_file
|
||||
set /p WHEEL_FILENAME=<wheel_filename_file
|
||||
del wheel_filename_file
|
||||
python.exe -m pip install -q --upgrade %WHEEL_FILENAME%
|
||||
set PATH=%PATH%;$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo
|
||||
@echo %PATH%
|
||||
python $(Build.SourcesDirectory)\tools\ci_build\build.py $(BuildCommand) --test --config RelWithDebInfo
|
||||
workingDirectory: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo'
|
||||
displayName: 'Run tests'
|
||||
|
||||
- task: PublishTestResults@2
|
||||
displayName: 'Publish unit test results'
|
||||
inputs:
|
||||
testResultsFiles: '**\*.results.xml'
|
||||
searchFolder: '$(Build.BinariesDirectory)'
|
||||
testRunTitle: 'Unit Test Run'
|
||||
condition: succeededOrFailed()
|
||||
|
||||
# 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\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat'
|
||||
arguments: ${{ parameters.msbuildArchitecture }}
|
||||
modifyEnvironment: true
|
||||
# Esrp signing
|
||||
- template: esrp_dll.yml
|
||||
parameters:
|
||||
FolderPath: '$(Build.BinariesDirectory)\RelWithDebInfo'
|
||||
DisplayName: 'ESRP - Sign Native dlls'
|
||||
DoEsrp: ${{ parameters.DoEsrp }}
|
||||
|
||||
- template: esrp_dll.yml
|
||||
parameters:
|
||||
FolderPath: '$(Build.SourcesDirectory)\csharp\src\Microsoft.ML.OnnxRuntime\bin\RelWithDebInfo'
|
||||
DisplayName: 'ESRP - Sign C# 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)'
|
||||
|
||||
# Compliance tasks require logs from Debug Build
|
||||
- ${{ if eq(parameters['DoCompliance'], 'true') }}:
|
||||
- template: compliance.yml
|
||||
|
||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
||||
displayName: 'Component Detection'
|
||||
condition: succeeded()
|
||||
|
||||
- template: clean-agent-build-directory-step.yml
|
||||
|
|
@ -1,205 +0,0 @@
|
|||
parameters:
|
||||
DoDebugBuild: 'true'
|
||||
DoCompliance: 'false'
|
||||
BuildCommand: ''
|
||||
JobName: 'Windows_CI_Dev_x86'
|
||||
DoNugetPack: 'false'
|
||||
NuPackScript : ''
|
||||
ArtifactName: 'drop-win-x86-zip'
|
||||
DoEsrp: 'false'
|
||||
DoTestCoverage: 'false'
|
||||
BuildArch: 'x86'
|
||||
SetVcvars: 'false'
|
||||
msbuildArchitecture: 'x86'
|
||||
MsbuildArguments: '/m'
|
||||
EnvSetupScript: 'setup_env_x86.bat'
|
||||
CudaVersion: ''
|
||||
AgentPool: 'Win-CPU'
|
||||
AgentDemands: []
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.JobName }}
|
||||
workspace:
|
||||
clean: all
|
||||
timeoutInMinutes: 120
|
||||
pool:
|
||||
name: ${{ parameters.AgentPool }}
|
||||
demands: ${{ parameters.AgentDemands }}
|
||||
variables:
|
||||
buildDirectory: '$(Build.BinariesDirectory)'
|
||||
BuildCommand: ${{ parameters.BuildCommand }}
|
||||
OnnxRuntimeBuildDirectory: '$(Build.BinariesDirectory)'
|
||||
PlatformTarget: x86
|
||||
RuntimeIdentifier: win-x86
|
||||
|
||||
steps:
|
||||
- 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
|
||||
}
|
||||
displayName: 'Create TraceLoggingConfigPrivate.h For WinML Telemetry'
|
||||
- template: set-test-data-variables-step.yml
|
||||
- template: windows-build-tools-setup-steps.yml
|
||||
parameters:
|
||||
EnvSetupScript: ${{ parameters.EnvSetupScript }}
|
||||
buildArch: ${{ parameters.msbuildArchitecture }}
|
||||
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: DotNetCoreCLI@2
|
||||
displayName: 'Restore nuget packages for debug build'
|
||||
inputs:
|
||||
command: restore
|
||||
projects: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
|
||||
configuration: 'Debug'
|
||||
arguments: '--configuration Debug -p:Platform="Any CPU" -p:OrtPackageId=${{ parameters.OrtPackageId}}'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
- task: VSBuild@1
|
||||
displayName: 'Build Debug'
|
||||
inputs:
|
||||
solution: '$(Build.BinariesDirectory)\Debug\onnxruntime.sln'
|
||||
platform: 'Win32'
|
||||
configuration: 'Debug'
|
||||
msbuildArgs: ${{ parameters.MsbuildArguments }}
|
||||
msbuildArchitecture: $(BuildArch)
|
||||
maximumCpuCount: true
|
||||
logProjectEvents: true
|
||||
workingFolder: '$(Build.BinariesDirectory)\Debug'
|
||||
createLogFile: true
|
||||
|
||||
- task: BatchScript@1
|
||||
displayName: 'Test Debug'
|
||||
inputs:
|
||||
filename: '$(Build.BinariesDirectory)\packages\python\python.exe'
|
||||
arguments: '$(BuildCommand) --test --config Debug'
|
||||
workingFolder: '$(Build.BinariesDirectory)'
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'Build C# Debug'
|
||||
inputs:
|
||||
command: build
|
||||
projects: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
|
||||
configuration: 'Debug'
|
||||
arguments: '--configuration Debug -p:Platform="Any CPU" -p:OrtPackageId=${{ parameters.OrtPackageId}}'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
|
||||
# Run test coverage report
|
||||
- ${{ if eq(parameters['DoTestCoverage'], 'true') }}:
|
||||
- template: windows-code-coverage-steps.yml
|
||||
parameters:
|
||||
OpenCppCoverageExe: '$(Build.BinariesDirectory)\OpenCppCoverage\OpenCppCoverage.exe'
|
||||
|
||||
# Build RelWithDebInfo -- this variable required to build C#
|
||||
- script: |
|
||||
@echo ##vso[task.setvariable variable=Configuration]RelWithDebInfo
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'Restore nuget packages for RelWithDebInfo build'
|
||||
inputs:
|
||||
command: restore
|
||||
projects: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
|
||||
configuration: 'RelWithDebInfo'
|
||||
arguments: '--configuration RelWithDebInfo -p:Platform="Any CPU" -p:OrtPackageId=${{ parameters.OrtPackageId}}'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: VSBuild@1
|
||||
displayName: 'Build RelWithDebInfo'
|
||||
inputs:
|
||||
solution: '$(Build.BinariesDirectory)\RelWithDebInfo\onnxruntime.sln'
|
||||
platform: 'Win32'
|
||||
configuration: 'RelWithDebInfo'
|
||||
msbuildArgs: ${{ parameters.MsbuildArguments }}
|
||||
msbuildArchitecture: $(BuildArch)
|
||||
maximumCpuCount: true
|
||||
logProjectEvents: true
|
||||
workingFolder: '$(Build.BinariesDirectory)\RelWithDebInfo'
|
||||
createLogFile: true
|
||||
|
||||
- task: BatchScript@1
|
||||
displayName: 'Test RelWithDebInfo'
|
||||
inputs:
|
||||
filename: '$(Build.BinariesDirectory)\packages\python\python.exe'
|
||||
arguments: '$(BuildCommand) --test --config RelWithDebInfo'
|
||||
workingFolder: "$(Build.BinariesDirectory)"
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'Build C# RelWithDebInfo'
|
||||
inputs:
|
||||
command: build
|
||||
projects: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
|
||||
configuration: 'RelWithDebInfo'
|
||||
arguments: '--configuration RelWithDebInfo -p:Platform="Any CPU" -p:OrtPackageId=${{ parameters.OrtPackageId}}'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'Test C# RelWithDebInfo'
|
||||
inputs:
|
||||
command: test
|
||||
projects: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
|
||||
configuration: 'RelWithDebInfo'
|
||||
arguments: '--configuration RelWithDebInfo -p:Platform="Any CPU" -p:OrtPackageId=${{ parameters.OrtPackageId}}'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: PublishTestResults@2
|
||||
displayName: 'Publish unit test results'
|
||||
inputs:
|
||||
testResultsFiles: '**\*.results.xml'
|
||||
searchFolder: '$(Build.BinariesDirectory)'
|
||||
testRunTitle: 'Unit Test Run'
|
||||
condition: succeededOrFailed()
|
||||
|
||||
# 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: ${{ parameters.msbuildArchitecture }}
|
||||
modifyEnvironment: true
|
||||
# Esrp signing
|
||||
- template: esrp_dll.yml
|
||||
parameters:
|
||||
FolderPath: '$(Build.BinariesDirectory)\RelWithDebInfo'
|
||||
DisplayName: 'ESRP - Sign Native dlls'
|
||||
DoEsrp: ${{ parameters.DoEsrp }}
|
||||
|
||||
- template: esrp_dll.yml
|
||||
parameters:
|
||||
FolderPath: '$(Build.SourcesDirectory)\csharp\src\Microsoft.ML.OnnxRuntime\bin\RelWithDebInfo'
|
||||
DisplayName: 'ESRP - Sign C# 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)'
|
||||
|
||||
# Compliance tasks require logs from Debug Build
|
||||
- ${{ if eq(parameters['DoCompliance'], 'true') }}:
|
||||
- template: compliance.yml
|
||||
|
||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
||||
displayName: 'Component Detection'
|
||||
condition: succeeded()
|
||||
|
||||
- template: clean-agent-build-directory-step.yml
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ steps:
|
|||
displayName: 'Run Test Coverage'
|
||||
inputs:
|
||||
filePath: '$(Build.SourcesDirectory)\tools\ci_build\github\windows\run_OpenCppCoverage.ps1'
|
||||
arguments: '-OpenCppCoverageExe:"${{parameters.OpenCppCoverageExe}}" -SourceRoot:"$(Build.SourcesDirectory)" -BuildRoot:"$(Build.BinariesDirectory)" -LocalBuild:$false'
|
||||
arguments: '-OpenCppCoverageExe:"${{parameters.OpenCppCoverageExe}}" -SourceRoot:"$(Build.SourcesDirectory)" -BuildRoot:"$(Build.BinariesDirectory)" -LocalBuild:$true'
|
||||
continueOnError: ${{parameters.ContinueOnError}}
|
||||
|
||||
- task: PublishCodeCoverageResults@1
|
||||
|
|
@ -30,11 +30,11 @@ steps:
|
|||
arguments: 'install -q --insecure -y mysql-connector-python'
|
||||
timeoutInMinutes: 10
|
||||
|
||||
- task: BatchScript@1
|
||||
displayName: 'Post code coverage data to the Dashboard'
|
||||
- task: PythonScript@0
|
||||
displayName: 'Generate cmake config'
|
||||
inputs:
|
||||
filename: '$(Build.BinariesDirectory)\packages\python\python.exe'
|
||||
arguments: '$(Build.SourcesDirectory)\tools\ci_build\github\windows\post_code_coverage_to_dashboard.py --commit_hash=${{parameters.GitCommitHash}} --report_file="$(Build.BinariesDirectory)/Debug/Debug/cobertura.xml" --report_url="https://dev.azure.com/onnxruntime/onnxruntime/_build/results?buildId=$(Build.BuildId)"'
|
||||
scriptPath: '$(Build.SourcesDirectory)\tools\ci_build\github\windows\post_code_coverage_to_dashboard.py'
|
||||
arguments: --commit_hash=${{parameters.GitCommitHash}} --report_file="$(Build.BinariesDirectory)/Debug/Debug/cobertura.xml" --report_url="https://dev.azure.com/onnxruntime/onnxruntime/_build/results?buildId=$(Build.BuildId)"
|
||||
workingFolder: "$(Build.BinariesDirectory)"
|
||||
continueOnError: ${{parameters.ContinueOnError}}
|
||||
condition: ${{parameters.PostToDashBoard}}
|
||||
|
|
|
|||
|
|
@ -56,21 +56,21 @@ $outputDir = Join-Path $buildDir "OpenCppCoverageResults"
|
|||
$modelDir = Join-Path $BuildRoot "models"
|
||||
|
||||
|
||||
# ONNX test runner tests.
|
||||
Write-Host "ONNX test runner tests"
|
||||
$onnx_test_runner = Join-Path $buildDir "onnx_test_runner.exe"
|
||||
RunTest $onnx_test_runner ($modelDir) ("binary:" + (Join-Path $buildDir "onnx_test_runner.cov"))
|
||||
|
||||
|
||||
# C-API/Shared-lib test
|
||||
Write-Host "C-API/Shared-lib test"
|
||||
$shared_lib_test = Join-Path $buildDir "onnxruntime_shared_lib_test.exe"
|
||||
RunTest $shared_lib_test @() ("binary:" + (Join-Path $buildDir "onnxruntime_shared_lib_test.cov"))
|
||||
|
||||
|
||||
# MLAS test
|
||||
Write-Host "MLAS test"
|
||||
$mlas_test = Join-Path $buildDir "onnxruntime_mlas_test.exe"
|
||||
RunTest $mlas_test @() ("binary:" + (Join-Path $buildDir "onnxruntime_mlas_test.cov"))
|
||||
|
||||
# Lotus unit tests
|
||||
Write-Host "Lotus unit tests"
|
||||
# need to copy the tvm.dll, since it is not in the buildDir path
|
||||
if (Test-Path -Path $BuildRoot\Debug\external\tvm\Debug\tvm.dll -PathType Leaf) {
|
||||
Copy-Item -Path $BuildRoot\Debug\external\tvm\Debug\tvm.dll -Destination $buildDir
|
||||
|
|
|
|||
Loading…
Reference in a new issue