Skip to content

Commit

Permalink
Update pool to MacOS-13 (#17361)
Browse files Browse the repository at this point in the history
### Description
See microsoft/onnxruntime-extensions#476
and actions/runner-images#7671

### 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. -->

### 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, #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] facebook/react-native#32483

Applying changes to ios/Pofile
```
pre_install do |installer|
  # Custom pre-install script or commands
  puts "Running pre-install script..."

  # Recommended fix for facebook/react-native#32483
  # from facebook/react-native#32483 (comment)
  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] #21159

---------

Co-authored-by: Changming Sun <[email protected]>
  • Loading branch information
jchen351 and snnn authored Sep 17, 2024
1 parent 6dcdc70 commit fa68ae2
Show file tree
Hide file tree
Showing 23 changed files with 108 additions and 80 deletions.
3 changes: 2 additions & 1 deletion js/react_native/e2e/.detoxrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ module.exports = {
simulator: {
type: 'ios.simulator',
device: {
type: 'iPhone 13',
type: 'iPhone 14',
os: 'iOS 16.4',
},
},
attached: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -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)",
Expand All @@ -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)",
Expand Down Expand Up @@ -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)\"",
Expand Down Expand Up @@ -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)\"",
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
18 changes: 18 additions & 0 deletions js/react_native/e2e/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand All @@ -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
15 changes: 9 additions & 6 deletions js/react_native/ios/OnnxruntimeModule.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -189,7 +189,8 @@
58B511D31A9E6C8500147676 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0920;
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1540;
ORGANIZATIONNAME = Facebook;
TargetAttributes = {
58B511DA1A9E6C8500147676 = {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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)",
Expand All @@ -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)",
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
19 changes: 19 additions & 0 deletions js/react_native/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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)";
Expand Down Expand Up @@ -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)";
Expand All @@ -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)";
Expand All @@ -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)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
"macosx": [
"--macos=MacOSX",
"--apple_deploy_target=11.0"
"--apple_deploy_target=13.3"
],
"iphoneos": [
"--ios",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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'

Expand Down Expand Up @@ -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'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
5 changes: 2 additions & 3 deletions tools/ci_build/github/azure-pipelines/mac-ios-ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,15 @@ 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
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)]
timeoutInMinutes: 150
steps:
- template: templates/use-xcode-version.yml
parameters:
xcodeVersion: 14.2

- template: templates/mac-build-step-with-cache.yml
parameters:
WithCache: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ stages:
displayName: "Set common variables"

pool:
vmImage: "macOS-latest"
vmImage: "macOS-13"

timeoutInMinutes: 5

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ stages:
clean: all
timeoutInMinutes: 120
pool:
vmImage: 'macOS-latest'
vmImage: 'macOS-13'

variables:
- name: OnnxRuntimeBuildDirectory
Expand Down
Loading

0 comments on commit fa68ae2

Please sign in to comment.