From c07d49294bf4073dc7302642b9342b3a8e61a19d Mon Sep 17 00:00:00 2001 From: rachguo Date: Wed, 19 Jul 2023 14:27:05 -0700 Subject: [PATCH] address pr comments --- ...line.yml => mac-ios-swift-ci-pipeline.yml} | 47 ++++--------------- ...t-governance-component-detection-steps.yml | 4 -- README.md | 4 +- 3 files changed, 12 insertions(+), 43 deletions(-) rename .pipelines/{mac-ios-swift-packaging-pipeline.yml => mac-ios-swift-ci-pipeline.yml} (67%) diff --git a/.pipelines/mac-ios-swift-packaging-pipeline.yml b/.pipelines/mac-ios-swift-ci-pipeline.yml similarity index 67% rename from .pipelines/mac-ios-swift-packaging-pipeline.yml rename to .pipelines/mac-ios-swift-ci-pipeline.yml index bd8ca8e..516623f 100644 --- a/.pipelines/mac-ios-swift-packaging-pipeline.yml +++ b/.pipelines/mac-ios-swift-ci-pipeline.yml @@ -1,21 +1,9 @@ -parameters: -- name: BuildType - displayName: |- - Type of build. - "normal": A normal build not for publication. - type: string #TODO: add other build types here - values: - - normal - default: normal - -name: "$(Date:yyyyMMdd)$(Rev:rrr)" # build number format - stages: -- stage: SPM_IOS_Local_Packaging_Testing +- stage: SPM_IOS_Local_Pod_Testing dependsOn: [] jobs: - - job: SPMIosPackaging - displayName: "SPM iOS Packaging Local" + - job: j + displayName: "Test with latest local ORT native pod" pool: vmImage: "macOS-13" @@ -24,7 +12,7 @@ stages: xcodeVersion: "14.3" artifactsName: "ios_packaging_artifacts" #TODO: Add `_full` suffix when syncing to latest main - timeoutInMinutes: 300 + timeoutInMinutes: 60 steps: - template: templates/use-xcode-version.yml @@ -33,11 +21,12 @@ stages: # 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. - task: DownloadPipelineArtifact@2 inputs: buildType: 'specific' project: 'Lotus' - definition: 995 + definition: 995 #'definitionid' is obtained from `System.DefinitionId` of ORT CI: onnxruntime-ios-packaging-pipeline buildVersionToDownload: 'latest' branchName: 'rel-1.15.0' targetPath: '$(Build.ArtifactStagingDirectory)' @@ -67,19 +56,15 @@ stages: workingDirectory: "$(Build.SourcesDirectory)" displayName: "Print ORT iOS Pod checksum and Test Package.swift usage" - - publish: "$(Build.ArtifactStagingDirectory)/$(artifactsName)" - artifact: ios_packaging_artifacts - displayName: "Publish artifacts" - - template: templates/component-governance-component-detection-steps.yml parameters : condition : 'succeeded' -- stage: SPM_IOS_Release_Packaging_Testing +- stage: SPM_IOS_Release_Pod_Testing dependsOn: [] jobs: - - job: SPMIosPackaging - displayName: "SPM iOS Packaging Release" + - job: j + displayName: "Test with released ORT native pod" pool: vmImage: "macOS-13" @@ -87,25 +72,13 @@ stages: variables: xcodeVersion: "14.3" - timeoutInMinutes: 300 + timeoutInMinutes: 60 steps: - template: templates/use-xcode-version.yml parameters: xcodeVersion: ${{ variables.xcodeVersion }} - - script: | - set -e -x - VERSION_FILE="$(Build.SourcesDirectory)/version.txt" - SPM_POD_VERSION="$(cat "${VERSION_FILE}")" - - POD_ARCHIVE_URL="https://onnxruntimepackages.z14.web.core.windows.net/pod-archive-onnxruntime-c-${SPM_POD_VERSION}.zip" - - curl -o pod-archive-onnxruntime-c-${SPM_POD_VERSION}.zip ${POD_ARCHIVE_URL} - shasum -a 256 "pod-archive-onnxruntime-c-${SPM_POD_VERSION}.zip" - workingDirectory: "$(Build.SourcesDirectory)" - displayName: "Print ORT iOS Release Pod checksum" - - script: | set -e -x xcodebuild test -scheme onnxruntime -destination 'platform=iOS Simulator,name=iPhone 14' diff --git a/.pipelines/templates/component-governance-component-detection-steps.yml b/.pipelines/templates/component-governance-component-detection-steps.yml index daea499..fb503bc 100644 --- a/.pipelines/templates/component-governance-component-detection-steps.yml +++ b/.pipelines/templates/component-governance-component-detection-steps.yml @@ -12,7 +12,3 @@ steps: or(or(and(eq('${{parameters.condition}}', 'ci_only'), and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'Scheduled'))), and(eq('${{parameters.condition}}', 'always'), always())), and(eq('${{parameters.condition}}', 'succeeded'), succeeded())) - inputs: - # ignore dmlc-core tracker for its CI, which is not used in onnxruntime build - # ignore unit tests in emscripten. emscripten unit tests are not used in onnxruntime build - ignoreDirectories: '$(Build.SourcesDirectory)/cmake/external/emsdk/upstream/emscripten/tests' diff --git a/README.md b/README.md index 24d1a87..85af6ad 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# ONNXRuntime Swift Package Manager +# Swift Package Manager for ONNX Runtime -A light-weight [ONNXRuntime](https://github.com/microsoft/onnxruntime) repository for hosting [Swift Package Manager(SPM)](https://www.swift.org/package-manager/) support. +A light-weight repository for providing [Swift Package Manager (SPM)](https://www.swift.org/package-manager/) support for [ONNXRuntime](https://github.com/microsoft/onnxruntime). The ONNX Runtime native package is included as a binary dependency of the SPM package. SPM is the alternative to CocoaPods when desired platform to consume is mobile iOS.