onnxruntime/tools/ci_build/github/azure-pipelines/templates/android-java-api-aar.yml
Changming Sun 5bed8d0285
Disable XNNPack EP's tests in Windows CI pipeline (#15406)
### Description

1. Disable XNNPack EP's tests in Windows CI pipeline
The EP code has a known problem(memory alignment), but the problem does
not impact the usages that we ship the code to. Now we only use XNNPack
EP in mobile apps and web usages. We have already pipelines to cover
these usages. We need to prioritize fixing the bugs found in these
pipelines, and there no resource to put on this Windows one. We can
re-enable the tests once we reached an agreement on how to fix the
memory alignment bug.

2.  Delete anybuild.yml which was for an already deleted pipeline.
3. Move Windows CPU pipelines to AMD CPU machine pools which are
cheaper.
4. Disable some qdq/int8 model tests that will fail if the CPU doesn't
have Intel AVX512 8-bit instructions.
2023-04-13 12:19:32 -07:00

108 lines
3.3 KiB
YAML

parameters:
- name: buildConfig
displayName: Configuration to build
type: string
default: 'Release'
- name: buildSettings
displayName: Path to the build setting file
type: string
default: ''
- name: includedOpsConfig
displayName: Path to the included ops config file
type: string
default: ''
- name: artifactName
displayName: Artifact Name
type: string
default: ''
- name: job_name_suffix
displayName: Job name
type: string
default: ''
- name: publish_executables
# The executables will only be published if the publish_executables is set to "1"
displayName: Publish executables such as onnxruntime_perf_test, ...
type: string
default: '0'
- name: pool_name
displayName: Pool name
type: string
default: 'aiinfra-Linux-CPU'
- name: packageName
# now we can build onnxruntime or onnxruntime-mobile for Android, need specify it here
displayName: Package Name
type: string
default: 'onnxruntime-android'
jobs:
- job: Android_Java_API_AAR_Packaging_${{ parameters.job_name_suffix }}
timeoutInMinutes: 120
workspace:
clean: all
pool: ${{parameters.pool_name}}
variables:
artifacts_directory: $(Build.BinariesDirectory)/.artifacts
steps:
- checkout: self
clean: true
submodules: none
- task: CmdLine@2
displayName: Create artifacts directory
inputs:
script: |
# Create a folder for artifacts
mkdir -p $(artifacts_directory)
workingDirectory: $(Build.BinariesDirectory)
- template: get-docker-image-steps.yml
parameters:
Dockerfile: tools/ci_build/github/linux/docker/Dockerfile.manylinux2014_cpu
Context: tools/ci_build/github/linux/docker
DockerBuildArgs: "--build-arg BUILD_UID=$( id -u )"
Repository: onnxruntimecpubuild
- template: set-version-number-variables-step.yml
- template: use-android-ndk.yml
- task: CmdLine@2
displayName: Build Android AAR Packages
inputs:
script: |
set -e -x
NDK_HOME=$(realpath $ANDROID_NDK_HOME)
mkdir $(Build.BinariesDirectory)/.build_settings
cp ${{parameters.buildSettings}} $(Build.BinariesDirectory)/.build_settings/build_settings.json
[ -f "${{parameters.includedOpsConfig}}" ] && \
cp ${{parameters.includedOpsConfig}} $(Build.BinariesDirectory)/.build_settings/include_ops_and_types.config
docker run --rm \
--volume $(Build.SourcesDirectory):/onnxruntime_src \
--volume $(Build.BinariesDirectory):/build \
--volume $ANDROID_HOME:/android_home \
--volume $NDK_HOME:/ndk_home \
--volume $(artifacts_directory):/home/onnxruntimedev/.artifacts \
--volume $(Build.BinariesDirectory)/.build_settings:/home/onnxruntimedev/.build_settings \
-e NIGHTLY_BUILD \
-e BUILD_BUILDNUMBER \
-e BUILD_CONFIG=${{parameters.buildConfig}} \
-e ORT_VERSION=$(OnnxRuntimeVersion) \
-e PUBLISH_EXECUTABLES=${{parameters.publish_executables}} \
-e PACKAGE_NAME=${{parameters.packageName}} \
onnxruntimecpubuild \
/bin/bash /onnxruntime_src/tools/ci_build/github/android/build_aar_and_copy_artifacts.sh
workingDirectory: $(Build.SourcesDirectory)
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(artifacts_directory)'
artifactName: '${{parameters.artifactName}}'