onnxruntime/tools/ci_build/github/azure-pipelines/mac-ios-ci-pipeline.yml
Edward Chen 7964d3aef6
Specify iOS simulator runtime version (#22474)
- Allow specification of iOS simulator runtime version to use.
- Pick simulator runtime version (iphonesimulator 16.4) that is supported by the Xcode version (14.3.1) that we use.
- Disable CoreML EP's DepthToSpace op support for CoreML version less than 7, with DCR mode, and FP16 input. It doesn't produce the correct output in this case.
- Some cleanup of iOS test infrastructure.
2024-10-18 09:26:06 -07:00

81 lines
2.5 KiB
YAML

##### start trigger Don't edit it manually, Please do edit set-trigger-rules.py ####
### please do rerun 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 ####
jobs:
- job: iOS_CI_on_Mac
pool:
vmImage: 'macOS-13'
variables:
PROTO_CACHE_DIR: $(Pipeline.Workspace)/proto_ccache
ORT_CACHE_DIR: $(Pipeline.Workspace)/ort_ccache
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)]
# Note: Keep the Xcode version and iOS simulator version compatible.
# Check the table here to see what iOS simulator versions are supported by a particular Xcode version:
# https://developer.apple.com/support/xcode/
XCODE_VERSION: 14.3.1
IOS_SIMULATOR_RUNTIME_VERSION: 16.4
timeoutInMinutes: 150
steps:
- template: templates/use-xcode-version.yml
parameters:
xcodeVersion: $(XCODE_VERSION)
- template: templates/mac-build-step-with-cache.yml
parameters:
WithCache: true
Today: $(TODAY)
AdditionalKey: onnxruntime
CacheDir: $(ORT_CACHE_DIR)
ChangeEveryCommit: true
BuildStep:
- script: |
python3 $(Build.SourcesDirectory)/tools/ci_build/build.py \
--skip_submodule_sync \
--build_dir $(Build.BinariesDirectory)/iOS \
--build_shared_lib \
--use_coreml \
--use_xnnpack \
--ios \
--apple_sysroot iphonesimulator \
--osx_arch x86_64 \
--apple_deploy_target=13.0 \
--use_xcode \
--config RelWithDebInfo \
--build_apple_framework \
--parallel --use_binskim_compliant_compile_flags
displayName: (CPU, CoreML, XNNPACK EPs) Build onnxruntime for iOS x86_64 and run tests using simulator
env:
CC: clang
CXX: clang++
CCACHE_CPP2: 1
CCACHE_DEPEND: 1
CCACHE_SLOPPINESS: modules
CCACHE_DIR: $(ORT_CACHE_DIR)
ORT_GET_SIMULATOR_DEVICE_INFO_REQUESTED_RUNTIME_VERSION: $(IOS_SIMULATOR_RUNTIME_VERSION)