Update to latest 1.16.0 ORT release (#7)

* update to latest 1.16.0 ort release

* minor update

* update to ext-c 0.9.0 release pod

* update

* update comments

---------

Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net>
Co-authored-by: rachguo <rachguo@rachguos-Mac-mini.local>
This commit is contained in:
Rachel Guo
2023-09-22 16:52:05 -07:00
committed by GitHub
parent c76787fd3e
commit 4d2b60a528
3 changed files with 13 additions and 42 deletions
@@ -32,8 +32,7 @@
displayName: "List sparse checkout repo contents" displayName: "List sparse checkout repo contents"
# Download artifacts from a specific pipeline # Download artifacts from a specific pipeline
# For now, it consumes rel-1.15.0 version ORT iOS Pod which matches the current source code # It consumes a latest dev version ORT iOS Pod which should match with the source code
# TODO: Update branch to latest main of ORT github repo when syncing changes to ORT SPM repo here.
- task: DownloadPipelineArtifact@2 - task: DownloadPipelineArtifact@2
inputs: inputs:
buildType: 'specific' buildType: 'specific'
@@ -14,37 +14,12 @@
- template: templates/use-xcode-version.yml - template: templates/use-xcode-version.yml
parameters: parameters:
xcodeVersion: ${{ variables.xcodeVersion }} xcodeVersion: ${{ variables.xcodeVersion }}
# Note: Currently it requires a dev version extensions c pod for testing
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'specific'
project: 'Lotus'
definition: 1206 #'definitionid' is obtained from `System.DefinitionId` of extensions CI: extensions.ios_packaging
buildVersionToDownload: 'latest'
branchName: 'main'
targetPath: '$(Build.ArtifactStagingDirectory)'
- script: |
set -e -x
ls
workingDirectory: "$(Build.ArtifactStagingDirectory)/ios_packaging_artifacts"
displayName: "List staged artifacts for ORT Ext C Pod"
# Note: Running xcodebuild test on `onnxruntime-Package` scheme will perform swift tests for both OnnxRuntimeBindings # Note: Running xcodebuild test on `onnxruntime-Package` scheme will perform swift tests for both OnnxRuntimeBindings
# and OnnxRuntimeExtensions targets. # and OnnxRuntimeExtensions targets.
- script: | - script: |
set -e -x set -e -x
cd "$(Build.ArtifactStagingDirectory)/ios_packaging_artifacts"
POD_ARCHIVE=$(find . -name "pod-archive-onnxruntime-extensions-c-*.zip")
cd "$(Build.SourcesDirectory)"
cp "$(Build.ArtifactStagingDirectory)/ios_packaging_artifacts/${POD_ARCHIVE}" swift/
export ORT_EXTENSIONS_IOS_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'
rm swift/pod-archive-onnxruntime-extensions-c-*.zip
workingDirectory: "$(Build.SourcesDirectory)" workingDirectory: "$(Build.SourcesDirectory)"
displayName: "Test Package.swift usage" displayName: "Test Package.swift usage"
+12 -15
View File
@@ -8,6 +8,7 @@
// A user of the Swift Package Manager (SPM) package will consume this file directly from the ORT SPM github repository. // A user of the Swift Package Manager (SPM) package will consume this file directly from the ORT SPM github repository.
// For context, the end user's config will look something like: // For context, the end user's config will look something like:
// //
// TODO: UPDATE VERSION NUMBER HERE ONCE A 1.16.0 RELEASE IS CONDUCTED ON THE SPM REPO
// dependencies: [ // dependencies: [
// .package(url: "https://github.com/microsoft/onnxruntime-swift-package-manager", from: "1.15.0"), // .package(url: "https://github.com/microsoft/onnxruntime-swift-package-manager", from: "1.15.0"),
// ... // ...
@@ -19,7 +20,7 @@ import class Foundation.ProcessInfo
let package = Package( let package = Package(
name: "onnxruntime", name: "onnxruntime",
platforms: [.iOS(.v11)], platforms: [.iOS(.v12)],
products: [ products: [
.library(name: "onnxruntime", .library(name: "onnxruntime",
type: .static, type: .static,
@@ -103,25 +104,21 @@ if let pod_archive_path = ProcessInfo.processInfo.environment["ORT_IOS_POD_LOCAL
package.targets.append(Target.binaryTarget(name: "onnxruntime", path: pod_archive_path)) package.targets.append(Target.binaryTarget(name: "onnxruntime", path: pod_archive_path))
} else { } else {
// ORT 1.15.0 release // ORT 1.16.0 release
package.targets.append( package.targets.append(
Target.binaryTarget(name: "onnxruntime", Target.binaryTarget(name: "onnxruntime",
url: "https://onnxruntimepackages.z14.web.core.windows.net/pod-archive-onnxruntime-c-1.15.0.zip", url: "https://onnxruntimepackages.z14.web.core.windows.net/pod-archive-onnxruntime-c-1.16.0.zip",
checksum: "9b41412329a73d7d298b1d94ab40ae9adb65cb84f132054073bc82515b4f5f82") checksum: "684f317081d6795e5fd619972bc5dd9a648156ba9d3e0fb2292314582a216d8e")
) )
} }
if let ext_pod_archive_path = ProcessInfo.processInfo.environment["ORT_EXTENSIONS_IOS_POD_LOCAL_PATH"] { if let ext_pod_archive_path = ProcessInfo.processInfo.environment["ORT_EXTENSIONS_IOS_POD_LOCAL_PATH"] {
package.targets.append(Target.binaryTarget(name: "onnxruntime_extensions", path: ext_pod_archive_path)) package.targets.append(Target.binaryTarget(name: "onnxruntime_extensions", path: ext_pod_archive_path))
} } else {
// Note: ORT Extensions 0.8.0 release version pod (Currently not working - it gives a header path not found error.) // ORT Extensions 0.9.0 release
else { package.targets.append(
// package.targets.append( Target.binaryTarget(name: "onnxruntime_extensions",
// Target.binaryTarget(name: "onnxruntime_extensions", url: "https://onnxruntimepackages.z14.web.core.windows.net/pod-archive-onnxruntime-extensions-c-0.9.0.zip",
// url: "https://onnxruntimepackages.z14.web.core.windows.net/pod-archive-onnxruntime-extensions-c-0.8.0.zip", checksum: "2549ae80482a1de285aa54cc07440b7daf8a93f91043eff6ba56b6e73274d6cf")
// checksum: "1d003770c9a6d0ead92c04ed40d5083e8f4f55ea985750c3efab91489be15512") )
// )
fatalError("It is not valid to use a release version extensions c pod for now.\n" +
"Please set ORT_EXTENSIONS_IOS_POD_LOCAL_PATH environment variable to specify a location for local dev version pod.\n" +
"See Package.swift for more information on using a local pod archive.")
} }