address pr comments

This commit is contained in:
rachguo
2023-07-19 14:27:05 -07:00
parent ff358ee37a
commit c07d49294b
3 changed files with 12 additions and 43 deletions
@@ -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: stages:
- stage: SPM_IOS_Local_Packaging_Testing - stage: SPM_IOS_Local_Pod_Testing
dependsOn: [] dependsOn: []
jobs: jobs:
- job: SPMIosPackaging - job: j
displayName: "SPM iOS Packaging Local" displayName: "Test with latest local ORT native pod"
pool: pool:
vmImage: "macOS-13" vmImage: "macOS-13"
@@ -24,7 +12,7 @@ stages:
xcodeVersion: "14.3" xcodeVersion: "14.3"
artifactsName: "ios_packaging_artifacts" #TODO: Add `_full` suffix when syncing to latest main artifactsName: "ios_packaging_artifacts" #TODO: Add `_full` suffix when syncing to latest main
timeoutInMinutes: 300 timeoutInMinutes: 60
steps: steps:
- template: templates/use-xcode-version.yml - template: templates/use-xcode-version.yml
@@ -33,11 +21,12 @@ stages:
# 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 # 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 - task: DownloadPipelineArtifact@2
inputs: inputs:
buildType: 'specific' buildType: 'specific'
project: 'Lotus' project: 'Lotus'
definition: 995 definition: 995 #'definitionid' is obtained from `System.DefinitionId` of ORT CI: onnxruntime-ios-packaging-pipeline
buildVersionToDownload: 'latest' buildVersionToDownload: 'latest'
branchName: 'rel-1.15.0' branchName: 'rel-1.15.0'
targetPath: '$(Build.ArtifactStagingDirectory)' targetPath: '$(Build.ArtifactStagingDirectory)'
@@ -67,19 +56,15 @@ stages:
workingDirectory: "$(Build.SourcesDirectory)" workingDirectory: "$(Build.SourcesDirectory)"
displayName: "Print ORT iOS Pod checksum and Test Package.swift usage" 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 - template: templates/component-governance-component-detection-steps.yml
parameters : parameters :
condition : 'succeeded' condition : 'succeeded'
- stage: SPM_IOS_Release_Packaging_Testing - stage: SPM_IOS_Release_Pod_Testing
dependsOn: [] dependsOn: []
jobs: jobs:
- job: SPMIosPackaging - job: j
displayName: "SPM iOS Packaging Release" displayName: "Test with released ORT native pod"
pool: pool:
vmImage: "macOS-13" vmImage: "macOS-13"
@@ -87,25 +72,13 @@ stages:
variables: variables:
xcodeVersion: "14.3" xcodeVersion: "14.3"
timeoutInMinutes: 300 timeoutInMinutes: 60
steps: steps:
- template: templates/use-xcode-version.yml - template: templates/use-xcode-version.yml
parameters: parameters:
xcodeVersion: ${{ variables.xcodeVersion }} 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: | - script: |
set -e -x set -e -x
xcodebuild test -scheme onnxruntime -destination 'platform=iOS Simulator,name=iPhone 14' xcodebuild test -scheme onnxruntime -destination 'platform=iOS Simulator,name=iPhone 14'
@@ -12,7 +12,3 @@ steps:
or(or(and(eq('${{parameters.condition}}', 'ci_only'), and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'Scheduled'))), 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}}', 'always'), always())),
and(eq('${{parameters.condition}}', 'succeeded'), succeeded())) 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'
+2 -2
View File
@@ -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. SPM is the alternative to CocoaPods when desired platform to consume is mobile iOS.