Skip to content

Commit

Permalink
use pre-release version pod now
Browse files Browse the repository at this point in the history
  • Loading branch information
rachguo authored and rachguo committed Dec 14, 2023
1 parent 9e227da commit 24bb619
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 61 deletions.
32 changes: 1 addition & 31 deletions .pipelines/ios_packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- script: |
cat $(Build.BinariesDirectory)/xcframework_out/xcframework_info.json
displayName: 'Check xcframework_info.json file contents'
displayName: 'List xcframework_info.json file contents'
- script: |
python ./tools/ios/assemble_pod_package.py \
Expand All @@ -68,38 +68,8 @@ jobs:
displayName: "Lint pod"
workingDirectory: $(Build.BinariesDirectory)/pod_staging
# Download artifacts from a specific pipeline
# It consumes a specific dev version onnxruntime-c and onnxruntime-objc which contains macos support
# TODO: Can update to latest successful build from the pipeline here when available to avoid artifacts going out of date.
# Or if using a pre-release version ORT C/OBJC pod, this step can be omitted.
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'specific'
artifactName: '$(artifactsName)'
project: 'Lotus'
definition: 995 #'definitionid' is obtained from `System.DefinitionId` of ORT CI: onnxruntime-ios-packaging-pipeline
buildVersionToDownload: 'specific'
pipelineId: 388725
targetPath: '$(Build.ArtifactStagingDirectory)'

- script: |
set -e -x
ls
ORT_C_LOCAL_POD_PATH=$(Build.ArtifactStagingDirectory)/onnxruntime-c.podspec \
ORT_OBJC_LOCAL_POD_PATH=$(Build.ArtifactStagingDirectory)/onnxruntime-objc.podspec \
C_LOCAL_POD_ARCHIVE_PATH=$(find . -name "pod-archive-onnxruntime-c*.zip")
OBJC_LOCAL_POD_ARCHIVE_PATH=$(find . -name "pod-archive-onnxruntime-objc*.zip")
C_LOCAL_POD_ARCHIVE_PATH_CLEANED=${C_LOCAL_POD_ARCHIVE_PATH#./}
OBJC_LOCAL_POD_ARCHIVE_PATH_CLEANED=${OBJC_LOCAL_POD_ARCHIVE_PATH#./}
sed -i "" -e "s|:http => file:///http_source_placeholder|:path => $(Build.ArtifactStagingDirectory)/${C_LOCAL_POD_ARCHIVE_PATH_CLEANED}|" "${ORT_C_LOCAL_POD_PATH}"
sed -i "" -e "s|:http => file:///http_source_placeholder|:path => $(Build.ArtifactStagingDirectory)/${OBJC_LOCAL_POD_ARCHIVE_PATH_CLEANED}|" "${ORT_OBJC_LOCAL_POD_PATH}"
displayName: "List downloaded artifacts and update podspec files"
workingDirectory: $(Build.ArtifactStagingDirectory)
- script: |
ORT_EXTENSIONS_LOCAL_POD_PATH=$(Build.BinariesDirectory)/pod_staging \
ORT_C_LOCAL_POD_PATH=$(Build.ArtifactStagingDirectory)/onnxruntime-c.podspec \
ORT_OBJC_LOCAL_POD_PATH=$(Build.ArtifactStagingDirectory)/onnxruntime-objc.podspec \
pod install
displayName: "Install pods for OrtExtensionsUsage"
workingDirectory: $(Build.SourcesDirectory)/test/ios/OrtExtensionsUsage
Expand Down
40 changes: 10 additions & 30 deletions test/ios/OrtExtensionsUsage/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,18 @@ target 'OrtExtensionsUsage' do

# Pods for OrtExtensionsUsage

# Note: For iOS target, it doesn't require the dev version pod, however,
# Podfile does not allow the same pod contain different dependencies, so adding dev version
# Note: For iOS target, it doesn't require the dev version pod which contains macos support, however,
# Podfile does not allow the same pod contain different dependencies, so adding the pre-release version
# objc pod here temporarily.
ort_objc_local_pod_path = ENV['ORT_OBJC_LOCAL_POD_PATH']
if ort_objc_local_pod_path != nil
print 'Using dev version onnxruntime-objc pod at ', ort_objc_local_pod_path, "\n"
pod 'onnxruntime-objc', :podspec => ort_objc_local_pod_path
else
pod 'onnxruntime-objc', '>= 1.16.0'
end

pod 'onnxruntime-objc', '1.17.0-dev+20231211010.8f2b5a6'

# environment variable ORT_EXTENSIONS_LOCAL_POD_PATH can be used to specify a local onnxruntime-extensions-c pod path
ort_extensions_local_pod_path = ENV['ORT_EXTENSIONS_LOCAL_POD_PATH']
if ort_extensions_local_pod_path != nil
print 'Using onnxruntime-extensions-c pod at ', ort_extensions_local_pod_path, "\n"
pod 'onnxruntime-extensions-c', :path => ort_extensions_local_pod_path
else
pod 'onnxruntime-extensions-c'
pod 'onnxruntime-extensions-c', :podspec => '/Users/rachguo/Downloads/ios_packaging_artifacts_ext_121301/onnxruntime-extensions-c.podspec'
end

target 'OrtExtensionsUsageTests' do
Expand All @@ -39,32 +33,18 @@ target 'OrtExtensionsMacOSUsage' do
platform :osx, '11.0'

# Pods for OrtExtensionsMacOSUsage

# Note: currently it requires dev version onnxruntime-objc/onnxruntime-c pod which supports macos
# for testing. will be updated to release version ORT pods after release.
# (Or consider including a pre-release version pod here for simplicity.)
ort_c_local_pod_path = ENV['ORT_C_LOCAL_POD_PATH']
if ort_c_local_pod_path != nil
print 'Using dev version onnxruntime-c pod at ', ort_c_local_pod_path, "\n"
pod 'onnxruntime-c', :podspec => ort_c_local_pod_path
else
pod 'onnxruntime-c', '>= 1.16.0'
end
ort_objc_local_pod_path = ENV['ORT_OBJC_LOCAL_POD_PATH']
if ort_objc_local_pod_path != nil
print 'Using dev version onnxruntime-objc pod at ', ort_objc_local_pod_path, "\n"
pod 'onnxruntime-objc', :podspec => ort_objc_local_pod_path
else
pod 'onnxruntime-objc', '>= 1.16.0'
end

# Note: Currently using a pre-release version of ORT OBJC pod to enable support for macOS target.
# TODO: Update to release version when available
pod 'onnxruntime-objc', '1.17.0-dev+20231211010.8f2b5a6'

# environment variable ORT_EXTENSIONS_LOCAL_POD_PATH can be used to specify a local onnxruntime-extensions-c pod path
ort_extensions_local_pod_path = ENV['ORT_EXTENSIONS_LOCAL_POD_PATH']
if ort_extensions_local_pod_path != nil
print 'Using onnxruntime-extensions-c pod at ', ort_extensions_local_pod_path, "\n"
pod 'onnxruntime-extensions-c', :path => ort_extensions_local_pod_path
else
pod 'onnxruntime-extensions-c'
pod 'onnxruntime-extensions-c', :podspec => '/Users/rachguo/Downloads/ios_packaging_artifacts_ext_121301/onnxruntime-extensions-c.podspec'
end

target 'OrtExtensionsMacOSUsageTests' do
Expand Down

0 comments on commit 24bb619

Please sign in to comment.