Skip to content

Commit

Permalink
Update for ORT 1.19.0 release (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
skottmckay authored Aug 28, 2024
2 parents 11c7dd6 + 6ede16e commit 6493bb5
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 44 deletions.
5 changes: 1 addition & 4 deletions .pipelines/mac-ios-spm-dev-validation-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@
vmImage: "macOS-13"

variables:
xcodeVersion: "14.3"
artifactsName: "ios_packaging_artifacts_full"

timeoutInMinutes: 60

steps:
- template: templates/use-xcode-version.yml
parameters:
xcodeVersion: ${{ variables.xcodeVersion }}

# Download artifacts from a specific pipeline
# It consumes a latest dev version ORT iOS Pod which should match with the source code
Expand Down Expand Up @@ -52,7 +49,7 @@
cd "$(Build.SourcesDirectory)"
cp "$(Build.ArtifactStagingDirectory)/$(artifactsName)/${POD_ARCHIVE}" swift/
export ORT_IOS_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=macosx'
Expand Down
7 changes: 2 additions & 5 deletions .pipelines/mac-ios-spm-extensions-validation-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@
vmImage: "macOS-13"

variables:
xcodeVersion: "14.3"
artifactsName: "ios_packaging_artifacts_full"
artifactsNameForExt: "ios_packaging_artifacts"

timeoutInMinutes: 60

steps:
- template: templates/use-xcode-version.yml
parameters:
xcodeVersion: ${{ variables.xcodeVersion }}

- script: |
mkdir tmp
Expand Down Expand Up @@ -86,9 +83,9 @@
cp -r "$(Build.SourcesDirectory)/extensions" .
cp "$(Build.ArtifactStagingDirectory)/$(artifactsName)/${POD_ARCHIVE}" swift/
export ORT_IOS_POD_LOCAL_PATH="swift/${POD_ARCHIVE}"
export ORT_POD_LOCAL_PATH="swift/${POD_ARCHIVE}"
cp "$(Build.ArtifactStagingDirectory)/$(artifactsNameForExt)/${POD_ARCHIVE_EXT}" swift/
export ORT_EXTENSIONS_IOS_POD_LOCAL_PATH="swift/${POD_ARCHIVE_EXT}"
export ORT_EXTENSIONS_POD_LOCAL_PATH="swift/${POD_ARCHIVE_EXT}"
xcodebuild test -scheme onnxruntime-Package -destination 'platform=iOS Simulator,name=iPhone 14'
Expand Down
5 changes: 0 additions & 5 deletions .pipelines/mac-ios-spm-release-validation-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@
pool:
vmImage: "macOS-13"

variables:
xcodeVersion: "14.3"

timeoutInMinutes: 60

steps:
- template: templates/use-xcode-version.yml
parameters:
xcodeVersion: ${{ variables.xcodeVersion }}

# Note: Running xcodebuild test on `onnxruntime-Package` scheme will perform swift tests for both OnnxRuntimeBindings
# and OnnxRuntimeExtensions targets.
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/templates/use-xcode-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
parameters:
- name: xcodeVersion
type: string
default: "14.3"
default: "14.3.1"

steps:
- bash: |
Expand Down
59 changes: 30 additions & 29 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@
// Licensed under the MIT License.
//
// 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 example, the end user's config will look something like:
//
// dependencies: [
// .package(url: "https://github.com/microsoft/onnxruntime-swift-package-manager", from: "1.16.0"),
// ...
// ],
// NOTE: For specifying valid and latest release version above, please refer to this page:
//
// NOTE: For valid version numbers, please refer to this page:
// https://github.com/microsoft/onnxruntime-swift-package-manager/releases

import PackageDescription
import class Foundation.ProcessInfo

let package = Package(
name: "onnxruntime",
platforms: [.iOS(.v12),
platforms: [.iOS(.v13),
.macOS(.v11)],
products: [
.library(name: "onnxruntime",
Expand Down Expand Up @@ -68,49 +69,49 @@ let package = Package(
cxxLanguageStandard: .cxx17
)

// Add the ORT iOS Pod archive as a binary target.
// Add the ORT CocoaPods C/C++ pod archive as a binary target.
//
// There are 2 scenarios:
// - Target will be set to a released pod archive and its checksum.
//
// Release version of ORT SPM github repo:
// Target will be set to the latest released ORT iOS pod archive and its checksum.
//
// Current main of ORT SPM github repo:
// Target will be set to the pod archive built in sync with the current main objective-c source code.
// - Target will be set to a local pod archive.
// This can be used to test with the latest (not yet released) ORT Objective-C source code.

// CI or local testing where you have built/obtained the iOS Pod archive matching the current source code.
// Requires the ORT_IOS_POD_LOCAL_PATH environment variable to be set to specify the location of the pod.
if let pod_archive_path = ProcessInfo.processInfo.environment["ORT_IOS_POD_LOCAL_PATH"] {
// ORT_IOS_POD_LOCAL_PATH MUST be a path that is relative to Package.swift.
// CI or local testing where you have built/obtained the pod archive matching the current source code.
// Requires the ORT_POD_LOCAL_PATH environment variable to be set to specify the location of the pod.
if let pod_archive_path = ProcessInfo.processInfo.environment["ORT_POD_LOCAL_PATH"] {
// ORT_POD_LOCAL_PATH MUST be a path that is relative to Package.swift.
//
// To build locally, tools/ci_build/github/apple/build_and_assemble_ios_pods.py can be used
// To build locally, tools/ci_build/github/apple/build_and_assemble_apple_pods.py can be used
// See https://onnxruntime.ai/docs/build/custom.html#ios
// Example command:
// python3 tools/ci_build/github/apple/build_and_assemble_ios_pods.py \
// python3 tools/ci_build/github/apple/build_and_assemble_apple_pods.py \
// --variant Full \
// --build-settings-file tools/ci_build/github/apple/default_full_ios_framework_build_settings.json
// --build-settings-file tools/ci_build/github/apple/default_full_apple_framework_build_settings.json
//
// This should produce the pod archive in build/ios_pod_staging, and ORT_IOS_POD_LOCAL_PATH can be set to
// "build/ios_pod_staging/pod-archive-onnxruntime-c-???.zip" where '???' is replaced by the version info in the
// This should produce the pod archive in build/apple_pod_staging, and ORT_POD_LOCAL_PATH can be set to
// "build/apple_pod_staging/pod-archive-onnxruntime-c-???.zip" where '???' is replaced by the version info in the
// actual filename.
package.targets.append(Target.binaryTarget(name: "onnxruntime", path: pod_archive_path))

} else {
// ORT 1.18.0 release
// ORT release
package.targets.append(
Target.binaryTarget(name: "onnxruntime",
url: "https://download.onnxruntime.ai/pod-archive-onnxruntime-c-1.18.0.zip",
checksum: "9f196b7d09129177f529be63a91e18731ab1ccc830828e29edcbe95bd652fa5c")
url: "https://download.onnxruntime.ai/pod-archive-onnxruntime-c-1.19.0.zip",
// SHA256 checksum
checksum: "d1e052ad20a323b74d1ea233e6ee6b5a58789c7025778861cdc7a08cb6b3181a")
)
}

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_POD_LOCAL_PATH"] {
package.targets.append(Target.binaryTarget(name: "onnxruntime_extensions", path: ext_pod_archive_path))
} else {
// ORT Extensions 0.11.0 release
package.targets.append(
Target.binaryTarget(name: "onnxruntime_extensions",
url: "https://download.onnxruntime.ai/pod-archive-onnxruntime-extensions-c-0.11.0.zip",
checksum: "289e8b7847116744946003ed21e1ac9ee4897c3aca48e261238e329634c27c0a")
)
}
// ORT Extensions release
package.targets.append(
Target.binaryTarget(name: "onnxruntime_extensions",
url: "https://download.onnxruntime.ai/pod-archive-onnxruntime-extensions-c-0.12.0.zip",
// SHA256 checksum
checksum: "542be5904cf2cc93db6b8afcd11b023b001333e3151bea8bff1c7b1cf8959fab")
)
}

0 comments on commit 6493bb5

Please sign in to comment.