onnxruntime/tools/ci_build/github/azure-pipelines/nuget/templates/test_macos.yml
2021-04-15 07:29:52 -07:00

57 lines
1.7 KiB
YAML

parameters:
IsMacOS : 'true'
jobs:
- job: NuGet_Test_MacOS
workspace:
clean: all
pool:
vmImage: 'macOS-10.14'
dependsOn:
- NuGet_Packaging
condition: succeeded()
variables:
- name: OnnxRuntimeBuildDirectory
value: '$(Build.BinariesDirectory)'
steps:
- task: DownloadPipelineArtifact@0
displayName: 'Download Pipeline Artifact - Signed NuGet'
inputs:
artifactName: 'drop-signed-nuget'
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
- task: DownloadPipelineArtifact@0
displayName: 'Download OsX CustomOp test data'
inputs:
artifactName: 'drop-osx'
targetPath: '$(Build.BinariesDirectory)/testdata'
- template: get-nuget-package-version-as-variable.yml
parameters:
packageFolder: '$(Build.BinariesDirectory)/nuget-artifact'
- script: |
brew install libomp
$(Build.SourcesDirectory)/csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests/runtest.sh \
$(Build.BinariesDirectory)/nuget-artifact \
$(Build.SourcesDirectory) \
$(Build.BinariesDirectory) \
$(NuGetPackageVersionNumber) \
${{ parameters.IsMacOS }}
if [ $? -ne 0 ]; then
echo "Failed to run test"
exit 1
fi
displayName: 'Run Test'
env:
OnnxRuntimeBuildDirectory: $(Build.BinariesDirectory)
DisableContribOps: $(DisableContribOps)
DisableMlOps: $(DisableMlOps)
IsReleaseBuild: $(IsReleaseBuild)
- template: ../../templates/component-governance-component-detection-steps.yml
parameters :
condition : 'always'
- template: ../../templates/clean-agent-build-directory-step.yml