From 0f5ec15d4721db953e68f18bdf22b778ca4ed2c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 12 Oct 2017 08:26:36 +0200 Subject: [PATCH] Test for Carthage integration in an iOS app --- Makefile | 9 +- .../GRDBiOS/iOS.xcodeproj/project.pbxproj | 12 +-- .../xcshareddata/xcschemes/iOS.xcscheme | 93 +++++++++++++++++++ 3 files changed, 107 insertions(+), 7 deletions(-) create mode 100644 Tests/Carthage/GRDBiOS/iOS.xcodeproj/xcshareddata/xcschemes/iOS.xcscheme diff --git a/Makefile b/Makefile index ba3489aec..b6b3bb15c 100644 --- a/Makefile +++ b/Makefile @@ -90,7 +90,7 @@ test_framework_darwin: test_framework_GRDB test_framework_GRDBCustom test_framew test_framework_GRDB: test_framework_GRDBOSX test_framework_GRDBWatchOS test_framework_GRDBiOS test_framework_GRDBCustom: test_framework_GRDBCustomSQLiteOSX test_framework_GRDBCustomSQLiteiOS test_framework_GRDBCipher: test_framework_GRDBCipherOSX test_framework_GRDBCipheriOS -test_install: test_install_manual test_install_GRDBCipher test_install_SPM test_CocoaPodsLint +test_install: test_install_manual test_install_GRDBCipher test_install_SPM test_CocoaPodsLint test_CarthageBuild test_framework_GRDBOSX: $(XCODEBUILD) \ @@ -222,6 +222,13 @@ test_CarthageBuild: SQLiteCustom SQLCipher ifdef CARTHAGE rm -rf Carthage $(CARTHAGE) build --no-skip-current + $(XCODEBUILD) \ + -project Tests/Carthage/GRDBiOS/iOS.xcodeproj \ + -scheme iOS \ + -configuration Release \ + -destination $(MAX_IOS_DESTINATION) \ + clean build \ + $(XCPRETTY) else @echo Carthage must be installed for test_CarthageBuild @exit 1 diff --git a/Tests/Carthage/GRDBiOS/iOS.xcodeproj/project.pbxproj b/Tests/Carthage/GRDBiOS/iOS.xcodeproj/project.pbxproj index 460ba33fd..dfa0962ab 100644 --- a/Tests/Carthage/GRDBiOS/iOS.xcodeproj/project.pbxproj +++ b/Tests/Carthage/GRDBiOS/iOS.xcodeproj/project.pbxproj @@ -14,7 +14,7 @@ 567374481B4D46600089DE44 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 567374461B4D46600089DE44 /* LaunchScreen.storyboard */; }; 568E2B991CACE4ED00426E7B /* SimplePersonsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 568E2B981CACE4ED00426E7B /* SimplePersonsViewController.swift */; }; 56AEC9D91CAA985700452D96 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56AEC9D21CAA985700452D96 /* AppDelegate.swift */; }; - 56AEC9DA1CAA985700452D96 /* Database.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56AEC9D31CAA985700452D96 /* Database.swift */; }; + 56AEC9DA1CAA985700452D96 /* AppDatabase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56AEC9D31CAA985700452D96 /* AppDatabase.swift */; }; 56AEC9DB1CAA985700452D96 /* DemoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56AEC9D41CAA985700452D96 /* DemoViewController.swift */; }; 56AEC9DD1CAA985700452D96 /* Person.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56AEC9D61CAA985700452D96 /* Person.swift */; }; 56AEC9DE1CAA985700452D96 /* PersonEditionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56AEC9D71CAA985700452D96 /* PersonEditionViewController.swift */; }; @@ -44,7 +44,7 @@ 567374491B4D46600089DE44 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 568E2B981CACE4ED00426E7B /* SimplePersonsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SimplePersonsViewController.swift; sourceTree = ""; }; 56AEC9D21CAA985700452D96 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 56AEC9D31CAA985700452D96 /* Database.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Database.swift; sourceTree = ""; }; + 56AEC9D31CAA985700452D96 /* AppDatabase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDatabase.swift; sourceTree = ""; }; 56AEC9D41CAA985700452D96 /* DemoViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DemoViewController.swift; sourceTree = ""; }; 56AEC9D61CAA985700452D96 /* Person.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Person.swift; sourceTree = ""; }; 56AEC9D71CAA985700452D96 /* PersonEditionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PersonEditionViewController.swift; sourceTree = ""; }; @@ -85,7 +85,7 @@ children = ( 56AEC9D21CAA985700452D96 /* AppDelegate.swift */, 567374441B4D46600089DE44 /* Assets.xcassets */, - 56AEC9D31CAA985700452D96 /* Database.swift */, + 56AEC9D31CAA985700452D96 /* AppDatabase.swift */, 56AEC9D41CAA985700452D96 /* DemoViewController.swift */, 567374491B4D46600089DE44 /* Info.plist */, 567374461B4D46600089DE44 /* LaunchScreen.storyboard */, @@ -193,7 +193,7 @@ 56AEC9DD1CAA985700452D96 /* Person.swift in Sources */, 56AEC9DF1CAA985700452D96 /* PersonsViewController.swift in Sources */, 56AEC9DB1CAA985700452D96 /* DemoViewController.swift in Sources */, - 56AEC9DA1CAA985700452D96 /* Database.swift in Sources */, + 56AEC9DA1CAA985700452D96 /* AppDatabase.swift in Sources */, 568E2B991CACE4ED00426E7B /* SimplePersonsViewController.swift in Sources */, 56AEC9DE1CAA985700452D96 /* PersonEditionViewController.swift in Sources */, 56AEC9D91CAA985700452D96 /* AppDelegate.swift in Sources */, @@ -263,7 +263,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -300,7 +300,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; VALIDATE_PRODUCT = YES; }; name = Release; diff --git a/Tests/Carthage/GRDBiOS/iOS.xcodeproj/xcshareddata/xcschemes/iOS.xcscheme b/Tests/Carthage/GRDBiOS/iOS.xcodeproj/xcshareddata/xcschemes/iOS.xcscheme new file mode 100644 index 000000000..db3aaf4eb --- /dev/null +++ b/Tests/Carthage/GRDBiOS/iOS.xcodeproj/xcshareddata/xcschemes/iOS.xcscheme @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +