Skip to content

Commit e495750

Browse files
Upgrade current MacOS-13 to 14 (#23293)
### Description Upgrade current MacOS-13 to 14 ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> - [x] Update the RN to 0.73.x+ to have the newer version of boost --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent b3aa5a3 commit e495750

17 files changed

+54
-21
lines changed

cmake/CMakePresets.json

+23
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,29 @@
109109
"rhs": "Darwin"
110110
}
111111
},
112+
{
113+
"name": "arm64-osx",
114+
"inherits": [
115+
"unit-test"
116+
],
117+
"generator": "Xcode",
118+
"binaryDir": "${sourceParentDir}/cmake_build/arm64-osx",
119+
"installDir": "${sourceParentDir}/cmake_build/out",
120+
"cacheVariables": {
121+
"CMAKE_OSX_ARCHITECTURES": "arm64",
122+
"onnxruntime_BUILD_SHARED_LIB": true,
123+
"onnxruntime_USE_XNNPACK": false,
124+
"onnxruntime_USE_COREML": true,
125+
"onnxruntime_BUILD_OBJC": true,
126+
"onnxruntime_BUILD_APPLE_FRAMEWORK": true,
127+
"CMAKE_CONFIGURATION_TYPES": "Debug;Release"
128+
},
129+
"condition": {
130+
"type": "equals",
131+
"lhs": "${hostSystemName}",
132+
"rhs": "Darwin"
133+
}
134+
},
112135
{
113136
"name": "x64-osx-vcpkg",
114137
"inherits": [

js/react_native/e2e/.detoxrc.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ module.exports = {
3838
simulator: {
3939
type: 'ios.simulator',
4040
device: {
41-
type: 'iPhone 14',
42-
os: 'iOS 16.4',
41+
type: 'iPhone 15',
42+
os: 'iOS 17.4',
4343
},
4444
},
4545
attached: {

onnxruntime/core/providers/coreml/builders/impl/base_op_builder.cc

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "core/providers/coreml/builders/helper.h"
77
#include "core/providers/coreml/builders/impl/base_op_builder.h"
88
#include "core/providers/coreml/builders/model_builder.h"
9+
#include "core/providers/coreml/model/host_utils.h"
910
#include "core/providers/shared/utils/utils.h"
1011

1112
using namespace CoreML::Specification;
@@ -113,10 +114,12 @@ bool BaseOpBuilder::IsInputDtypeSupport(const Node& node, size_t idx,
113114
return true;
114115
}
115116

117+
#if CAN_BUILD_COREML6_OR_LATER
116118
// only MLProgram support FP16
117119
if (input_params.create_mlprogram && input_type == ONNX_NAMESPACE::TensorProto_DataType_FLOAT16) {
118120
return true;
119121
}
122+
#endif
120123

121124
LOGS(logger, VERBOSE) << "[" << node.OpType() << "] Input type: [" << input_type << "] is not currently supported";
122125
return false;

onnxruntime/core/providers/coreml/model/host_utils.h

+7-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@
4343
#define API_AVAILABLE_COREML7 API_AVAILABLE(macos(14), ios(17))
4444
#define API_AVAILABLE_COREML8 API_AVAILABLE(macos(15), ios(18))
4545

46-
// @available is used in implementation code
46+
// The previous macros are used in header files to declare the availability of the APIs.
47+
// The following macros are used in build time checks to determine if the APIs are available.
48+
#define CAN_BUILD_COREML8_OR_LATER (__MAC_OS_X_VERSION_MAX_ALLOWED >= 150000 && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180000)
49+
#define CAN_BUILD_COREML7_OR_LATER (__MAC_OS_X_VERSION_MAX_ALLOWED >= 140000 && __IPHONE_OS_VERSION_MAX_ALLOWED >= 170000)
50+
#define CAN_BUILD_COREML6_OR_LATER (__MAC_OS_X_VERSION_MAX_ALLOWED >= 130000 && __IPHONE_OS_VERSION_MAX_ALLOWED >= 160000)
51+
52+
// @available is used in implementation code to check the availability of the APIs at runtime.
4753
// Base required OS to run CoreML Specification Version 4 (Core ML 3)
4854
#define HAS_COREML3_OR_LATER @available(macOS 10.15, iOS 13, *)
4955
#define HAS_COREML4_OR_LATER @available(macOS 11, iOS 14, *)

onnxruntime/core/providers/coreml/model/model.mm

+1-2
Original file line numberDiff line numberDiff line change
@@ -363,13 +363,12 @@ void ProfileComputePlan(NSURL* compileUrl, MLModelConfiguration* config) {
363363
#endif
364364
}
365365

366-
#if __has_include(<CoreML/MLOptimizationHints.h>)
366+
#if __has_include(<CoreML/MLOptimizationHints.h>) && CAN_BUILD_COREML8_OR_LATER
367367
#define HAS_COREMLOPTIMIZATIONHINT 1
368368
#else
369369
#define HAS_COREMLOPTIMIZATIONHINT 0
370370
#endif
371371

372-
API_AVAILABLE_COREML8
373372
void ConfigureOptimizationHints(MLModelConfiguration* config, const CoreMLOptions& coreml_options) {
374373
#if HAS_COREMLOPTIMIZATIONHINT
375374
MLOptimizationHints* optimizationHints = [[MLOptimizationHints alloc] init];

tools/ci_build/github/azure-pipelines/mac-ios-packaging-pipeline.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ extends:
5656
# Update the pool with your team's 1ES hosted pool.
5757
pool:
5858
name: "Azure Pipelines"
59-
image: "macOS-13"
59+
image: "macOS-14"
6060
os: macOS
6161
sdl:
6262
sourceAnalysisPool:

tools/ci_build/github/azure-pipelines/nodejs/templates/test_macos.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ stages:
1111
clean: all
1212
timeoutInMinutes: 120
1313
pool:
14-
vmImage: 'macOS-13'
14+
vmImage: 'macOS-14'
1515

1616
variables:
1717
- name: OnnxRuntimeBuildDirectory

tools/ci_build/github/azure-pipelines/nuget/templates/test_macos.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ stages:
1111
workspace:
1212
clean: all
1313
pool:
14-
vmImage: 'macOS-13'
14+
vmImage: 'macOS-14'
1515

1616
variables:
1717
- name: OnnxRuntimeBuildDirectory

tools/ci_build/github/azure-pipelines/post-merge-jobs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ stages:
427427
- job: IosDynamicFramework
428428
timeoutInMinutes: 120
429429
pool:
430-
vmImage: "macOS-13"
430+
vmImage: "macOS-14"
431431

432432
steps:
433433
- task: UsePythonVersion@0
@@ -463,7 +463,7 @@ stages:
463463
- job: IosMinimalTrainingBuild
464464
timeoutInMinutes: 120
465465
pool:
466-
vmImage: "macOS-13"
466+
vmImage: "macOS-14"
467467

468468
steps:
469469
- task: UsePythonVersion@0

tools/ci_build/github/azure-pipelines/py-package-test-pipeline.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ stages:
2929
parameters:
3030
job_name: Test_MAC_Wheels
3131
machine_pool:
32-
vmImage: 'macOS-13'
32+
vmImage: 'macOS-14'
3333
itemPattern: '*/*mac*x86_64.whl'
3434
arch: 'x86_64'
3535
- template: templates/py-package-smoking-test.yml

tools/ci_build/github/azure-pipelines/stages/py-cpu-packaging-stage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ stages:
201201
clean: all
202202
pool:
203203
name: "Azure Pipelines"
204-
image: "macOS-13"
204+
image: "macOS-14"
205205
os: macOS
206206
variables:
207207
MACOSX_DEPLOYMENT_TARGET: '13.3'

tools/ci_build/github/azure-pipelines/templates/android-java-api-aar-test.yml

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
pool: 'onnxruntime-Ubuntu2204-AMD-CPU'
2525
workspace:
2626
clean: all
27+
pool:
28+
vmImage: 'macOS-14'
2729
variables:
2830
runCodesignValidationInjection: false
2931
ANDROID_AVD_HOME: $(Agent.TempDirectory)

tools/ci_build/github/azure-pipelines/templates/c-api-cpu.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ stages:
117117
workspace:
118118
clean: all
119119
pool:
120-
vmImage: 'macOS-13'
120+
vmImage: 'macOS-14'
121121
timeoutInMinutes: 300
122122
steps:
123123
- template: set-version-number-variables-step.yml
@@ -788,7 +788,7 @@ stages:
788788

789789
- template: ../nuget/templates/test_macos.yml
790790
parameters:
791-
AgentPool : macOS-13
791+
AgentPool : macOS-14
792792
ArtifactSuffix: 'CPU'
793793

794794
- template: ../nodejs/templates/test_win.yml
@@ -824,4 +824,4 @@ stages:
824824
OS: MacOS
825825
BuildId: ${{ parameters.BuildId }}
826826
SpecificArtifact: ${{ parameters.SpecificArtifact }}
827-
PoolName: 'macOS-13'
827+
PoolName: 'macOS-14'

tools/ci_build/github/azure-pipelines/templates/mac-cpu-packaging-pipeline.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ stages:
6868
jobs:
6969
- job: MacOS_C_API_Package_Publish
7070
pool:
71-
vmImage: 'macOS-13'
71+
vmImage: 'macOS-14'
7272
steps:
7373
- checkout: none
7474
- template: flex-downloadPipelineArtifact.yml

tools/ci_build/github/azure-pipelines/templates/mac-cpu-packing-jobs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
PROTO_CACHE_DIR: $(Pipeline.Workspace)/ccache_proto
3838
ORT_CACHE_DIR: $(Pipeline.Workspace)/ccache_ort
3939
pool:
40-
vmImage: 'macOS-13'
40+
vmImage: 'macOS-14'
4141
timeoutInMinutes: 300
4242
steps:
4343
- checkout: self

tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ stages:
6464
- job: ReactNative_CI_iOS
6565
${{ if eq(parameters.is1ES, false) }}:
6666
pool:
67-
vmImage: 'macOS-13'
67+
vmImage: 'macOS-14'
6868
${{ if eq(parameters.is1ES, true) }}:
6969
pool:
7070
name: 'Azure Pipelines'
71-
image: 'macOS-13'
71+
image: 'macOS-14'
7272
os: 'macOS'
7373

7474
timeoutInMinutes: 120
@@ -212,7 +212,7 @@ stages:
212212
scheme: 'OnnxruntimeModuleTest'
213213
packageApp: false
214214
destinationPlatformOption: 'iOS'
215-
destinationSimulators: 'iPhone 14,OS=16.4'
215+
destinationSimulators: 'iPhone 15,OS=17.4'
216216
workingDirectory: '$(Build.SourcesDirectory)/js/react_native/ios'
217217
xcprettyArgs: '--output build/reports/test-results.xml'
218218
publishJUnitResults: true

tools/ci_build/github/azure-pipelines/templates/use-xcode-version.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
parameters:
44
- name: xcodeVersion
55
type: string
6-
default: "14.3.1"
6+
default: "15.3.0"
77

88
steps:
99
- bash: |

0 commit comments

Comments
 (0)