onnxruntime/tools/ci_build/github/azure-pipelines/nuget/templates/test_win.yml
Changming Sun 3eaec57c38
Fix the daily pipeline failures (#4084)
1. Fix the nuget cpu pipeline and put code coverage pipeline back.
2. Reduce onnx_test_runner's default logging level from WARNING to ERROR. Because there are too many log messages now.
3. Enlarge the protobuf read buffer size for onnx_test_runner. It was missed from PR #4020.
2020-06-01 14:44:49 -07:00

128 lines
4.4 KiB
YAML

parameters:
AgentPool : 'Win-CPU'
Skipx86Tests: 'false'
jobs:
- job: NuGet_Test_Win
workspace:
clean: all
pool: ${{ parameters.AgentPool }}
dependsOn:
- NuGet_Packaging
condition: succeeded()
variables:
- group: ORT_TEST_DATA_SAS
- name: OnnxRuntimeBuildDirectory
value: '$(Build.BinariesDirectory)'
- name: SKIPNONPACKAGETESTS
value: 'ON'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
addToPath: true
architecture: x64
- task: NuGetToolInstaller@0
displayName: Use Nuget 4.9
inputs:
versionSpec: 4.9.4
- task: BatchScript@1
displayName: 'setup env'
inputs:
filename: '$(Build.SourcesDirectory)\tools\ci_build\github\windows\setup_env_cuda.bat'
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'
modifyEnvironment: true
- task: DownloadPipelineArtifact@0
displayName: 'Download Pipeline Artifact'
inputs:
artifactName: 'drop-signed-nuget'
targetPath: '$(Build.BinariesDirectory)\nuget-artifact'
- task: DownloadPipelineArtifact@0
displayName: 'Download Pipeline Artifact - testdata'
inputs:
artifactName: 'drop-nuget'
targetPath: '$(Build.BinariesDirectory)\testdata'
- template: get-nuget-package-version-as-variable.yml
parameters:
packageFolder: '$(Build.BinariesDirectory)\nuget-artifact'
- script: |
mklink /D /J models C:\local\models
workingDirectory: '$(Build.BinariesDirectory)'
displayName: 'Create models link'
# TODO: Add .Net Core AnyCPU test task
- script: |
@echo "Running Runtest.bat"
test\Microsoft.ML.OnnxRuntime.EndToEndTests\runtest.bat $(Build.BinariesDirectory)\nuget-artifact netcoreapp2.1 x64 $(NuGetPackageVersionNumber)
workingDirectory: '$(Build.SourcesDirectory)\csharp'
displayName: 'Run End to End Test (C#) .Net Core x64'
- ${{ if ne(parameters['Skipx86Tests'], 'true') }}:
- script: |
@echo "Running Runtest.bat"
test\Microsoft.ML.OnnxRuntime.EndToEndTests\runtest.bat $(Build.BinariesDirectory)\nuget-artifact netcoreapp2.1 x86 $(NuGetPackageVersionNumber)
workingDirectory: '$(Build.SourcesDirectory)\csharp'
displayName: 'Run End to End Test (C#) .Net Core x86'
# TODO: Add .Net Framework AnyCPU test task
- script: |
@echo "Running Runtest.bat"
test\Microsoft.ML.OnnxRuntime.EndToEndTests\runtest.bat $(Build.BinariesDirectory)\nuget-artifact net461 x64 $(NuGetPackageVersionNumber)
workingDirectory: '$(Build.SourcesDirectory)\csharp'
displayName: 'Run End to End Test (C#) .NetFramework x64'
- ${{ if ne(parameters['Skipx86Tests'], 'true') }}:
- script: |
@echo "Running Runtest.bat"
test\Microsoft.ML.OnnxRuntime.EndToEndTests\runtest.bat $(Build.BinariesDirectory)\nuget-artifact net461 x86 $(NuGetPackageVersionNumber)
workingDirectory: '$(Build.SourcesDirectory)\csharp'
displayName: 'Run End to End Test (C#) .NetFramework x86'
enabled: false
- script: |
@echo "Running runtest.bat"
test\Microsoft.ML.OnnxRuntime.EndToEndTests.Capi\runtest.bat $(Build.BinariesDirectory)\nuget-artifact x64 $(NuGetPackageVersionNumber)
REM Need an ErrorLevel check, since the script uses Exit /B
IF NOT %ERRORLEVEL% EQU 0 {
EXIT 1
}
workingDirectory: '$(Build.SourcesDirectory)\csharp'
displayName: 'Run End to End Test (C-API) '
timeoutInMinutes: 30
# test C++ API sample
- script: |
@echo ##vso[task.setvariable variable=OnnxRuntimeSampleCode]CXX_Api_Sample.cpp
- script: |
@echo "Running runtest.bat"
test\Microsoft.ML.OnnxRuntime.EndToEndTests.Capi\runtest.bat $(Build.BinariesDirectory)\nuget-artifact x64 $(NuGetPackageVersionNumber)
REM Need an ErrorLevel check, since the script uses Exit /B
IF NOT %ERRORLEVEL% EQU 0 {
EXIT 1
}
workingDirectory: '$(Build.SourcesDirectory)\csharp'
displayName: 'Run End to End Test (C++ API) '
timeoutInMinutes: 30
- template: ../../templates/component-governance-component-detection-steps.yml
parameters :
condition : 'always'
- template: ../../templates/clean-agent-build-directory-step.yml