onnxruntime/tools/ci_build/github/azure-pipelines/templates/linux-ci.yml
Changming Sun d3d232b047
Rename onnxruntime-Linux-CPU-2019 machine pool (#15691)
Rename onnxruntime-Linux-CPU-2019 machine pool to
"onnxruntime-Ubuntu2004-AMD-CPU". The old one has an internal error and
stuck there. I cannot make any change to it. It has been like this for
more than 1 week. So I created a new pool with the same setting except
the name is different.
Also, move some android pipelines to
"onnxruntime-Linux-CPU-For-Android-CI" which uses a standard image from
https://github.com/actions/runner-images
2023-04-27 12:46:18 -07:00

78 lines
3 KiB
YAML

parameters:
AgentPool : 'onnxruntime-Ubuntu2004-AMD-CPU'
StageName : 'Linux_CI_Dev'
SubmoduleCheckoutMode: ''
RunDockerBuildArgs: '-o ubuntu20.04 -d cpu -x "--build_wheel"'
DoNodejsPack: 'false'
DoNugetPack: 'false'
NuPackScript: ''
RunInjectedPipeline: 'false'
InjectedPipeline: ''
DockerImageTag: ''
BuildConfig: ''
ArtifactName: 'drop-linux'
TimeoutInMinutes: 120
# Controls whether unreleased onnx opsets are allowed. Default is set to 1
AllowReleasedOpsetOnly: '1'
# to inject strategy, you need to pass in the whole yaml structure -
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#strategies
# see example in orttraining-linux-gpu-ci-pipeline.yml
Strategy: ''
jobs:
- job: ${{ parameters.StageName }}
workspace:
clean: all
timeoutInMinutes: ${{ parameters.TimeoutInMinutes }}
variables:
ALLOW_RELEASED_ONNX_OPSET_ONLY: ${{ parameters.AllowReleasedOpsetOnly }}
skipComponentGovernanceDetection: true
pool: ${{ parameters.AgentPool }}
${{ if ne(parameters.Strategy, '') }}:
strategy:
${{ parameters.Strategy }}
steps:
- checkout: self
${{ if ne(parameters.SubmoduleCheckoutMode, '') }}:
submodules: ${{ parameters.SubmoduleCheckoutMode }}
- task: NodeTool@0
inputs:
versionSpec: '16.x'
- template: run-docker-build-steps.yml
parameters:
RunDockerBuildArgs: '${{ parameters.RunDockerBuildArgs }}'
- task: PublishTestResults@2
displayName: 'Publish unit test results'
inputs:
testResultsFiles: '**/*.results.xml'
searchFolder: '$(Build.BinariesDirectory)'
testRunTitle: 'Unit Test Run'
condition: succeededOrFailed()
- ${{ if eq(parameters['DoNugetPack'], 'true') }}:
- script: |
${{ parameters.NuPackScript }}
displayName: 'Create Artifacts'
- task: PublishPipelineArtifact@0
displayName: 'Publish Pipeline Artifact'
inputs:
artifactName: ${{ parameters.ArtifactName }}
targetPath: '$(Build.ArtifactStagingDirectory)'
- ${{ if eq(parameters['DoNodejsPack'], 'true') }}:
- script: |
npm pack
cp $(Build.SourcesDirectory)/js/node/onnxruntime-*.tgz $(Build.ArtifactStagingDirectory)
cp -R $(Build.SourcesDirectory)/js/node/prebuilds $(Build.ArtifactStagingDirectory)/prebuilds
workingDirectory: '$(Build.SourcesDirectory)/js/node'
displayName: 'Create NPM Package'
- task: PublishPipelineArtifact@0
displayName: 'Publish Pipeline Artifact: ${{ parameters.ArtifactName }}'
inputs:
artifactName: ${{ parameters.ArtifactName }}
targetPath: '$(Build.ArtifactStagingDirectory)'
- ${{ if eq(parameters['RunInjectedPipeline'], 'true') }}:
- template: |
${{ parameters.InjectedPipeline }}
parameters:
DockerImageTag: ${{ parameters.DockerImageTag }}
BuildConfig: ${{ parameters.BuildConfig }}
- template: clean-agent-build-directory-step.yml