diff --git a/tools/ci_build/github/azure-pipelines/c-api-noopenmp-packaging-pipelines.yml b/tools/ci_build/github/azure-pipelines/c-api-noopenmp-packaging-pipelines.yml index 0967e6ed0f570..edd1af239be99 100644 --- a/tools/ci_build/github/azure-pipelines/c-api-noopenmp-packaging-pipelines.yml +++ b/tools/ci_build/github/azure-pipelines/c-api-noopenmp-packaging-pipelines.yml @@ -4,7 +4,7 @@ parameters: type: boolean default: true -- name: UseIncreasedTimeoutForTests +- name: UseIncreasedTimeoutForTests displayName: Increase timeout for tests? Set it to false if you are doing an Onnx Runtime release. type: boolean default: false @@ -671,6 +671,7 @@ jobs: - template: nuget/templates/dml-vs-2019.yml parameters: AgentPool : 'aiinfra-dml-winbuild' + IsReleaseBuild: ${{ parameters.IsReleaseBuild }} ArtifactName: 'drop-nuget-dml' JobName: 'Windows_CI_GPU_DML_Dev' BuildCommand: --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --enable_onnx_tests --enable_wcos --use_telemetry --use_dml --use_winml --cmake_generator "Visual Studio 16 2019" @@ -685,7 +686,7 @@ jobs: CudaVersion: '11.6' OrtPackageId: 'Microsoft.ML.OnnxRuntime.DirectML' NuPackScript: | - msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /t:CreatePackage /p:OrtPackageId=Microsoft.ML.OnnxRuntime.DirectML + msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /t:CreatePackage /p:OrtPackageId=Microsoft.ML.OnnxRuntime.DirectML /p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} copy $(Build.SourcesDirectory)\csharp\src\Microsoft.ML.OnnxRuntime\bin\RelWithDebInfo\*.nupkg $(Build.ArtifactStagingDirectory) copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\*.nupkg $(Build.ArtifactStagingDirectory) mkdir $(Build.ArtifactStagingDirectory)\testdata @@ -694,6 +695,7 @@ jobs: - template: nuget/templates/dml-vs-2019.yml parameters: AgentPool : 'aiinfra-dml-winbuild' + IsReleaseBuild: ${{ parameters.IsReleaseBuild }} ArtifactName: 'drop-win-dml-x86-zip' JobName: 'Windows_CI_GPU_DML_Dev_x86' BuildCommand: --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --enable_onnx_tests --enable_wcos --use_telemetry --use_dml --use_winml --cmake_generator "Visual Studio 16 2019" @@ -706,7 +708,7 @@ jobs: DoEsrp: ${{ parameters.DoEsrp }} RunTests: 'false' NuPackScript: | - msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /p:TargetArchitecture=x86 /t:CreatePackage /p:OrtPackageId=Microsoft.ML.OnnxRuntime.DirectML + msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /p:TargetArchitecture=x86 /t:CreatePackage /p:OrtPackageId=Microsoft.ML.OnnxRuntime.DirectML /p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} cd $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\ ren Microsoft.ML.OnnxRuntime.DirectML.* win-dml-x86.zip copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\win-dml-x86.zip $(Build.ArtifactStagingDirectory) @@ -716,6 +718,7 @@ jobs: - template: nuget/templates/dml-vs-2019.yml parameters: AgentPool : 'Win-CPU-2021' + IsReleaseBuild: ${{ parameters.IsReleaseBuild }} ArtifactName: 'drop-win-dml-arm64-zip' JobName: 'Windows_CI_GPU_DML_Dev_arm64' BuildCommand: --build_dir $(Build.BinariesDirectory) --arm64 --skip_submodule_sync --build_shared_lib --enable_onnx_tests --enable_wcos --use_telemetry --use_dml --use_winml --cmake_generator "Visual Studio 16 2019" @@ -728,7 +731,7 @@ jobs: DoEsrp: ${{ parameters.DoEsrp }} RunTests: 'false' NuPackScript: | - msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /p:TargetArchitecture=arm64 /t:CreatePackage /p:OrtPackageId=Microsoft.ML.OnnxRuntime.DirectML + msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /p:TargetArchitecture=arm64 /t:CreatePackage /p:OrtPackageId=Microsoft.ML.OnnxRuntime.DirectML /p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} cd $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\ ren Microsoft.ML.OnnxRuntime.DirectML.* win-dml-arm64.zip copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\win-dml-arm64.zip $(Build.ArtifactStagingDirectory) @@ -738,6 +741,7 @@ jobs: - template: nuget/templates/dml-vs-2019.yml parameters: AgentPool : 'Win-CPU-2021' + IsReleaseBuild: ${{ parameters.IsReleaseBuild }} ArtifactName: 'drop-win-dml-arm-zip' JobName: 'Windows_CI_GPU_DML_Dev_arm' BuildCommand: --build_dir $(Build.BinariesDirectory) --arm --skip_submodule_sync --build_shared_lib --enable_onnx_tests --enable_wcos --use_telemetry --use_dml --use_winml --cmake_generator "Visual Studio 16 2019" @@ -750,7 +754,7 @@ jobs: DoEsrp: ${{ parameters.DoEsrp }} RunTests: 'false' NuPackScript: | - msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /p:TargetArchitecture=arm /t:CreatePackage /p:OrtPackageId=Microsoft.ML.OnnxRuntime.DirectML + msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /p:TargetArchitecture=arm /t:CreatePackage /p:OrtPackageId=Microsoft.ML.OnnxRuntime.DirectML /p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} cd $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\ ren Microsoft.ML.OnnxRuntime.DirectML.* win-dml-arm.zip copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\win-dml-arm.zip $(Build.ArtifactStagingDirectory) diff --git a/tools/ci_build/github/azure-pipelines/nuget/templates/dml-vs-2019.yml b/tools/ci_build/github/azure-pipelines/nuget/templates/dml-vs-2019.yml index 2b722791ff2b9..bf1a3e96f1aa1 100644 --- a/tools/ci_build/github/azure-pipelines/nuget/templates/dml-vs-2019.yml +++ b/tools/ci_build/github/azure-pipelines/nuget/templates/dml-vs-2019.yml @@ -21,6 +21,7 @@ parameters: EnableLto: true # Controls whether unreleased onnx opsets are allowed. Default is set to 1 AllowReleasedOpsetOnly: '0' + IsReleaseBuild: false jobs: - job: ${{ parameters.JobName }} timeoutInMinutes: 200 @@ -140,7 +141,7 @@ jobs: solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln' configuration: '$(BuildConfig)' platform: 'Any CPU' - msbuildArguments: '-p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=${{ parameters.OrtPackageId }}' + msbuildArguments: '-p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=${{ parameters.OrtPackageId }} -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}' workingDirectory: '$(Build.SourcesDirectory)\csharp' - script: | @@ -214,13 +215,13 @@ jobs: 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 + - ${{ if eq(parameters['IsReleaseBuild'], 'true') }}: + - task: PublishSymbols@2 + displayName: 'Publish Build Symbols' + inputs: + symbolsFolder: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo' + searchPattern: '**/*.pdb' + symbolServerType: teamServices # Node.js Publish - ${{ if eq(parameters['DoNodejsPack'], 'true') }}: