Skip to content

Commit 1851b73

Browse files
authored
[build] fix packaging pipeline for arm64/linux (#26592)
### Description <!-- Describe your changes. --> ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. -->
1 parent 91a9d02 commit 1851b73

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

tools/ci_build/github/azure-pipelines/templates/c-api-linux-cpu.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ jobs:
4646
clean: true
4747
submodules: none
4848

49-
- task: UsePythonVersion@0
50-
displayName: Use Python 3.12
51-
inputs:
52-
versionSpec: 3.12
53-
${{ if eq(parameters.OnnxruntimeArch, 'aarch64') }}:
54-
architecture: arm64
49+
- ${{ if eq(parameters.OnnxruntimeArch, 'x64') }}:
50+
# Only need to install Python on x64 agents as Python is pre-installed on arm64 agents
51+
- task: UsePythonVersion@0
52+
displayName: Use Python 3.12
53+
inputs:
54+
versionSpec: 3.12
5555

5656
- template: set-version-number-variables-step.yml
5757
- ${{ if eq(parameters.OnnxruntimeArch, 'x64') }}:

tools/ci_build/github/azure-pipelines/templates/java-api-artifacts-package-and-publish-steps-posix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ parameters:
2828
displayName: Architecture
2929
type: string
3030
#default: 'linux-x64'
31-
31+
3232
steps:
3333
- task: PythonScript@0
3434
inputs:
3535
scriptSource: 'filePath'
3636
scriptPath: 'tools/ci_build/linux_java_copy_strip_binary.py'
37+
pythonInterpreter: 'python3'
3738
arguments: >-
3839
--binary-dir $(Build.BinariesDirectory)
3940
--build-config ${{parameters.buildConfig}}
@@ -47,4 +48,3 @@ steps:
4748
inputs:
4849
targetPath: '$(Build.BinariesDirectory)/${{parameters.artifactName}}'
4950
artifactName: 'drop-${{parameters.artifactName}}'
50-

tools/ci_build/github/azure-pipelines/templates/mac-cpu-packaging-pipeline.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ stages:
5353
- task: UsePythonVersion@0
5454
inputs:
5555
versionSpec: '3.13'
56+
architecture: arm64
5657
addToPath: true
5758

5859
- script: |
@@ -77,7 +78,7 @@ stages:
7778
cd temp
7879
find $(Build.ArtifactStagingDirectory) -name '*.zip' -exec unzip {} \;
7980
rm -rf $(Build.ArtifactStagingDirectory)/*;
80-
find . -type d -name 'onnxruntime-osx-*' -exec tar -czf {}.tgz {} \;
81+
find . -type d -name 'onnxruntime-osx-*' -exec tar -czf {}.tgz {} \;
8182
ls -l
8283
mv *.tgz $(Build.ArtifactStagingDirectory)
8384
displayName: 'Unzip Signed Files and Repackage to TGZ'

0 commit comments

Comments
 (0)