onnxruntime/tools/ci_build/github/azure-pipelines/templates/c-api-linux-cpu.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

96 lines
No EOL
3.9 KiB
YAML

# This file contains the ADO job that build libonnxruntime.so on Linux
parameters:
- name: AdditionalBuildFlags
displayName: Additional build flags for build.py
type: string
default: ''
- name: BaseImage
type: string
- name: OnnxruntimeArch
type: string
- name: OnnxruntimeCFlags
type: string
- name: OnnxruntimeCXXFlags
type: string
- name: OnnxruntimeNodejsBindingArch
type: string
- name: PoolName
type: string
default: 'aiinfra-Linux-CPU'
jobs:
- job: Linux_C_API_Packaging_CPU_${{parameters.OnnxruntimeArch}}
workspace:
clean: all
variables:
- name: skipComponentGovernanceDetection
value: ${{eq('${{parameters.OnnxruntimeNodejsBindingArch}}', 'arm64')}}
timeoutInMinutes: 210
pool: ${{parameters.PoolName}}
steps:
- checkout: self
clean: true
submodules: none
- template: set-version-number-variables-step.yml
- template: get-docker-image-steps.yml
parameters:
Dockerfile: tools/ci_build/github/linux/docker/inference/${{parameters.OnnxruntimeArch}}/default/cpu/Dockerfile
Context: tools/ci_build/github/linux/docker/inference/${{parameters.OnnxruntimeArch}}/default/cpu
DockerBuildArgs: "--build-arg BUILD_UID=$( id -u ) --build-arg BASEIMAGE=${{parameters.BaseImage}}"
Repository: onnxruntimecpubuildcentos7${{parameters.OnnxruntimeArch}}
${{ if eq(parameters.OnnxruntimeArch, 'aarch64') }}:
UpdateDepsTxt: false
- task: CmdLine@2
inputs:
script: |
mkdir -p $HOME/.onnx
docker run --rm -e CFLAGS="${{parameters.OnnxruntimeCFlags}}" -e CXXFLAGS="${{parameters.OnnxruntimeCXXFlags}}" --volume /data/onnx:/data/onnx:ro --volume $(Build.SourcesDirectory):/onnxruntime_src --volume $(Build.BinariesDirectory):/build \
--volume $HOME/.onnx:/home/onnxruntimedev/.onnx -e NIGHTLY_BUILD onnxruntimecpubuildcentos7${{parameters.OnnxruntimeArch}} /bin/bash -c "python3 \
/onnxruntime_src/tools/ci_build/build.py --build_java --build_nodejs --build_dir /build --config Release \
--skip_submodule_sync --parallel --build_shared_lib ${{ parameters.AdditionalBuildFlags }} && cd /build/Release && make install DESTDIR=/build/linux-${{parameters.OnnxruntimeArch}}"
workingDirectory: $(Build.SourcesDirectory)
displayName: 'Build'
- script: |
set -e -x
mkdir $(Build.ArtifactStagingDirectory)/testdata
cp $(Build.BinariesDirectory)/Release/libcustom_op_library.so* $(Build.ArtifactStagingDirectory)/testdata
ls -al $(Build.ArtifactStagingDirectory)
displayName: 'Create Artifacts'
- template: java-api-artifacts-package-and-publish-steps-posix.yml
parameters:
arch: 'linux-${{parameters.OnnxruntimeArch}}'
buildConfig: 'Release'
artifactName: 'onnxruntime-java-linux-${{parameters.OnnxruntimeArch}}'
version: '$(OnnxRuntimeVersion)'
libraryName: 'libonnxruntime.so'
nativeLibraryName: 'libonnxruntime4j_jni.so'
- template: c-api-artifacts-package-and-publish-steps-posix.yml
parameters:
buildConfig: 'Release'
artifactName: 'onnxruntime-linux-${{parameters.OnnxruntimeArch}}-$(OnnxRuntimeVersion)'
artifactNameNoVersionString: 'onnxruntime-linux-${{parameters.OnnxruntimeArch}}'
libraryName: 'libonnxruntime.so.$(OnnxRuntimeVersion)'
- template: nodejs-artifacts-package-and-publish-steps-posix.yml
parameters:
arch: '${{parameters.OnnxruntimeNodejsBindingArch}}'
os: 'linux'
artifactName: 'drop-onnxruntime-nodejs-linux-${{parameters.OnnxruntimeArch}}'
- ${{ if not(eq(parameters.OnnxruntimeNodejsBindingArch, 'arm64')) }}:
- template: component-governance-component-detection-steps.yml
parameters:
condition: 'succeeded'
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
displayName: 'Clean Agent Directories'
condition: always()