Skip to content

[Build] Fix Nuget Test Pipeline AAR Testing with ReleaseVersionSuffix#27347

Open
tianleiwu wants to merge 2 commits intomainfrom
tlwu/20260212/fix_nuget_test_arr_release_suffix
Open

[Build] Fix Nuget Test Pipeline AAR Testing with ReleaseVersionSuffix#27347
tianleiwu wants to merge 2 commits intomainfrom
tlwu/20260212/fix_nuget_test_arr_release_suffix

Conversation

@tianleiwu
Copy link
Contributor

Description

This PR fixes failures in the Android Java API AAR testing stages of the NuGet packaging pipeline.

Background

The Android test stages in c-api-noopenmp-test-pipelines.yml were failing for two reasons:

  1. Variable Resolution: The ReleaseVersionSuffix (e.g., -rc.1) was not being correctly passed between stages, causing bash script errors.
  2. Version Mismatch: The test script attempted to construct the AAR filename using the local VERSION_NUMBER file, which often mismatched the version used to build the packaged artifact, causing cp failures.

Changes

  • Fixed Variable Mapping: Explicitly mapped the ReleaseVersionSuffix output variable from the Setup stage to the Android_Java_API_AAR_Testing_Full and Final_AAR_Testing_Android_QNN stages.
  • Robust AAR Selection: Updated the AAR copy logic in templates/android-java-api-aar-test.yml to use wildcard matching (*.aar) and select the first available file.
  • Added Error Handling: Added a check to verify that an .aar file exists in the artifact directory, providing a clear error message and failing early if it's missing.

Files Modified

  • tools/ci_build/github/azure-pipelines/c-api-noopenmp-test-pipelines.yml: Added stage variables for ReleaseVersionSuffix.
  • tools/ci_build/github/azure-pipelines/templates/android-java-api-aar-test.yml: Updated AAR copy command with check/wildcard.

Testing

  • Verified that $(ReleaseVersionSuffix) resolves correctly in the bash environment.
  • Verified that the cp command correctly finds and rename-copies the AAR even when local version files differ from artifact versions.

@tianleiwu tianleiwu changed the title [Build] Fix Nuget Test Pipeline ARR Release Suffix [Build] Fix Nuget Test Pipeline AAR Testing with ReleaseVersionSuffix Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant