mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
* Fix nuget content * Revert "Fix nuget content" This reverts commit e2cdcec4e39964c50eac2fb306c7a4bb84352443. * Nuget packaging * skip tests * msbuild path * Force msbuild version * Workaround https://github.com/NuGet/Home/issues/7621 * cleanup
130 lines
4.4 KiB
YAML
130 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'
|
|
- name: runCodesignValidationInjection
|
|
value: false
|
|
|
|
steps:
|
|
- task: UsePythonVersion@0
|
|
inputs:
|
|
versionSpec: '3.7'
|
|
addToPath: true
|
|
architecture: x64
|
|
|
|
- task: NuGetToolInstaller@0
|
|
displayName: Use Nuget 5.7.0
|
|
inputs:
|
|
versionSpec: 5.7.0
|
|
|
|
- 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
|