diff --git a/tools/ci_build/github/azure-pipelines/templates/c-api-cpu.yml b/tools/ci_build/github/azure-pipelines/templates/c-api-cpu.yml index 1ee5868047..415deb46dd 100644 --- a/tools/ci_build/github/azure-pipelines/templates/c-api-cpu.yml +++ b/tools/ci_build/github/azure-pipelines/templates/c-api-cpu.yml @@ -52,6 +52,7 @@ jobs: OnnxruntimeCFlags: '-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection -O3 -Wl,--strip-all' OnnxruntimeCXXFlags: '-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection -O3 -Wl,--strip-all' OnnxruntimeNodejsBindingArch: 'x64' + PoolName: 'Linux-CPU' - template: c-api-linux-cpu.yml parameters: @@ -61,6 +62,7 @@ jobs: OnnxruntimeCFlags: '-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -O3 -Wl,--strip-all' OnnxruntimeCXXFlags: '-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -O3 -Wl,--strip-all' OnnxruntimeNodejsBindingArch: 'arm64' + PoolName: 'aiinfra-linux-ARM64-CPU-2019' - job: MacOS_C_API_Packaging_CPU_x64 workspace: diff --git a/tools/ci_build/github/azure-pipelines/templates/c-api-linux-cpu.yml b/tools/ci_build/github/azure-pipelines/templates/c-api-linux-cpu.yml index 68c521c8b1..ca1f1714af 100644 --- a/tools/ci_build/github/azure-pipelines/templates/c-api-linux-cpu.yml +++ b/tools/ci_build/github/azure-pipelines/templates/c-api-linux-cpu.yml @@ -19,14 +19,33 @@ parameters: - name: OnnxruntimeNodejsBindingArch type: string + +- name: PoolName + type: string + default: '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: 'Linux-CPU' + pool: ${{parameters.PoolName}} steps: + - bash: | + set -euo pipefail + if ! which docker; then + sudo apt-get install apt-transport-https ca-certificates curl software-properties-common + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" + sudo apt-get update + sudo apt-get install -y docker-ce docker-ce-cli containerd.io + sudo chmod 666 /var/run/docker.sock + fi + displayName: Install Docker Engine - template: set-version-number-variables-step.yml - template: get-docker-image-steps.yml parameters: @@ -74,11 +93,10 @@ jobs: arch: '${{parameters.OnnxruntimeNodejsBindingArch}}' os: 'linux' artifactName: 'drop-onnxruntime-nodejs-linux-${{parameters.OnnxruntimeArch}}' - - - template: component-governance-component-detection-steps.yml - parameters : - condition : 'succeeded' - + - ${{ 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() \ No newline at end of file