From fa68ae2deffbf3d509d93b42ed48c092f38512fb Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Tue, 17 Sep 2024 10:07:30 -0700 Subject: [PATCH] Update pool to MacOS-13 (#17361) ### Description See https://github.com/microsoft/onnxruntime-extensions/pull/476 and https://github.com/actions/runner-images/issues/7671 ### Motivation and Context ### Current issue - [ ] For default xcode 15.2, that come with the MacOS-13, We Need to update the boost container header boost/container_hash/hash.hpp version to pass the build - [x] For xcode 14.2 The Build passed but the `Run React Native Detox Android e2e Test` Failed. Possible flaky test, https://github.com/microsoft/onnxruntime/pull/21969 - [x] For xcode 14.3.1 We encountered following issue in `Build React Native Detox iOS e2e Tests` ``` ld: file not found: /Applications/Xcode_14.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` Applied following code to the eof in both ios/Podfile and fixed the issue ``` post_install do |installer| installer.generated_projects.each do |project| project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' end end end end ``` - [x] https://github.com/facebook/react-native/issues/32483 Applying changes to ios/Pofile ``` pre_install do |installer| # Custom pre-install script or commands puts "Running pre-install script..." # Recommended fix for https://github.com/facebook/react-native/issues/32483 # from https://github.com/facebook/react-native/issues/32483#issuecomment-966784501 system("sed -i '' 's/typedef uint8_t clockid_t;//' \"${SRCROOT}/Pods/RCT-Folly/folly/portability/Time.h\"") end ``` - [ ] Detox environment setting up exceeded time out of 120000ms during iso e2e test ### dependent - [x] https://github.com/microsoft/onnxruntime/pull/21159 --------- Co-authored-by: Changming Sun --- js/react_native/e2e/.detoxrc.js | 3 ++- .../project.pbxproj | 12 ++++++----- js/react_native/e2e/ios/Podfile | 18 +++++++++++++++++ .../project.pbxproj | 15 ++++++++------ js/react_native/ios/Podfile | 19 ++++++++++++++++++ .../project.pbxproj | 20 +++++++++---------- ...t_full_apple_framework_build_settings.json | 2 +- ...ndroid-x86_64-crosscompile-ci-pipeline.yml | 12 +++++------ .../mac-coreml-ci-pipeline.yml | 6 ++---- .../azure-pipelines/mac-ios-ci-pipeline.yml | 5 ++--- .../mac-ios-packaging-pipeline.yml | 2 +- .../nodejs/templates/test_macos.yml | 2 +- .../nuget/templates/test_macos.yml | 2 +- .../azure-pipelines/post-merge-jobs.yml | 8 ++------ .../py-package-test-pipeline.yml | 2 +- .../templates/android-java-api-aar-test.yml | 8 +++----- .../azure-pipelines/templates/c-api-cpu.yml | 8 +++----- .../templates/mac-cpu-packaging-pipeline.yml | 4 ++-- .../templates/mac-cpu-packing-jobs.yml | 6 ++---- .../templates/py-packaging-stage.yml | 6 ++---- .../templates/react-native-ci.yml | 20 ++++++++++--------- .../stages/mac-ios-packaging-build-stage.yml | 6 ++---- .../templates/use-xcode-version.yml | 2 +- 23 files changed, 108 insertions(+), 80 deletions(-) diff --git a/js/react_native/e2e/.detoxrc.js b/js/react_native/e2e/.detoxrc.js index e24833a1d09c9..0792c3d528585 100644 --- a/js/react_native/e2e/.detoxrc.js +++ b/js/react_native/e2e/.detoxrc.js @@ -38,7 +38,8 @@ module.exports = { simulator: { type: 'ios.simulator', device: { - type: 'iPhone 13', + type: 'iPhone 14', + os: 'iOS 16.4', }, }, attached: { diff --git a/js/react_native/e2e/ios/OnnxruntimeModuleExample.xcodeproj/project.pbxproj b/js/react_native/e2e/ios/OnnxruntimeModuleExample.xcodeproj/project.pbxproj index f2e4a791eae57..b7c38547d67e1 100644 --- a/js/react_native/e2e/ios/OnnxruntimeModuleExample.xcodeproj/project.pbxproj +++ b/js/react_native/e2e/ios/OnnxruntimeModuleExample.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -322,6 +322,7 @@ DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; INFOPLIST_FILE = OnnxruntimeModuleExample/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "$(inherited)", @@ -344,6 +345,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = OnnxruntimeModuleExample/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "$(inherited)", @@ -405,7 +407,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; "HEADER_SEARCH_PATHS[arch=*]" = ""; - IPHONEOS_DEPLOYMENT_TARGET = 14.4; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; LIBRARY_SEARCH_PATHS = ( "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", @@ -458,7 +460,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.4; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; LIBRARY_SEARCH_PATHS = ( "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", @@ -486,7 +488,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.2; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -514,7 +516,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.2; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MARKETING_VERSION = 1.0; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = ai.onnxruntime.reactnative.OnnxruntimeModuleExampleUITests; diff --git a/js/react_native/e2e/ios/Podfile b/js/react_native/e2e/ios/Podfile index d31a6f50221fb..0272c23092838 100644 --- a/js/react_native/e2e/ios/Podfile +++ b/js/react_native/e2e/ios/Podfile @@ -3,6 +3,15 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ platform :ios, '13.0' +pre_install do |installer| + # Custom pre-install script or commands + puts "Running pre-install script..." + + # Recommended fix for https://github.com/facebook/react-native/issues/32483 + # from https://github.com/facebook/react-native/issues/32483#issuecomment-966784501 + system("sed -i '' 's/typedef uint8_t clockid_t;//' \"./Pods/RCT-Folly/folly/portability/Time.h\"") +end + target 'OnnxruntimeModuleExample' do config = use_native_modules! @@ -19,3 +28,12 @@ target 'OnnxruntimeModuleExample' do inherit! :search_paths end +post_install do |installer| + installer.generated_projects.each do |project| + project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' + end + end + end +end \ No newline at end of file diff --git a/js/react_native/ios/OnnxruntimeModule.xcodeproj/project.pbxproj b/js/react_native/ios/OnnxruntimeModule.xcodeproj/project.pbxproj index 2a093b2b89c95..f11bc73687098 100644 --- a/js/react_native/ios/OnnxruntimeModule.xcodeproj/project.pbxproj +++ b/js/react_native/ios/OnnxruntimeModule.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -189,7 +189,8 @@ 58B511D31A9E6C8500147676 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0920; + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1540; ORGANIZATIONNAME = Facebook; TargetAttributes = { 58B511DA1A9E6C8500147676 = { @@ -420,7 +421,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; "HEADER_SEARCH_PATHS[arch=*]" = ""; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LIBRARY_SEARCH_PATHS = ""; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; @@ -465,7 +466,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; "HEADER_SEARCH_PATHS[arch=*]" = ""; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LIBRARY_SEARCH_PATHS = ""; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; @@ -484,6 +485,7 @@ "$(SRCROOT)/../../react-native/React/**", ); "HEADER_SEARCH_PATHS[arch=*]" = "\"$(PODS_ROOT)/onnxruntime/onnxruntime.framework/Headers\""; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -508,6 +510,7 @@ "$(SRCROOT)/../../react-native/React/**", ); "HEADER_SEARCH_PATHS[arch=*]" = "\"$(PODS_ROOT)/onnxruntime/onnxruntime.framework/Headers\""; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -582,7 +585,7 @@ "$(PROJECT_DIR)", ); INFOPLIST_FILE = OnnxruntimeModuleTest/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.4; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = "$(inherited)"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; @@ -656,7 +659,7 @@ "$(PROJECT_DIR)", ); INFOPLIST_FILE = OnnxruntimeModuleTest/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.4; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = "$(inherited)"; MTL_FAST_MATH = YES; diff --git a/js/react_native/ios/Podfile b/js/react_native/ios/Podfile index 53c83948672a3..ad8a5ce3b2d5f 100644 --- a/js/react_native/ios/Podfile +++ b/js/react_native/ios/Podfile @@ -3,6 +3,15 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ platform :ios, '13.0' +pre_install do |installer| + # Custom pre-install script or commands + puts "Running pre-install script..." + + # Recommended fix for https://github.com/facebook/react-native/issues/32483 + # from https://github.com/facebook/react-native/issues/32483#issuecomment-966784501 + system("sed -i '' 's/typedef uint8_t clockid_t;//' \"./Pods/RCT-Folly/folly/portability/Time.h\"") +end + def shared config = use_native_modules! @@ -29,3 +38,13 @@ end target 'OnnxruntimeModuleTest' do shared end + +post_install do |installer| + installer.generated_projects.each do |project| + project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' + end + end + end +end \ No newline at end of file diff --git a/onnxruntime/test/platform/apple/apple_package_test/apple_package_test.xcodeproj/project.pbxproj b/onnxruntime/test/platform/apple/apple_package_test/apple_package_test.xcodeproj/project.pbxproj index eb7345be3770b..e9536bb59bbae 100644 --- a/onnxruntime/test/platform/apple/apple_package_test/apple_package_test.xcodeproj/project.pbxproj +++ b/onnxruntime/test/platform/apple/apple_package_test/apple_package_test.xcodeproj/project.pbxproj @@ -456,7 +456,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MACOSX_DEPLOYMENT_TARGET = 11.0; + MACOSX_DEPLOYMENT_TARGET = 13.3; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -510,7 +510,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MACOSX_DEPLOYMENT_TARGET = 11.0; + MACOSX_DEPLOYMENT_TARGET = 13.3; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; @@ -527,7 +527,7 @@ CODE_SIGNING_STYLE = Automatic; CODE_SIGN_ENTITLEMENTS = ios_package_test/ios_package_test.entitlements; INFOPLIST_FILE = ios_package_test/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -550,7 +550,7 @@ CODE_SIGNING_STYLE = Automatic; CODE_SIGN_ENTITLEMENTS = ios_package_test/ios_package_test.entitlements; INFOPLIST_FILE = ios_package_test/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -571,7 +571,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -593,7 +593,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -631,7 +631,7 @@ "@executable_path/../Frameworks", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MACOSX_DEPLOYMENT_TARGET = 11.0; + MACOSX_DEPLOYMENT_TARGET = 13.3; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = "ai.onnxruntime.tests.macos-package-test"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -663,7 +663,7 @@ "@executable_path/../Frameworks", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MACOSX_DEPLOYMENT_TARGET = 11.0; + MACOSX_DEPLOYMENT_TARGET = 13.3; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = "ai.onnxruntime.tests.macos-package-test"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -684,7 +684,7 @@ GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MACOSX_DEPLOYMENT_TARGET = 11.0; + MACOSX_DEPLOYMENT_TARGET = 13.3; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = "ai.onnxruntime.tests.macos-package-testUITests"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -706,7 +706,7 @@ GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MACOSX_DEPLOYMENT_TARGET = 11.0; + MACOSX_DEPLOYMENT_TARGET = 13.3; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = "ai.onnxruntime.tests.macos-package-testUITests"; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/tools/ci_build/github/apple/default_full_apple_framework_build_settings.json b/tools/ci_build/github/apple/default_full_apple_framework_build_settings.json index 84d7e355ed5b4..f2d034dbfc000 100644 --- a/tools/ci_build/github/apple/default_full_apple_framework_build_settings.json +++ b/tools/ci_build/github/apple/default_full_apple_framework_build_settings.json @@ -24,7 +24,7 @@ ], "macosx": [ "--macos=MacOSX", - "--apple_deploy_target=11.0" + "--apple_deploy_target=13.3" ], "iphoneos": [ "--ios", diff --git a/tools/ci_build/github/azure-pipelines/android-x86_64-crosscompile-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/android-x86_64-crosscompile-ci-pipeline.yml index 41ff365a65d49..a0ae0441f2824 100644 --- a/tools/ci_build/github/azure-pipelines/android-x86_64-crosscompile-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/android-x86_64-crosscompile-ci-pipeline.yml @@ -70,9 +70,9 @@ stages: versionSpec: $(pythonVersion) - task: JavaToolInstaller@0 - displayName: Use jdk 11 + displayName: Use jdk 17 inputs: - versionSpec: '11' + versionSpec: '17' jdkArchitectureOption: 'x64' jdkSourceOption: 'PreInstalled' @@ -131,9 +131,9 @@ stages: versionSpec: $(pythonVersion) - task: JavaToolInstaller@0 - displayName: Use jdk 11 + displayName: Use jdk 17 inputs: - versionSpec: '11' + versionSpec: '17' jdkArchitectureOption: 'x64' jdkSourceOption: 'PreInstalled' @@ -195,9 +195,9 @@ stages: versionSpec: $(pythonVersion) - task: JavaToolInstaller@0 - displayName: Use jdk 11 + displayName: Use jdk 17 inputs: - versionSpec: '11' + versionSpec: '17' jdkArchitectureOption: 'x64' jdkSourceOption: 'PreInstalled' diff --git a/tools/ci_build/github/azure-pipelines/mac-coreml-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/mac-coreml-ci-pipeline.yml index c16adc6221ed0..a1059bb3c314e 100644 --- a/tools/ci_build/github/azure-pipelines/mac-coreml-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/mac-coreml-ci-pipeline.yml @@ -33,9 +33,9 @@ jobs: workspace: clean: all pool: - vmImage: 'macOS-latest' + vmImage: 'macOS-13' variables: - MACOSX_DEPLOYMENT_TARGET: '11.0' + MACOSX_DEPLOYMENT_TARGET: '13.3' TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)] CCACHE_DIR: '$(Pipeline.Workspace)/ccache' timeoutInMinutes: 120 @@ -44,8 +44,6 @@ jobs: displayName: Install coreutils and ninja - template: templates/use-xcode-version.yml - parameters: - xcodeVersion: 14.2 - template: templates/mac-build-step-with-cache.yml parameters: diff --git a/tools/ci_build/github/azure-pipelines/mac-ios-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/mac-ios-ci-pipeline.yml index 74211bc5dbd7c..c61beb63b8b40 100644 --- a/tools/ci_build/github/azure-pipelines/mac-ios-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/mac-ios-ci-pipeline.yml @@ -31,7 +31,7 @@ pr: jobs: - job: iOS_CI_on_Mac pool: - vmImage: 'macOS-latest' + vmImage: 'macOS-13' variables: PROTO_CACHE_DIR: $(Pipeline.Workspace)/proto_ccache ORT_CACHE_DIR: $(Pipeline.Workspace)/ort_ccache @@ -39,8 +39,7 @@ jobs: timeoutInMinutes: 150 steps: - template: templates/use-xcode-version.yml - parameters: - xcodeVersion: 14.2 + - template: templates/mac-build-step-with-cache.yml parameters: WithCache: true diff --git a/tools/ci_build/github/azure-pipelines/mac-ios-packaging-pipeline.yml b/tools/ci_build/github/azure-pipelines/mac-ios-packaging-pipeline.yml index abd1004a830e0..c3176ec54fd79 100644 --- a/tools/ci_build/github/azure-pipelines/mac-ios-packaging-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/mac-ios-packaging-pipeline.yml @@ -54,7 +54,7 @@ stages: displayName: "Set common variables" pool: - vmImage: "macOS-latest" + vmImage: "macOS-13" timeoutInMinutes: 5 diff --git a/tools/ci_build/github/azure-pipelines/nodejs/templates/test_macos.yml b/tools/ci_build/github/azure-pipelines/nodejs/templates/test_macos.yml index 53923e0b4432a..4518a168879a2 100644 --- a/tools/ci_build/github/azure-pipelines/nodejs/templates/test_macos.yml +++ b/tools/ci_build/github/azure-pipelines/nodejs/templates/test_macos.yml @@ -11,7 +11,7 @@ stages: clean: all timeoutInMinutes: 120 pool: - vmImage: 'macOS-latest' + vmImage: 'macOS-13' variables: - name: OnnxRuntimeBuildDirectory diff --git a/tools/ci_build/github/azure-pipelines/nuget/templates/test_macos.yml b/tools/ci_build/github/azure-pipelines/nuget/templates/test_macos.yml index c977e17aada9d..07d21333270a8 100644 --- a/tools/ci_build/github/azure-pipelines/nuget/templates/test_macos.yml +++ b/tools/ci_build/github/azure-pipelines/nuget/templates/test_macos.yml @@ -11,7 +11,7 @@ stages: workspace: clean: all pool: - vmImage: 'macOS-latest' + vmImage: 'macOS-13' variables: - name: OnnxRuntimeBuildDirectory diff --git a/tools/ci_build/github/azure-pipelines/post-merge-jobs.yml b/tools/ci_build/github/azure-pipelines/post-merge-jobs.yml index e13f1c20b37ce..3853bdbd1eb88 100644 --- a/tools/ci_build/github/azure-pipelines/post-merge-jobs.yml +++ b/tools/ci_build/github/azure-pipelines/post-merge-jobs.yml @@ -425,7 +425,7 @@ stages: - job: IosDynamicFramework timeoutInMinutes: 120 pool: - vmImage: "macOS-latest" + vmImage: "macOS-13" steps: - task: UsePythonVersion@0 @@ -435,8 +435,6 @@ stages: architecture: "x64" - template: templates/use-xcode-version.yml - parameters: - xcodeVersion: 14.2 - script: | pip install -r tools/ci_build/github/apple/ios_packaging/requirements.txt @@ -463,7 +461,7 @@ stages: - job: IosMinimalTrainingBuild timeoutInMinutes: 120 pool: - vmImage: "macOS-latest" + vmImage: "macOS-13" steps: - task: UsePythonVersion@0 @@ -473,8 +471,6 @@ stages: architecture: "x64" - template: templates/use-xcode-version.yml - parameters: - xcodeVersion: 14.2 - script: | pip install -r tools/ci_build/github/apple/ios_packaging/requirements.txt diff --git a/tools/ci_build/github/azure-pipelines/py-package-test-pipeline.yml b/tools/ci_build/github/azure-pipelines/py-package-test-pipeline.yml index dced61670e34a..de2677ebc6594 100644 --- a/tools/ci_build/github/azure-pipelines/py-package-test-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/py-package-test-pipeline.yml @@ -29,7 +29,7 @@ stages: parameters: job_name: Test_MAC_Wheels machine_pool: - vmImage: 'macOS-latest' + vmImage: 'macOS-13' itemPattern: '*/*mac*x86_64.whl' - template: templates/py-package-smoking-test.yml parameters: diff --git a/tools/ci_build/github/azure-pipelines/templates/android-java-api-aar-test.yml b/tools/ci_build/github/azure-pipelines/templates/android-java-api-aar-test.yml index 6971488478ed0..7fa548240f865 100644 --- a/tools/ci_build/github/azure-pipelines/templates/android-java-api-aar-test.yml +++ b/tools/ci_build/github/azure-pipelines/templates/android-java-api-aar-test.yml @@ -19,9 +19,7 @@ jobs: workspace: clean: all pool: - # We need macOS-12 to run the Android emulator for now. - # https://github.com/actions/runner-images/issues/7671 - vmImage: 'macOS-12' + vmImage: 'macOS-13' variables: - name: runCodesignValidationInjection value: false @@ -39,9 +37,9 @@ jobs: targetPath: '$(Build.BinariesDirectory)/final-android-aar' - task: JavaToolInstaller@0 - displayName: Use jdk 11 + displayName: Use jdk 17 inputs: - versionSpec: '11' + versionSpec: '17' jdkArchitectureOption: 'x64' jdkSourceOption: 'PreInstalled' diff --git a/tools/ci_build/github/azure-pipelines/templates/c-api-cpu.yml b/tools/ci_build/github/azure-pipelines/templates/c-api-cpu.yml index 8b4fe66465bb1..3e90a401d4deb 100644 --- a/tools/ci_build/github/azure-pipelines/templates/c-api-cpu.yml +++ b/tools/ci_build/github/azure-pipelines/templates/c-api-cpu.yml @@ -83,14 +83,12 @@ stages: workspace: clean: all pool: - vmImage: 'macOS-latest' + vmImage: 'macOS-13' timeoutInMinutes: 300 steps: - template: set-version-number-variables-step.yml - template: use-xcode-version.yml - parameters: - xcodeVersion: 14.2 - template: download-deps.yml @@ -782,7 +780,7 @@ stages: - template: ../nuget/templates/test_macos.yml parameters: - AgentPool : macOS-latest + AgentPool : macOS-13 ArtifactSuffix: 'CPU' - template: ../nodejs/templates/test_win.yml @@ -818,4 +816,4 @@ stages: OS: MacOS BuildId: ${{ parameters.BuildId }} SpecificArtifact: ${{ parameters.SpecificArtifact }} - PoolName: 'macOS-latest' + PoolName: 'macOS-13' diff --git a/tools/ci_build/github/azure-pipelines/templates/mac-cpu-packaging-pipeline.yml b/tools/ci_build/github/azure-pipelines/templates/mac-cpu-packaging-pipeline.yml index 945fbb7c4a094..1b1080034948e 100644 --- a/tools/ci_build/github/azure-pipelines/templates/mac-cpu-packaging-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/templates/mac-cpu-packaging-pipeline.yml @@ -69,9 +69,9 @@ stages: - job: MacOS_C_API_Package_Publish pool: ${{ if eq(parameters.DoESRP, true)}}: - vmImage: 'macOS-12' + vmImage: 'macOS-13' ${{ else }}: - vmImage: 'macOS-latest' + vmImage: 'macOS-13' steps: - checkout: none - template: flex-downloadPipelineArtifact.yml diff --git a/tools/ci_build/github/azure-pipelines/templates/mac-cpu-packing-jobs.yml b/tools/ci_build/github/azure-pipelines/templates/mac-cpu-packing-jobs.yml index 01ec3b5a2f8ca..3b661d9eb2dc6 100644 --- a/tools/ci_build/github/azure-pipelines/templates/mac-cpu-packing-jobs.yml +++ b/tools/ci_build/github/azure-pipelines/templates/mac-cpu-packing-jobs.yml @@ -31,13 +31,13 @@ jobs: workspace: clean: all variables: - MACOSX_DEPLOYMENT_TARGET: '11.0' + MACOSX_DEPLOYMENT_TARGET: '13.3' ALLOW_RELEASED_ONNX_OPSET_ONLY: ${{ parameters.AllowReleasedOpsetOnly }} TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)] PROTO_CACHE_DIR: $(Pipeline.Workspace)/ccache_proto ORT_CACHE_DIR: $(Pipeline.Workspace)/ccache_ort pool: - vmImage: 'macOS-latest' + vmImage: 'macOS-13' timeoutInMinutes: 300 steps: - checkout: self @@ -61,8 +61,6 @@ jobs: - template: set-version-number-variables-step.yml - template: use-xcode-version.yml - parameters: - xcodeVersion: 14.2 - template: download-deps.yml diff --git a/tools/ci_build/github/azure-pipelines/templates/py-packaging-stage.yml b/tools/ci_build/github/azure-pipelines/templates/py-packaging-stage.yml index 2701852f4601d..451e5ad2d44c7 100644 --- a/tools/ci_build/github/azure-pipelines/templates/py-packaging-stage.yml +++ b/tools/ci_build/github/azure-pipelines/templates/py-packaging-stage.yml @@ -398,9 +398,9 @@ stages: workspace: clean: all pool: - vmImage: 'macOS-latest' + vmImage: 'macOS-13' variables: - MACOSX_DEPLOYMENT_TARGET: '11.0' + MACOSX_DEPLOYMENT_TARGET: '13.3' strategy: matrix: Python38: @@ -424,8 +424,6 @@ stages: versionSpec: $(PythonVersion) - template: use-xcode-version.yml - parameters: - xcodeVersion: 14.2 - template: download-deps.yml diff --git a/tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml b/tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml index 46dc867113a2e..5fea265d59392 100644 --- a/tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml +++ b/tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml @@ -41,7 +41,7 @@ stages: - job: Build_Ios_Pod_For_React_Native pool: - vmImage: 'macOS-12' + vmImage: 'macOS-13' timeoutInMinutes: 90 @@ -52,7 +52,6 @@ stages: steps: - template: use-xcode-version.yml - - task: UsePythonVersion@0 displayName: Use python 3.9 inputs: @@ -99,9 +98,7 @@ stages: jobs: - job: ReactNative_CI pool: - # We need macOS-12 to run the Android emulator for now. - # https://github.com/actions/runner-images/issues/7671 - vmImage: 'macOS-12' + vmImage: 'macOS-13' variables: runCodesignValidationInjection: false timeoutInMinutes: 90 @@ -109,7 +106,7 @@ stages: - task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3 displayName: Clean Agent Directories condition: always() - + - template: use-xcode-version.yml - task: UsePythonVersion@0 displayName: Use python 3.9 inputs: @@ -118,9 +115,9 @@ stages: architecture: "x64" - task: JavaToolInstaller@0 - displayName: Use jdk 11 + displayName: Use jdk 17 inputs: - versionSpec: '11' + versionSpec: '17' jdkArchitectureOption: 'x64' jdkSourceOption: 'PreInstalled' @@ -304,7 +301,7 @@ stages: scheme: 'OnnxruntimeModuleTest' packageApp: false destinationPlatformOption: 'iOS' - destinationSimulators: 'iPhone 13,OS=latest' + destinationSimulators: 'iPhone 14,OS=16.4' workingDirectory: '$(Build.SourcesDirectory)/js/react_native/ios' xcprettyArgs: '--output build/reports/test-results.xml' publishJUnitResults: true @@ -319,6 +316,11 @@ stages: condition: succeededOrFailed() displayName: Publish React Native iOS Instrumented Test Results + - script: | + xcrun simctl list devices + displayName: List iOS Simulators + continueOnError: true + - script: | JEST_JUNIT_OUTPUT_FILE=$(Build.SourcesDirectory)/js/react_native/e2e/ios-test-results.xml \ detox test --record-logs all \ diff --git a/tools/ci_build/github/azure-pipelines/templates/stages/mac-ios-packaging-build-stage.yml b/tools/ci_build/github/azure-pipelines/templates/stages/mac-ios-packaging-build-stage.yml index d43f277739d99..e27de27036130 100644 --- a/tools/ci_build/github/azure-pipelines/templates/stages/mac-ios-packaging-build-stage.yml +++ b/tools/ci_build/github/azure-pipelines/templates/stages/mac-ios-packaging-build-stage.yml @@ -15,10 +15,10 @@ stages: displayName: "Build iOS package for variant: ${{ parameters.packageVariant}}" pool: - vmImage: "macOS-latest" + vmImage: "macOS-13" variables: - xcodeVersion: "14.2" + xcodeVersion: "14.3.1" ortPodVersion: $[stageDependencies.IosPackaging_SetCommonVariables.j.outputs['SetCommonVariables.ORT_POD_VERSION']] ${{ if eq(parameters.packageVariant, 'Full') }}: @@ -62,8 +62,6 @@ stages: architecture: "x64" - template: ../use-xcode-version.yml - parameters: - xcodeVersion: ${{ variables.xcodeVersion }} - template: ../install-appcenter.yml diff --git a/tools/ci_build/github/azure-pipelines/templates/use-xcode-version.yml b/tools/ci_build/github/azure-pipelines/templates/use-xcode-version.yml index ec4398fe31fc5..2cf698aefa8bd 100644 --- a/tools/ci_build/github/azure-pipelines/templates/use-xcode-version.yml +++ b/tools/ci_build/github/azure-pipelines/templates/use-xcode-version.yml @@ -3,7 +3,7 @@ parameters: - name: xcodeVersion type: string - default: "14.2" + default: "14.3.1" steps: - bash: |