Files
2026-02-24 18:08:50 -08:00

46 lines
1.9 KiB
YAML

parameters:
- name: artifactName
type: string
default: 'ios_packaging_artifacts_full'
jobs:
- job: main
templateContext:
isProduction: false
inputs:
- input: pipelineArtifact
pipeline: 'pod'
artifactName: '${{ parameters.artifactName }}'
targetPath: '$(Build.ArtifactStagingDirectory)/${{ parameters.artifactName }}'
steps:
- script: |
set -e -x
POD_ARCHIVE=$(find . -name "pod-archive-onnxruntime-objc*.zip")
unzip ${POD_ARCHIVE} -d unzipped
cp -rf unzipped/objectivec/ $(Build.SourcesDirectory)/objectivec/
# Corrected variable name to match the parameter
workingDirectory: '$(Build.ArtifactStagingDirectory)/${{ parameters.artifactName }}'
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.
# xcodebuild will implicitly use Package.swift and build/run the .testTarget (tests in swift/onnxTests).
# once that's done cleanup the copy of the pod zip file
- script: |
set -e -x
# Corrected variable name to match the parameter
cd "$(Build.ArtifactStagingDirectory)/${{ parameters.artifactName }}"
POD_ARCHIVE=$(find . -name "pod-archive-onnxruntime-c*.zip")
shasum -a 256 "$(Build.ArtifactStagingDirectory)/${{ parameters.artifactName }}/${POD_ARCHIVE}"
cd "$(Build.SourcesDirectory)"
cp "$(Build.ArtifactStagingDirectory)/${{ parameters.artifactName }}/${POD_ARCHIVE}" swift/
export ORT_POD_LOCAL_PATH="swift/${POD_ARCHIVE}"
xcodebuild test -scheme onnxruntime-Package -destination 'platform=iOS Simulator,name=iPhone 16'
xcodebuild test -scheme onnxruntime-Package -destination 'platform=macOS'
rm swift/pod-archive-onnxruntime-c-*.zip
workingDirectory: "$(Build.SourcesDirectory)"
displayName: "Print ORT iOS Pod checksum and Test Package.swift usage"