fix
This commit is contained in:
@@ -165,32 +165,18 @@ jobs:
|
|||||||
workingDirectory: '$(Build.ArtifactStagingDirectory)/ios_packaging_artifacts_full'
|
workingDirectory: '$(Build.ArtifactStagingDirectory)/ios_packaging_artifacts_full'
|
||||||
displayName: "List staged artifacts"
|
displayName: "List staged artifacts"
|
||||||
|
|
||||||
- bash: |
|
- script: |
|
||||||
set -e -x
|
set -e -x
|
||||||
ARTIFACTS_LIST=$(ls)
|
ARTIFACTS_LIST=$(ls)
|
||||||
POD_ARCHIVE=$(echo "${ARTIFACTS_LIST}" | sed -n '3p')
|
POD_ARCHIVE=$(echo "${ARTIFACTS_LIST}" | sed -n '3p')
|
||||||
|
|
||||||
set_var() {
|
shasum -a 256 "$(Build.ArtifactStagingDirectory)/ios_packaging_artifacts_full/${POD_ARCHIVE}"
|
||||||
local VAR_NAME=${1:?}
|
|
||||||
local VAR_VALUE=${2:?}
|
|
||||||
echo "##vso[task.setvariable variable=${VAR_NAME}]${VAR_VALUE}"
|
|
||||||
echo "${VAR_NAME}: ${VAR_VALUE}"
|
|
||||||
}
|
|
||||||
|
|
||||||
set_var "POD_ARCHIVE_NAME" "${POD_ARCHIVE}"
|
|
||||||
|
|
||||||
shasum -a 256 "$(Build.ArtifactStagingDirectory)/ios_packaging_artifacts_full/$(POD_ARCHIVE_NAME)"
|
|
||||||
workingDirectory: '$(Build.ArtifactStagingDirectory)/ios_packaging_artifacts_full'
|
|
||||||
displayName: "Print ORT iOS Pod checksum"
|
|
||||||
|
|
||||||
|
|
||||||
# copy the pod archive to a path relative to Package.swift and set the env var required by Package.swift to use that.
|
# copy the pod archive to a path relative to Package.swift and set the env var required by Package.swift to use that.
|
||||||
# xcodebuild will implicitly use Package.swift and build/run the .testTarget (tests in swift/onnxTests).
|
# xcodebuild will implicitly use Package.swift and build/run the .testTarget (tests in swift/onnxTests).
|
||||||
# once that's done cleanup the copy of the pod zip file
|
# once that's done cleanup the copy of the pod zip file
|
||||||
- script: |
|
cp "$(Build.ArtifactStagingDirectory)/ios_packaging_artifacts_full/${POD_ARCHIVE}" swift/
|
||||||
set -e -x
|
export ORT_IOS_POD_LOCAL_PATH="swift/${POD_ARCHIVE}"
|
||||||
cp "$(Build.ArtifactStagingDirectory)/ios_packaging_artifacts_full/$(POD_ARCHIVE_NAME)" swift/
|
|
||||||
export ORT_IOS_POD_LOCAL_PATH="swift/$(POD_ARCHIVE_NAME)"
|
|
||||||
xcodebuild test -scheme onnxruntime -destination 'platform=iOS Simulator,name=iPhone 14'
|
xcodebuild test -scheme onnxruntime -destination 'platform=iOS Simulator,name=iPhone 14'
|
||||||
rm swift/pod-archive-onnxruntime-c-*.zip
|
rm swift/pod-archive-onnxruntime-c-*.zip
|
||||||
workingDirectory: $(Build.SourcesDirectory)
|
workingDirectory: $(Build.SourcesDirectory)
|
||||||
|
|||||||
Reference in New Issue
Block a user