From ff46084deadba12e6b3abeb826b6e4843109c250 Mon Sep 17 00:00:00 2001 From: Rachel Guo <35738743+YUNQIUGUO@users.noreply.github.com> Date: Wed, 3 Jan 2024 09:17:36 -0800 Subject: [PATCH] Add changes for configuring macos support in spm (#12) * add changes for configuring macos support in spm * test latest version downloading artifacts * update back to using latest from main * update using latestfrombranch --------- Co-authored-by: rachguo Co-authored-by: rachguo --- .pipelines/mac-ios-spm-dev-validation-pipeline.yml | 4 ++-- .../mac-ios-spm-extensions-validation-pipeline.yml | 10 ++++++---- Package.swift | 3 ++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.pipelines/mac-ios-spm-dev-validation-pipeline.yml b/.pipelines/mac-ios-spm-dev-validation-pipeline.yml index a358375..974f7cb 100644 --- a/.pipelines/mac-ios-spm-dev-validation-pipeline.yml +++ b/.pipelines/mac-ios-spm-dev-validation-pipeline.yml @@ -23,8 +23,8 @@ buildType: 'specific' project: 'Lotus' definition: 995 #'definitionid' is obtained from `System.DefinitionId` of ORT CI: onnxruntime-ios-packaging-pipeline - buildVersionToDownload: 'latest' - branchName: 'main' + buildVersionToDownload: 'latestFromBranch' + branchName: 'refs/heads/main' targetPath: '$(Build.ArtifactStagingDirectory)' - script: | diff --git a/.pipelines/mac-ios-spm-extensions-validation-pipeline.yml b/.pipelines/mac-ios-spm-extensions-validation-pipeline.yml index 91b22f8..d0ecf23 100644 --- a/.pipelines/mac-ios-spm-extensions-validation-pipeline.yml +++ b/.pipelines/mac-ios-spm-extensions-validation-pipeline.yml @@ -38,8 +38,8 @@ buildType: 'specific' project: 'Lotus' definition: 995 #'definitionid' is obtained from `System.DefinitionId` of ORT CI: onnxruntime-ios-packaging-pipeline - buildVersionToDownload: 'latest' - branchName: 'main' + buildVersionToDownload: 'latestFromBranch' + branchName: 'refs/heads/main' targetPath: '$(Build.ArtifactStagingDirectory)' - script: | @@ -54,8 +54,8 @@ buildType: 'specific' project: 'Lotus' definition: 1206 #'definitionid' is obtained from `System.DefinitionId` of extensions CI: extensions.ios_packaging - buildVersionToDownload: 'latest' - branchName: 'main' + buildVersionToDownload: 'latestFromBranch' + branchName: 'refs/heads/main' targetPath: '$(Build.ArtifactStagingDirectory)' - script: | @@ -91,6 +91,8 @@ export ORT_EXTENSIONS_IOS_POD_LOCAL_PATH="swift/${POD_ARCHIVE_EXT}" xcodebuild test -scheme onnxruntime-Package -destination 'platform=iOS Simulator,name=iPhone 14' + + xcodebuild test -scheme onnxruntime-Package -destination 'platform=macosx' rm swift/pod-archive-onnxruntime-c-*.zip rm swift/pod-archive-onnxruntime-extensions-c-*.zip diff --git a/Package.swift b/Package.swift index 1d0d410..ca502be 100644 --- a/Package.swift +++ b/Package.swift @@ -20,7 +20,8 @@ import class Foundation.ProcessInfo let package = Package( name: "onnxruntime", - platforms: [.iOS(.v12)], + platforms: [.iOS(.v12), + .macOS(.v11)], products: [ .library(name: "onnxruntime", type: .static,