From 9c45fe4957ff3d027b5024abb170947db2cb0408 Mon Sep 17 00:00:00 2001 From: Rachel Guo <35738743+YUNQIUGUO@users.noreply.github.com> Date: Fri, 1 Dec 2023 14:47:46 -0800 Subject: [PATCH] Fix macos xcframework test stage codesign info (#18649) ### Description Remove developement id and force codesign not required in the test macos target. ### Motivation and Context Fix failure happened in iOS_Full_xcframwork stage in Zip-Nuget-Java-NodeJS packaging pipeline. --------- Co-authored-by: rachguo --- .../project.pbxproj | 28 ++++--------------- .../macos_package_test.entitlements | 10 ------- .../azure-pipelines/templates/c-api-cpu.yml | 2 +- 3 files changed, 7 insertions(+), 33 deletions(-) delete mode 100644 onnxruntime/test/platform/apple/apple_package_test/macos_package_test/macos_package_test.entitlements 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 66dd772e5e..f0582d4173 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 @@ -54,7 +54,6 @@ 51C316BC2B0881450033C70B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 51C316C42B0881480033C70B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 51C316C62B0881480033C70B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 51C316C82B0881480033C70B /* macos_package_test.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macos_package_test.entitlements; sourceTree = ""; }; 51C316D72B0881490033C70B /* macos_package_testUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = macos_package_testUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 51C316DB2B0881490033C70B /* macos_package_uitest_cpp_api.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = macos_package_uitest_cpp_api.mm; sourceTree = ""; }; /* End PBXFileReference section */ @@ -151,7 +150,6 @@ 51C316BC2B0881450033C70B /* AppDelegate.m */, 51C316C32B0881480033C70B /* Main.storyboard */, 51C316C62B0881480033C70B /* main.m */, - 51C316C82B0881480033C70B /* macos_package_test.entitlements */, ); path = macos_package_test; sourceTree = ""; @@ -523,7 +521,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = ios_package_test/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -544,7 +541,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = ios_package_test/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -564,7 +560,6 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; - CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; @@ -587,7 +582,6 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; - CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; @@ -613,12 +607,10 @@ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CODE_SIGN_ENTITLEMENTS = macos_package_test/macos_package_test.entitlements; - CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGNING_REQUIRED = NO; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = UBF8T346G9; ENABLE_HARDENED_RUNTIME = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; @@ -635,7 +627,6 @@ MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = "ai.onnxruntime.tests.macos-package-test"; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; SWIFT_EMIT_LOC_STRINGS = YES; }; @@ -648,12 +639,10 @@ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CODE_SIGN_ENTITLEMENTS = macos_package_test/macos_package_test.entitlements; - CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGNING_REQUIRED = NO; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = UBF8T346G9; ENABLE_HARDENED_RUNTIME = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; @@ -670,7 +659,6 @@ MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = "ai.onnxruntime.tests.macos-package-test"; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; SWIFT_EMIT_LOC_STRINGS = YES; }; @@ -681,19 +669,17 @@ buildSettings = { ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGNING_REQUIRED = NO; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = UBF8T346G9; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MACOSX_DEPLOYMENT_TARGET = 11.0; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = "com.MS.macos-package-testUITests"; + PRODUCT_BUNDLE_IDENTIFIER = "ai.onnxruntime.tests.macos-package-testUITests"; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; SWIFT_EMIT_LOC_STRINGS = NO; TEST_TARGET_NAME = macos_package_test; @@ -705,19 +691,17 @@ buildSettings = { ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGNING_REQUIRED = NO; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = UBF8T346G9; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MACOSX_DEPLOYMENT_TARGET = 11.0; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = "com.MS.macos-package-testUITests"; + PRODUCT_BUNDLE_IDENTIFIER = "ai.onnxruntime.tests.macos-package-testUITests"; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; SWIFT_EMIT_LOC_STRINGS = NO; TEST_TARGET_NAME = macos_package_test; diff --git a/onnxruntime/test/platform/apple/apple_package_test/macos_package_test/macos_package_test.entitlements b/onnxruntime/test/platform/apple/apple_package_test/macos_package_test/macos_package_test.entitlements deleted file mode 100644 index 18aff0ce43..0000000000 --- a/onnxruntime/test/platform/apple/apple_package_test/macos_package_test/macos_package_test.entitlements +++ /dev/null @@ -1,10 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.files.user-selected.read-only - - - 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 f9fe1894f9..58278d9c2f 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 @@ -379,7 +379,7 @@ stages: - template: flex-downloadPipelineArtifact.yml parameters: StepName: 'Download iOS Pipeline Artifact' - ArtifactName: 'onnxruntime-ios-full-xcframework' + ArtifactName: 'onnxruntime-apple-full-xcframework' TargetPath: '$(Build.BinariesDirectory)/nuget-artifact' SpecificArtifact: ${{ parameters.specificArtifact }} BuildId: ${{ parameters.BuildId }}