onnxruntime/tools/ci_build/github/azure-pipelines/win-gpu-tensorrt-ci-pipeline.yml
Yufeng Li 39951f35f4
Use template windows-build-tools-setup-steps.yml in win pipelines (#794)
1.  Update nuget restore to 4.3 for capi pipeline
2. Use template windows-build-tools-setup-steps.yml in win piplines.
2019-04-08 21:35:33 -07:00

110 lines
5.6 KiB
YAML

jobs:
- job: Windows_CI_GPU_Dev
pool: Win-GPU-CUDA10
variables:
buildDirectory: '$(Build.BinariesDirectory)'
CUDA_VERSION: '10.0'
# There are some tests in 20190130.zip that TensorRT can't run. Instead here use 20181210 opset8 for TensorRT test.
TestDataUrl: https://onnxruntimetestdata.blob.core.windows.net/models/20181210.zip
TestDataChecksum: a966def7447f4ff04f5665bca235b3f3
steps:
# - template: templates/set-test-data-variables-step.yml
- template: templates/windows-build-tools-setup-steps.yml
parameters:
EnvSetupScript: 'setup_env_cuda.bat'
buildArch: 'amd64'
setVcvars: true
- task: CmdLine@1
displayName: 'Download test data and generate cmake config'
inputs:
filename: '$(Build.BinariesDirectory)\packages\python\python.exe'
arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Debug Release --build_dir $(Build.BinariesDirectory) --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_pybind --use_openmp --use_mkldnn --build_shared_lib --enable_onnx_tests --cuda_home="C:\local\cuda_10.0.130_win10" --cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda" --use_tensorrt --tensorrt_home="C:\local\TensorRT-5.0.4.3" --test_data_url $(TestDataUrl) --test_data_checksum $(TestDataChecksum) --update --msvc_toolset=14.11'
workingDirectory: "$(Build.BinariesDirectory)"
- task: VSBuild@1
displayName: 'Build Debug'
inputs:
solution: '$(Build.BinariesDirectory)\Debug\onnxruntime.sln'
platform: 'x64'
configuration: 'Debug'
msbuildArgs: '/m /p:CudaToolkitDir=C:\local\cuda_10.0.130_win10\'
msbuildArchitecture: 'x64'
logProjectEvents: true
workingFolder: '$(Build.BinariesDirectory)\Debug'
- task: BatchScript@1
displayName: 'Test Debug'
inputs:
filename: '$(Build.BinariesDirectory)\packages\python\python.exe'
arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Debug --build_dir $(Build.BinariesDirectory) --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_pybind --use_openmp --use_mkldnn --build_shared_lib --enable_onnx_tests --cuda_home="C:\local\cuda_10.0.130_win10" --cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda" --use_tensorrt --tensorrt_home="C:\local\TensorRT-5.0.4.3" --test_data_url $(TestDataUrl) --test_data_checksum $(TestDataChecksum) --test'
workingFolder: '$(Build.BinariesDirectory)'
- task: VSBuild@1
displayName: 'Build C# Debug'
inputs:
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
configuration: 'Debug'
platform: 'any cpu'
restoreNugetPackages: false
msbuildArchitecture: 'x64'
workingFolder: '$(Build.SourcesDirectory)\csharp'
msbuildArgs: '/m /p:OnnxRuntimeBuildDirectory=$(Build.BinariesDirectory)'
- task: VSTest@2
displayName: 'VsTest - C# Debug'
inputs:
testAssemblyVer2: '**\bin\Debug\**\*Tests.dll'
searchFolder: '$(Build.SourcesDirectory)\csharp\test'
runInParallel: true
configuration: Debug
- task: VSBuild@1
displayName: 'Build Release'
inputs:
solution: '$(Build.BinariesDirectory)\Release\onnxruntime.sln'
platform: 'x64'
configuration: 'Release'
msbuildArgs: '/m /p:CudaToolkitDir=C:\local\cuda_10.0.130_win10\'
msbuildArchitecture: 'x64'
logProjectEvents: true
workingFolder: '$(Build.BinariesDirectory)\Release'
- task: BatchScript@1
displayName: 'Test Release'
inputs:
filename: '$(Build.BinariesDirectory)\packages\python\python.exe'
arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Release --build_dir $(Build.BinariesDirectory) --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_pybind --use_openmp --use_mkldnn --build_shared_lib --enable_onnx_tests --cuda_home="C:\local\cuda_10.0.130_win10" --cudnn_home="C:\local\cudnn-10.0-windows10-x64-v7.3.1.20\cuda" --use_tensorrt --tensorrt_home="C:\local\TensorRT-5.0.4.3" --test_data_url $(TestDataUrl) --test_data_checksum $(TestDataChecksum) --test'
workingFolder: "$(Build.BinariesDirectory)"
- task: VSBuild@1
displayName: 'Build c# Release'
inputs:
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
platform: 'any cpu'
configuration: 'Release'
msbuildArchitecture: 'x64'
restoreNugetPackages: false
workingFolder: '$(Build.SourcesDirectory)\csharp'
msbuildArgs: '/m /p:OnnxRuntimeBuildDirectory=$(Build.BinariesDirectory)'
- task: VSTest@2
displayName: 'VsTest - C# Release'
inputs:
testAssemblyVer2: '**\bin\Release\**\*Tests.dll'
searchFolder: '$(Build.SourcesDirectory)\csharp\test'
runInParallel: true
configuration: Release
- task: PublishTestResults@2
displayName: 'Publish unit test results'
inputs:
testResultsFiles: '**\*.results.xml'
searchFolder: '$(Build.BinariesDirectory)'
testRunTitle: 'Unit Test Run'
condition: succeededOrFailed()
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
- template: templates/clean-agent-build-directory-step.yml