onnxruntime/tools/ci_build/github/azure-pipelines/mac-ios-packaging-pipeline.yml
Changming Sun 3dd6fcc089
Upgrade min ios version to 13.0 (#20773)
To align with Office and other MS products.
Office's support policy is:
"Office for iPad and iPhone is supported on the two most recent versions
of iOS and iPadOS. When a new version of iOS or iPadOS is released, the
Office Operating System requirement becomes the two most recent
versions: the new version of iOS or iPadOS and the previous version."
(from https://products.office.com/office-system-requirements)

The latest iOS version is 17. So they support both 17 and 16. Here I set
our min iOS version to 13 so that it will be a superset of what Office
supports.

This change would allow us using C++17's std::filesystem feature in the
core framework. The modifications were generated by running
```bash
 find . -type f -exec sed -i "s/apple_deploy_target[ =]12.0/apple_deploy_target=13.0/g"  {} \;
```

Cannot use 15.0 because otherwise iOS packaging would fail with:

```
/Users/runner/work/1/b/apple_framework/intermediates/iphoneos_arm64/Release/_deps/coremltools-src/mlmodel/src/MILBlob/Util/Span.hpp:288:9: error: cannot use 'throw' with exceptions disabled
        MILVerifyIsTrue(index < Size(), std::range_error, "index out of bounds");
```

The Google OSS libraries we use only officially support iOS 15+.
2024-06-04 10:15:20 -07:00

98 lines
2.3 KiB
YAML

##### start trigger Don't edit it manually, Please do edit set-trigger-rules.py ####
trigger:
branches:
include:
- main
- rel-*
paths:
exclude:
- docs/**
- README.md
- CONTRIBUTING.md
- BUILD.md
- 'js/web'
- 'onnxruntime/core/providers/js'
pr:
branches:
include:
- main
- rel-*
paths:
exclude:
- docs/**
- README.md
- CONTRIBUTING.md
- BUILD.md
- 'js/web'
- 'onnxruntime/core/providers/js'
#### end trigger ####
parameters:
- name: buildType
displayName: |-
Type of build.
"release": A release build to be published for an official ONNX Runtime release.
"normal": A normal build. This can be published as a pre-release build for validation prior to release.
type: string
values:
- release
- normal
default: normal
name: "$(Date:yyyyMMdd)$(Rev:rrr)" # build number format
stages:
- stage: IosPackaging_SetCommonVariables
dependsOn: []
variables:
skipComponentGovernanceDetection: true
jobs:
- job: j
displayName: "Set common variables"
pool:
vmImage: "macOS-latest"
timeoutInMinutes: 5
steps:
- bash: |
set -e
BUILD_TYPE="${{ parameters.buildType }}"
BASE_VERSION="$(cat ./VERSION_NUMBER)"
SHORT_COMMIT_HASH="$(git rev-parse --short HEAD)"
DEV_VERSION="${BASE_VERSION}-dev+$(Build.BuildNumber).${SHORT_COMMIT_HASH}"
case "${BUILD_TYPE}" in
("release")
VERSION="${BASE_VERSION}" ;;
("normal")
VERSION="${DEV_VERSION}" ;;
(*)
echo "Invalid build type: ${BUILD_TYPE}"; exit 1 ;;
esac
# Do not output ##vso[] commands with `set -x` or they may be parsed again and include a trailing quote.
set +x
set_var() {
local VAR_NAME=${1:?}
local VAR_VALUE=${2:?}
echo "##vso[task.setvariable variable=${VAR_NAME};isoutput=true;isreadonly=true]${VAR_VALUE}"
echo "${VAR_NAME}: ${VAR_VALUE}"
}
set_var "ORT_POD_VERSION" "${VERSION}"
displayName: "Set common variables"
name: SetCommonVariables
- template: templates/stages/mac-ios-packaging-build-stage.yml
parameters:
packageVariant: Full
- template: templates/stages/mac-ios-packaging-build-stage.yml
parameters:
packageVariant: Training