diff --git a/tools/ci_build/github/azure-pipelines/nodejs/templates/test_linux.yml b/tools/ci_build/github/azure-pipelines/nodejs/templates/test_linux.yml index 1d3e92056e..c4102f5ba2 100644 --- a/tools/ci_build/github/azure-pipelines/nodejs/templates/test_linux.yml +++ b/tools/ci_build/github/azure-pipelines/nodejs/templates/test_linux.yml @@ -10,8 +10,10 @@ stages: - job: Nodejs_Test_${{ parameters.StageSuffix }} workspace: clean: all - timeoutInMinutes: 120 - pool: ${{ parameters.AgentPool }} + timeoutInMinutes: 120 + pool: + name: ${{ parameters.AgentPool }} + os: 'linux' variables: - name: OnnxRuntimeBuildDirectory diff --git a/tools/ci_build/github/azure-pipelines/nodejs/templates/test_macos.yml b/tools/ci_build/github/azure-pipelines/nodejs/templates/test_macos.yml index 4518a16887..42ce700b89 100644 --- a/tools/ci_build/github/azure-pipelines/nodejs/templates/test_macos.yml +++ b/tools/ci_build/github/azure-pipelines/nodejs/templates/test_macos.yml @@ -9,9 +9,11 @@ stages: - job: Nodejs_Test_MacOS_${{ parameters.StageSuffix }} workspace: clean: all - timeoutInMinutes: 120 + timeoutInMinutes: 120 pool: - vmImage: 'macOS-13' + name: 'Azure Pipelines' + image: 'macOS-13' + os: 'macOS' variables: - name: OnnxRuntimeBuildDirectory diff --git a/tools/ci_build/github/azure-pipelines/nuget/templates/test_linux.yml b/tools/ci_build/github/azure-pipelines/nuget/templates/test_linux.yml index f9ecfb7cf7..486f70a8f6 100644 --- a/tools/ci_build/github/azure-pipelines/nuget/templates/test_linux.yml +++ b/tools/ci_build/github/azure-pipelines/nuget/templates/test_linux.yml @@ -1,7 +1,7 @@ parameters: AgentPool: 'onnxruntime-Ubuntu2204-AMD-CPU' ArtifactSuffix: '' - NugetPackageName : '' + NugetPackageName: '' StageSuffix: 'CPU' # More Suffix is used to differentiate testing for GPU and GPU-Windows/GPU-Linux packages MoreSuffix: '' @@ -20,7 +20,9 @@ stages: workspace: clean: all timeoutInMinutes: 120 - pool: ${{ parameters.AgentPool }} + pool: + name: ${{ parameters.AgentPool }} + os: 'linux' variables: - template: ../../templates/common-variables.yml @@ -91,24 +93,24 @@ stages: " displayName: 'Run Package Test' - ${{ else }}: - - task: CmdLine@2 - displayName: 'Create symlink for test models' - inputs: - script: | - ln -sf /data/models $(Build.BinariesDirectory) - - task: Bash@3 - displayName: 'Run Package Test' - inputs: - targetType: filePath - filePath: '$(Build.SourcesDirectory)/csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests/runtest.sh' - arguments: '$(Build.BinariesDirectory)/nuget-artifact $(NuGetPackageVersionNumber)' - workingDirectory: $(Build.BinariesDirectory) - env: - OnnxRuntimeBuildDirectory: $(Build.BinariesDirectory) - DisableContribOps: $(DisableContribOps) - DisableMlOps: $(DisableMlOps) - IsReleaseBuild: $(IsReleaseBuild) - PACKAGENAME: ${{ parameters.NugetPackageName }} + - task: CmdLine@2 + displayName: 'Create symlink for test models' + inputs: + script: | + ln -sf /data/models $(Build.BinariesDirectory) + - task: Bash@3 + displayName: 'Run Package Test' + inputs: + targetType: filePath + filePath: '$(Build.SourcesDirectory)/csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests/runtest.sh' + arguments: '$(Build.BinariesDirectory)/nuget-artifact $(NuGetPackageVersionNumber)' + workingDirectory: $(Build.BinariesDirectory) + env: + OnnxRuntimeBuildDirectory: $(Build.BinariesDirectory) + DisableContribOps: $(DisableContribOps) + DisableMlOps: $(DisableMlOps) + IsReleaseBuild: $(IsReleaseBuild) + PACKAGENAME: ${{ parameters.NugetPackageName }} - template: ../../templates/component-governance-component-detection-steps.yml parameters: diff --git a/tools/ci_build/github/azure-pipelines/nuget/templates/test_macos.yml b/tools/ci_build/github/azure-pipelines/nuget/templates/test_macos.yml index 07d2133327..52ed380909 100644 --- a/tools/ci_build/github/azure-pipelines/nuget/templates/test_macos.yml +++ b/tools/ci_build/github/azure-pipelines/nuget/templates/test_macos.yml @@ -1,5 +1,5 @@ parameters: - IsMacOS : 'true' + IsMacOS: 'true' ArtifactSuffix: '' stages: - stage: NuGet_Test_MacOS @@ -11,7 +11,9 @@ stages: workspace: clean: all pool: - vmImage: 'macOS-13' + name: 'Azure Pipelines' + image: 'macOS-13' + os: 'macOS' variables: - name: OnnxRuntimeBuildDirectory @@ -35,24 +37,24 @@ stages: - script: | echo "TODO: Enable this test once fix this nuget test issue" - # $(Build.SourcesDirectory)/csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests/runtest.sh \ - # $(Build.BinariesDirectory)/nuget-artifact \ - # $(NuGetPackageVersionNumber) \ - # ${{ parameters.IsMacOS }} - # - # if [ $? -ne 0 ]; then - # echo "Failed to run test" - # exit 1 - # fi + # $(Build.SourcesDirectory)/csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests/runtest.sh \ + # $(Build.BinariesDirectory)/nuget-artifact \ + # $(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) + OnnxRuntimeBuildDirectory: $(Build.BinariesDirectory) + DisableContribOps: $(DisableContribOps) + DisableMlOps: $(DisableMlOps) + IsReleaseBuild: $(IsReleaseBuild) - template: ../../templates/component-governance-component-detection-steps.yml - parameters : - condition : 'always' + parameters: + condition: 'always' - template: ../../templates/clean-agent-build-directory-step.yml diff --git a/tools/ci_build/github/azure-pipelines/stages/nuget-linux-cuda-packaging-stage.yml b/tools/ci_build/github/azure-pipelines/stages/nuget-linux-cuda-packaging-stage.yml index 2721737ff8..ca9fc5e05d 100644 --- a/tools/ci_build/github/azure-pipelines/stages/nuget-linux-cuda-packaging-stage.yml +++ b/tools/ci_build/github/azure-pipelines/stages/nuget-linux-cuda-packaging-stage.yml @@ -15,7 +15,9 @@ stages: workspace: clean: all timeoutInMinutes: 150 - pool: 'onnxruntime-Ubuntu2204-AMD-CPU' + pool: + name: 'onnxruntime-Ubuntu2204-AMD-CPU' + os: linux variables: - name: CUDA_VERSION_MAJOR ${{ if eq(parameters.CudaVersion, '11.8') }}: @@ -66,7 +68,9 @@ stages: workspace: clean: all timeoutInMinutes: 180 - pool: 'onnxruntime-Ubuntu2204-AMD-CPU' + pool: + name: 'onnxruntime-Ubuntu2204-AMD-CPU' + os: linux variables: - template: ../templates/common-variables.yml - name: CUDA_VERSION_MAJOR diff --git a/tools/ci_build/github/azure-pipelines/stages/set_packaging_variables_stage.yml b/tools/ci_build/github/azure-pipelines/stages/set_packaging_variables_stage.yml index 8da45d4155..8013396018 100644 --- a/tools/ci_build/github/azure-pipelines/stages/set_packaging_variables_stage.yml +++ b/tools/ci_build/github/azure-pipelines/stages/set_packaging_variables_stage.yml @@ -49,6 +49,7 @@ stages: - job: D1 pool: name: 'onnxruntime-Ubuntu2204-AMD-CPU' + os: 'linux' variables: MyVar: $[stageDependencies.Setup.Set_Variables.outputs['Set_Release_Version_Suffix.ReleaseVersionSuffix']] BuildDate: $[stageDependencies.Setup.Set_Variables.outputs['Set_Build_Date.BuildDate']] diff --git a/tools/ci_build/github/azure-pipelines/templates/android-java-api-aar-test.yml b/tools/ci_build/github/azure-pipelines/templates/android-java-api-aar-test.yml index eef10d7351..9433cad1a6 100644 --- a/tools/ci_build/github/azure-pipelines/templates/android-java-api-aar-test.yml +++ b/tools/ci_build/github/azure-pipelines/templates/android-java-api-aar-test.yml @@ -21,7 +21,9 @@ parameters: jobs: - job: Final_AAR_Testing_Android - pool: 'onnxruntime-Ubuntu2204-AMD-CPU' + pool: + name: 'onnxruntime-Ubuntu2204-AMD-CPU' + os: linux workspace: clean: all variables: @@ -47,11 +49,11 @@ jobs: - template: use-android-ndk.yml - script: | - set -e -x - mkdir -p android_test/android/app/libs - cd android_test/android - cp -av $(Build.SourcesDirectory)/java/src/test/android/* ./ - cp $(Build.BinariesDirectory)/final-android-aar/${{parameters.packageName}}-$(OnnxRuntimeVersion)${{parameters.ReleaseVersionSuffix}}.aar app/libs/${{parameters.packageName}}.aar + set -e -x + mkdir -p android_test/android/app/libs + cd android_test/android + cp -av $(Build.SourcesDirectory)/java/src/test/android/* ./ + cp $(Build.BinariesDirectory)/final-android-aar/${{parameters.packageName}}-$(OnnxRuntimeVersion)${{parameters.ReleaseVersionSuffix}}.aar app/libs/${{parameters.packageName}}.aar displayName: Copy Android test files and AAR to android_test directory workingDirectory: $(Build.BinariesDirectory) @@ -83,9 +85,9 @@ jobs: displayName: Trim QNN SDK version to major.minor.patch - script: | - set -e -x - # build apks for qnn package as they are not built in the emulator test step - $(Build.SourcesDirectory)/java/gradlew --no-daemon clean assembleDebug assembleAndroidTest -DqnnVersion=$(QnnMavenPackageVersion) --stacktrace + set -e -x + # build apks for qnn package as they are not built in the emulator test step + $(Build.SourcesDirectory)/java/gradlew --no-daemon clean assembleDebug assembleAndroidTest -DqnnVersion=$(QnnMavenPackageVersion) --stacktrace displayName: Build QNN APK workingDirectory: $(Build.BinariesDirectory)/android_test/android @@ -109,6 +111,6 @@ jobs: BROWSERSTACK_TOKEN: $(browserstack_access_key) - template: component-governance-component-detection-steps.yml - parameters : - condition : 'succeeded' + parameters: + condition: 'succeeded'