From f6c627cd115b9e37a6ba20b5c4de48df6348b78b Mon Sep 17 00:00:00 2001 From: Vincent Esche Date: Tue, 24 Sep 2019 21:52:42 +0200 Subject: [PATCH] Added `SurgeBenchmarkTests` as a dedicated benchmarks target --- Metadata/Info-BenchmarkTests.plist | 22 +++ Metadata/Info-Tests.plist | 2 +- Package.swift | 4 + Surge.xcodeproj/project.pbxproj | 132 +++++++++++++++++- .../xcschemes/SurgeBenchmarkTests.xcscheme | 52 +++++++ 5 files changed, 210 insertions(+), 2 deletions(-) create mode 100644 Metadata/Info-BenchmarkTests.plist create mode 100644 Surge.xcodeproj/xcshareddata/xcschemes/SurgeBenchmarkTests.xcscheme diff --git a/Metadata/Info-BenchmarkTests.plist b/Metadata/Info-BenchmarkTests.plist new file mode 100644 index 0000000..64d65ca --- /dev/null +++ b/Metadata/Info-BenchmarkTests.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Metadata/Info-Tests.plist b/Metadata/Info-Tests.plist index 6c40a6c..64d65ca 100644 --- a/Metadata/Info-Tests.plist +++ b/Metadata/Info-Tests.plist @@ -13,7 +13,7 @@ CFBundleName $(PRODUCT_NAME) CFBundlePackageType - BNDL + $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString 1.0 CFBundleVersion diff --git a/Package.swift b/Package.swift index fbc4fd8..59c8dcc 100644 --- a/Package.swift +++ b/Package.swift @@ -39,5 +39,9 @@ let package = Package( name: "SurgeTests", dependencies: ["Surge"] ), + .testTarget( + name: "SurgeBenchmarkTests", + dependencies: ["Surge"] + ), ] ) diff --git a/Surge.xcodeproj/project.pbxproj b/Surge.xcodeproj/project.pbxproj index 30b9c42..e0adeb3 100644 --- a/Surge.xcodeproj/project.pbxproj +++ b/Surge.xcodeproj/project.pbxproj @@ -89,6 +89,7 @@ CAAF4FFD2339651700CC0AA7 /* ScalarTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAAF4FCF2338F09700CC0AA7 /* ScalarTests.swift */; }; CAAF4FFE2339651800CC0AA7 /* ScalarTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAAF4FCF2338F09700CC0AA7 /* ScalarTests.swift */; }; CAAF5000233A701A00CC0AA7 /* LogarithmTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAAF4FFF233A701A00CC0AA7 /* LogarithmTests.swift */; }; + CAAF500C233A7B6700CC0AA7 /* Surge.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 614AD31F1FC0AD99002BFE1C /* Surge.framework */; }; CAAF5001233A701A00CC0AA7 /* LogarithmTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAAF4FFF233A701A00CC0AA7 /* LogarithmTests.swift */; }; CAAF5002233A701A00CC0AA7 /* LogarithmTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAAF4FFF233A701A00CC0AA7 /* LogarithmTests.swift */; }; CAEC79BF2319274F00516E10 /* OperatorPrecedences.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAEC79B72319244D00516E10 /* OperatorPrecedences.swift */; }; @@ -132,6 +133,13 @@ remoteGlobalIDString = 614AD3501FC0B001002BFE1C; remoteInfo = "Surge-tvOS"; }; + CAAF500D233A7B6700CC0AA7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F8A1E1A119917A79009735E2 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 614AD31E1FC0AD99002BFE1C; + remoteInfo = "Surge-macOS"; + }; F84A6AB719A9A771007B53E1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = F8A1E1A119917A79009735E2 /* Project object */; @@ -176,6 +184,8 @@ 61E930C72070BCCD00694FCB /* ArraySlice+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ArraySlice+Extensions.swift"; sourceTree = ""; }; CAAF4FCF2338F09700CC0AA7 /* ScalarTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScalarTests.swift; sourceTree = ""; }; CAAF4FFF233A701A00CC0AA7 /* LogarithmTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LogarithmTests.swift; sourceTree = ""; }; + CAAF5007233A7B6700CC0AA7 /* SurgeBenchmarkTests-macOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SurgeBenchmarkTests-macOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + CAAF500B233A7B6700CC0AA7 /* Info-BenchmarkTests.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-BenchmarkTests.plist"; sourceTree = ""; }; CAEC79B72319244D00516E10 /* OperatorPrecedences.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OperatorPrecedences.swift; sourceTree = ""; }; CAEC79C323192FE300516E10 /* Scalar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Scalar.swift; sourceTree = ""; }; CAEC79D12319343100516E10 /* Logarithm.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Logarithm.swift; sourceTree = ""; }; @@ -226,6 +236,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + CAAF5004233A7B6700CC0AA7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + CAAF500C233A7B6700CC0AA7 /* Surge.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; F84A6AAB19A9A72F007B53E1 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -288,6 +306,13 @@ path = SurgeTests; sourceTree = ""; }; + CAAF5008233A7B6700CC0AA7 /* SurgeBenchmarkTests */ = { + isa = PBXGroup; + children = ( + ); + path = SurgeBenchmarkTests; + sourceTree = ""; + }; CAEC79C8231932E900516E10 /* Utilities */ = { isa = PBXGroup; children = ( @@ -364,6 +389,7 @@ isa = PBXGroup; children = ( 61A0AD6C1F70D22600B99FFB /* SurgeTests */, + CAAF5008233A7B6700CC0AA7 /* SurgeBenchmarkTests */, ); path = Tests; sourceTree = ""; @@ -392,6 +418,7 @@ 614AD3511FC0B001002BFE1C /* Surge.framework */, 614AD3591FC0B001002BFE1C /* SurgeTests-tvOS.xctest */, 614AD3821FC0B125002BFE1C /* Surge.framework */, + CAAF5007233A7B6700CC0AA7 /* SurgeBenchmarkTests-macOS.xctest */, ); name = Products; sourceTree = ""; @@ -401,6 +428,7 @@ children = ( 614AD3221FC0AD99002BFE1C /* Info-macOS.plist */, 614AD3361FC0AEBD002BFE1C /* Info-Tests.plist */, + CAAF500B233A7B6700CC0AA7 /* Info-BenchmarkTests.plist */, 614AD3541FC0B001002BFE1C /* Info.plist */, ); path = Metadata; @@ -546,6 +574,24 @@ productReference = 614AD3821FC0B125002BFE1C /* Surge.framework */; productType = "com.apple.product-type.framework"; }; + CAAF5006233A7B6700CC0AA7 /* SurgeBenchmarkTests-macOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = CAAF5011233A7B6700CC0AA7 /* Build configuration list for PBXNativeTarget "SurgeBenchmarkTests-macOS" */; + buildPhases = ( + CAAF5003233A7B6700CC0AA7 /* Sources */, + CAAF5004233A7B6700CC0AA7 /* Frameworks */, + CAAF5005233A7B6700CC0AA7 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + CAAF500E233A7B6700CC0AA7 /* PBXTargetDependency */, + ); + name = "SurgeBenchmarkTests-macOS"; + productName = SurgeBenchmarkTests; + productReference = CAAF5007233A7B6700CC0AA7 /* SurgeBenchmarkTests-macOS.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; F84A6AAD19A9A72F007B53E1 /* SurgeTests-iOS */ = { isa = PBXNativeTarget; buildConfigurationList = F84A6AB419A9A72F007B53E1 /* Build configuration list for PBXNativeTarget "SurgeTests-iOS" */; @@ -590,7 +636,7 @@ isa = PBXProject; attributes = { LastSwiftMigration = 0710; - LastSwiftUpdateCheck = 0910; + LastSwiftUpdateCheck = 1100; LastUpgradeCheck = 0930; ORGANIZATIONNAME = "Mattt Thompson"; TargetAttributes = { @@ -614,6 +660,10 @@ CreatedOnToolsVersion = 9.1; ProvisioningStyle = Automatic; }; + CAAF5006233A7B6700CC0AA7 = { + CreatedOnToolsVersion = 11.0; + ProvisioningStyle = Automatic; + }; F84A6AAD19A9A72F007B53E1 = { CreatedOnToolsVersion = 6.0; LastSwiftMigration = 0900; @@ -645,6 +695,7 @@ 614AD3501FC0B001002BFE1C /* Surge-tvOS */, 614AD3581FC0B001002BFE1C /* SurgeTests-tvOS */, 614AD3811FC0B125002BFE1C /* Surge-watchOS */, + CAAF5006233A7B6700CC0AA7 /* SurgeBenchmarkTests-macOS */, ); }; /* End PBXProject section */ @@ -685,6 +736,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + CAAF5005233A7B6700CC0AA7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; F84A6AAC19A9A72F007B53E1 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -872,6 +930,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + CAAF5003233A7B6700CC0AA7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; F84A6AAA19A9A72F007B53E1 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -927,6 +992,11 @@ target = 614AD3501FC0B001002BFE1C /* Surge-tvOS */; targetProxy = 614AD35B1FC0B001002BFE1C /* PBXContainerItemProxy */; }; + CAAF500E233A7B6700CC0AA7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 614AD31E1FC0AD99002BFE1C /* Surge-macOS */; + targetProxy = CAAF500D233A7B6700CC0AA7 /* PBXContainerItemProxy */; + }; F84A6AB819A9A771007B53E1 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = F8A1E1A919917A79009735E2 /* Surge-iOS */; @@ -1207,6 +1277,57 @@ }; name = Release; }; + CAAF500F233A7B6700CC0AA7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + GCC_C_LANGUAGE_STANDARD = gnu11; + INFOPLIST_FILE = "Metadata/Info-BenchmarkTests.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.mattt.SurgeBenchmarkTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + CAAF5010233A7B6700CC0AA7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = gnu11; + INFOPLIST_FILE = "Metadata/Info-BenchmarkTests.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.mattt.SurgeBenchmarkTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; F84A6AB519A9A72F007B53E1 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1443,6 +1564,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + CAAF5011233A7B6700CC0AA7 /* Build configuration list for PBXNativeTarget "SurgeBenchmarkTests-macOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CAAF500F233A7B6700CC0AA7 /* Debug */, + CAAF5010233A7B6700CC0AA7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; F84A6AB419A9A72F007B53E1 /* Build configuration list for PBXNativeTarget "SurgeTests-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Surge.xcodeproj/xcshareddata/xcschemes/SurgeBenchmarkTests.xcscheme b/Surge.xcodeproj/xcshareddata/xcschemes/SurgeBenchmarkTests.xcscheme new file mode 100644 index 0000000..1040fb1 --- /dev/null +++ b/Surge.xcodeproj/xcshareddata/xcschemes/SurgeBenchmarkTests.xcscheme @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + +