diff --git a/.pipelines/mac-ios-spm-dev-validation-pipeline.yml b/.pipelines/mac-ios-spm-dev-validation-pipeline.yml index a400fee..cd3e48e 100644 --- a/.pipelines/mac-ios-spm-dev-validation-pipeline.yml +++ b/.pipelines/mac-ios-spm-dev-validation-pipeline.yml @@ -32,8 +32,7 @@ displayName: "List sparse checkout repo contents" # Download artifacts from a specific pipeline - # For now, it consumes rel-1.15.0 version ORT iOS Pod which matches the current source code - # TODO: Update branch to latest main of ORT github repo when syncing changes to ORT SPM repo here. + # It consumes a latest dev version ORT iOS Pod which should match with the source code - task: DownloadPipelineArtifact@2 inputs: buildType: 'specific' diff --git a/.pipelines/mac-ios-spm-release-validation-pipeline.yml b/.pipelines/mac-ios-spm-release-validation-pipeline.yml index 5efefa8..74a895f 100644 --- a/.pipelines/mac-ios-spm-release-validation-pipeline.yml +++ b/.pipelines/mac-ios-spm-release-validation-pipeline.yml @@ -14,37 +14,12 @@ - template: templates/use-xcode-version.yml parameters: 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 # and OnnxRuntimeExtensions targets. - script: | 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' - rm swift/pod-archive-onnxruntime-extensions-c-*.zip workingDirectory: "$(Build.SourcesDirectory)" displayName: "Test Package.swift usage" diff --git a/Package.swift b/Package.swift index 8c929c2..5306f66 100644 --- a/Package.swift +++ b/Package.swift @@ -8,6 +8,7 @@ // 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: // +// TODO: UPDATE VERSION NUMBER HERE ONCE A 1.16.0 RELEASE IS CONDUCTED ON THE SPM REPO // dependencies: [ // .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( name: "onnxruntime", - platforms: [.iOS(.v11)], + platforms: [.iOS(.v12)], products: [ .library(name: "onnxruntime", 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)) } else { - // ORT 1.15.0 release + // ORT 1.16.0 release package.targets.append( Target.binaryTarget(name: "onnxruntime", - url: "https://onnxruntimepackages.z14.web.core.windows.net/pod-archive-onnxruntime-c-1.15.0.zip", - checksum: "9b41412329a73d7d298b1d94ab40ae9adb65cb84f132054073bc82515b4f5f82") + url: "https://onnxruntimepackages.z14.web.core.windows.net/pod-archive-onnxruntime-c-1.16.0.zip", + checksum: "684f317081d6795e5fd619972bc5dd9a648156ba9d3e0fb2292314582a216d8e") ) } 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)) -} -// Note: ORT Extensions 0.8.0 release version pod (Currently not working - it gives a header path not found error.) - else { - // package.targets.append( - // Target.binaryTarget(name: "onnxruntime_extensions", - // url: "https://onnxruntimepackages.z14.web.core.windows.net/pod-archive-onnxruntime-extensions-c-0.8.0.zip", - // 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.") +} else { + // ORT Extensions 0.9.0 release + package.targets.append( + Target.binaryTarget(name: "onnxruntime_extensions", + url: "https://onnxruntimepackages.z14.web.core.windows.net/pod-archive-onnxruntime-extensions-c-0.9.0.zip", + checksum: "2549ae80482a1de285aa54cc07440b7daf8a93f91043eff6ba56b6e73274d6cf") + ) } \ No newline at end of file