From bc37c489d6a59893424733796e9061572b841617 Mon Sep 17 00:00:00 2001 From: Maxime Epain Date: Fri, 18 Mar 2022 14:54:56 +0100 Subject: [PATCH] RUMM-2054 Build xcframework with tvos slices --- .../src/release/assets/gh_asset.py | 69 +++++++++++-------- 1 file changed, 39 insertions(+), 30 deletions(-) diff --git a/tools/distribution/src/release/assets/gh_asset.py b/tools/distribution/src/release/assets/gh_asset.py index fff6c6e66f..828318753e 100644 --- a/tools/distribution/src/release/assets/gh_asset.py +++ b/tools/distribution/src/release/assets/gh_asset.py @@ -45,6 +45,19 @@ def validate(self, zip_directory: DirectoryMatcher): 'ios-arm64_x86_64-simulator/**/arm64-apple-ios-simulator.swiftinterface', 'ios-arm64_x86_64-simulator/**/x86_64.swiftinterface', 'ios-arm64_x86_64-simulator/**/x86_64-apple-ios-simulator.swiftinterface', + + 'tvos-arm64', + 'tvos-arm64/BCSymbolMaps/*.bcsymbolmap', + 'tvos-arm64/dSYMs/*.dSYM', + 'tvos-arm64/**/arm64.swiftinterface', + 'tvos-arm64/**/arm64-apple-ios.swiftinterface', + + 'tvos-arm64_x86_64-simulator', + 'tvos-arm64_x86_64-simulator/dSYMs/*.dSYM', + 'tvos-arm64_x86_64-simulator/**/arm64.swiftinterface', + 'tvos-arm64_x86_64-simulator/**/arm64-apple-ios-simulator.swiftinterface', + 'tvos-arm64_x86_64-simulator/**/x86_64.swiftinterface', + 'tvos-arm64_x86_64-simulator/**/x86_64-apple-ios-simulator.swiftinterface', ]) @@ -67,6 +80,18 @@ def validate(self, zip_directory: DirectoryMatcher): 'ios-arm64_x86_64-simulator/**/arm64-apple-ios-simulator.swiftinterface', 'ios-arm64_x86_64-simulator/**/x86_64.swiftinterface', 'ios-arm64_x86_64-simulator/**/x86_64-apple-ios-simulator.swiftinterface', + + 'tvos-arm64', + 'tvos-arm64/BCSymbolMaps/*.bcsymbolmap', + 'tvos-arm64/dSYMs/*.dSYM', + 'tvos-arm64/**/arm64.swiftinterface', + 'tvos-arm64/**/arm64-apple-ios.swiftinterface', + + 'tvos-arm64_x86_64-simulator', + 'tvos-arm64_x86_64-simulator/**/arm64.swiftinterface', + 'tvos-arm64_x86_64-simulator/**/arm64-apple-ios-simulator.swiftinterface', + 'tvos-arm64_x86_64-simulator/**/x86_64.swiftinterface', + 'tvos-arm64_x86_64-simulator/**/x86_64-apple-ios-simulator.swiftinterface', ]) @@ -88,6 +113,16 @@ def validate(self, zip_directory: DirectoryMatcher): 'ios-arm64_x86_64-simulator/dSYMs/*.dSYM', 'ios-arm64_x86_64-simulator/**/x86_64.swiftinterface', 'ios-arm64_x86_64-simulator/**/x86_64-apple-ios-simulator.swiftinterface', + + 'tvos-arm64', + 'tvos-arm64/BCSymbolMaps/*.bcsymbolmap', + 'tvos-arm64/**/arm64.swiftinterface', + 'tvos-arm64/**/arm64-apple-ios.swiftinterface', + + 'tvos-arm64_x86_64-simulator', + 'tvos-arm64_x86_64-simulator/dSYMs/*.dSYM', + 'tvos-arm64_x86_64-simulator/**/x86_64.swiftinterface', + 'tvos-arm64_x86_64-simulator/**/x86_64-apple-ios-simulator.swiftinterface', ]) @@ -102,34 +137,9 @@ def validate(self, zip_directory: DirectoryMatcher): zip_directory.get('CrashReporter.xcframework').assert_it_has_files([ 'ios-arm64_arm64e_armv7_armv7s', 'ios-arm64_i386_x86_64-simulator', - ]) - -class KronosXCFrameworkValidator(XCFrameworkValidator): - name = 'Kronos.xcframework' - - def should_be_included(self, in_version: Version): - min_version = Version.parse('1.5.0') # First version that depends on Kronos - max_version = Version.parse('1.8.99') # Last version that depends on Kronos - return in_version.is_newer_than_or_equal(min_version) and max_version.is_newer_than_or_equal(in_version) - - def validate(self, zip_directory: DirectoryMatcher): - zip_directory.get('Kronos.xcframework').assert_it_has_files([ - 'ios-arm64_armv7', - 'ios-arm64_armv7/BCSymbolMaps/*.bcsymbolmap', - 'ios-arm64_armv7/dSYMs/*.dSYM', - 'ios-arm64_armv7/**/arm.swiftinterface', - 'ios-arm64_armv7/**/arm64-apple-ios.swiftinterface', - 'ios-arm64_armv7/**/arm64.swiftinterface', - 'ios-arm64_armv7/**/armv7-apple-ios.swiftinterface', - 'ios-arm64_armv7/**/armv7.swiftinterface', - - 'ios-arm64_i386_x86_64-simulator', - 'ios-arm64_i386_x86_64-simulator/dSYMs/*.dSYM', - 'ios-arm64_i386_x86_64-simulator/**/arm64-apple-ios-simulator.swiftinterface', - 'ios-arm64_i386_x86_64-simulator/**/i386-apple-ios-simulator.swiftinterface', - 'ios-arm64_i386_x86_64-simulator/**/x86_64-apple-ios-simulator.swiftinterface', - 'ios-arm64_i386_x86_64-simulator/**/x86_64.swiftinterface', + 'tvos-arm64', + 'tvos-arm64_x86_64-simulator', ]) @@ -138,7 +148,6 @@ def validate(self, zip_directory: DirectoryMatcher): DatadogObjcXCFrameworkValidator(), DatadogCrashReportingXCFrameworkValidator(), CrashReporterXCFrameworkValidator(), - KronosXCFrameworkValidator(), ] @@ -160,9 +169,9 @@ def __init__(self, add_xcode_version: bool): # Produce XCFrameworks with carthage: # - only checkout and `--no-build` as it will build in the next command: - shell('carthage bootstrap --platform iOS --no-build') + shell('carthage bootstrap --platform iOS,tvOS --no-build') # - `--no-build` as it will build in the next command: - shell('carthage build --platform iOS --use-xcframeworks --no-use-binaries --no-skip-current') + shell('carthage build --platform iOS,tvOS --use-xcframeworks --no-use-binaries --no-skip-current') # Create `.zip` archive: zip_archive_name = f'Datadog-{read_sdk_version()}.zip'