This commit is contained in:
Changming Sun
2025-07-15 16:52:25 -07:00
parent 271184daab
commit 3484911762
+13 -6
View File
@@ -1,3 +1,8 @@
parameters:
- name: artifactName
type: string
default: 'ios_packaging_artifacts_full'
jobs: jobs:
- job: main - job: main
templateContext: templateContext:
@@ -5,8 +10,8 @@ jobs:
inputs: inputs:
- input: pipelineArtifact - input: pipelineArtifact
pipeline: 'pod' pipeline: 'pod'
artifactName: 'ios_packaging_artifacts_full' artifactName: '${{ parameters.artifactName }}'
targetPath: '$(Build.ArtifactStagingDirectory)/ios_packaging_artifacts_full' targetPath: '$(Build.ArtifactStagingDirectory)/${{ parameters.artifactName }}'
steps: steps:
- task: UsePythonVersion@0 - task: UsePythonVersion@0
inputs: inputs:
@@ -21,7 +26,8 @@ jobs:
POD_ARCHIVE=$(find . -name "pod-archive-onnxruntime-objc*.zip") POD_ARCHIVE=$(find . -name "pod-archive-onnxruntime-objc*.zip")
unzip ${POD_ARCHIVE} -d unzipped unzip ${POD_ARCHIVE} -d unzipped
cp -rf unzipped/objectivec/ $(Build.SourcesDirectory)/objectivec/ cp -rf unzipped/objectivec/ $(Build.SourcesDirectory)/objectivec/
workingDirectory: '$(Build.ArtifactStagingDirectory)/$(artifactsName)' # Corrected variable name to match the parameter
workingDirectory: '$(Build.ArtifactStagingDirectory)/$(artifactName)'
displayName: Copy latest dev version ORT objectivec/ source files displayName: Copy latest dev version ORT objectivec/ source files
# copy the pod archive to a path relative to Package.swift and set the env var required by Package.swift to use that. # copy the pod archive to a path relative to Package.swift and set the env var required by Package.swift to use that.
@@ -29,13 +35,14 @@ jobs:
# once that's done cleanup the copy of the pod zip file # once that's done cleanup the copy of the pod zip file
- script: | - script: |
set -e -x set -e -x
cd "$(Build.ArtifactStagingDirectory)/$(artifactsName)" # Corrected variable name to match the parameter
cd "$(Build.ArtifactStagingDirectory)/$(artifactName)"
POD_ARCHIVE=$(find . -name "pod-archive-onnxruntime-c*.zip") POD_ARCHIVE=$(find . -name "pod-archive-onnxruntime-c*.zip")
shasum -a 256 "$(Build.ArtifactStagingDirectory)/$(artifactsName)/${POD_ARCHIVE}" shasum -a 256 "$(Build.ArtifactStagingDirectory)/$(artifactName)/${POD_ARCHIVE}"
cd "$(Build.SourcesDirectory)" cd "$(Build.SourcesDirectory)"
cp "$(Build.ArtifactStagingDirectory)/$(artifactsName)/${POD_ARCHIVE}" swift/ cp "$(Build.ArtifactStagingDirectory)/$(artifactName)/${POD_ARCHIVE}" swift/
export ORT_POD_LOCAL_PATH="swift/${POD_ARCHIVE}" export ORT_POD_LOCAL_PATH="swift/${POD_ARCHIVE}"
xcodebuild test -scheme onnxruntime-Package -destination 'platform=iOS Simulator,name=iPhone 14' xcodebuild test -scheme onnxruntime-Package -destination 'platform=iOS Simulator,name=iPhone 14'