Skip to content

Commit

Permalink
Clean up/improve testing, fix Travis script
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveWoodCom committed Aug 23, 2016
1 parent da3699e commit 275a904
Show file tree
Hide file tree
Showing 23 changed files with 643 additions and 43 deletions.
52 changes: 48 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,51 @@
language: objective-c
xcode_project: XCGLogger/Library/XCGLogger.xcodeproj
xcode_scheme: XCGLogger (iOS)
osx_image: xcode7.3
xcode_sdk: iphonesimulator9.3
env:
global:
- LC_CTYPE=en_US.UTF-8
- LANG=en_US.UTF-8
- LIB_PROJECT=XCGLogger/Library/XCGLogger.xcodeproj
- IOSDEMO_PROJECT=XCGLogger/DemoApps/iOS/iOSDemo/iOSDemo.xcodeproj
- OSXDEMO_PROJECT=XCGLogger/DemoApps/OSX/OSXDemo/OSXDemo.xcodeproj
- TVOSDEMO_PROJECT=XCGLogger/DemoApps/tvOS/tvOSDemo/tvOSDemo.xcodeproj
- IOS_FRAMEWORK_SCHEME="XCGLogger (iOS)"
- OSX_FRAMEWORK_SCHEME="XCGLogger (OS X)"
- TVOS_FRAMEWORK_SCHEME="XCGLogger (tvOS)"
- WATCHOS_FRAMEWORK_SCHEME="XCGLogger (watchOS)"
- IOS_SDK=iphonesimulator9.3
- OSX_SDK=macosx10.11
- TVOS_SDK=appletvsimulator9.2
- WATCHOS_SDK=watchsimulator2.2
- IOS_EXAMPLE_SCHEME="iOSDemo"
- OSX_EXAMPLE_SCHEME="OSXDemo"
- TVOS_EXAMPLE_SCHEME="tvOSDemo"
matrix:
- POD_LINT="YES"
- PROJECT_FILE="$LIB_PROJECT" DESTINATION="OS=9.3,name=iPhone 6S" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" POD_LINT="NO" BUILDCMD="clean test build"
- PROJECT_FILE="$LIB_PROJECT" DESTINATION="arch=x86_64" SCHEME="$OSX_FRAMEWORK_SCHEME" SDK="$OSX_SDK" POD_LINT="NO" BUILDCMD="clean test build"
- PROJECT_FILE="$LIB_PROJECT" DESTINATION="OS=9.2,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" SDK="$TVOS_SDK" POD_LINT="NO" BUILDCMD="clean test build"
- PROJECT_FILE="$LIB_PROJECT" DESTINATION="OS=2.2,name=Apple Watch - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" SDK="$WATCHOS_SDK" POD_LINT="NO" BUILDCMD="clean build"
- PROJECT_FILE="$IOSDEMO_PROJECT" DESTINATION="OS=8.1,name=iPhone 5" SCHEME="$IOS_EXAMPLE_SCHEME" SDK="$IOS_SDK" POD_LINT="NO" BUILDCMD="clean build"
- PROJECT_FILE="$IOSDEMO_PROJECT" DESTINATION="OS=8.2,name=iPhone 5S" SCHEME="$IOS_EXAMPLE_SCHEME" SDK="$IOS_SDK" POD_LINT="NO" BUILDCMD="clean build"
- PROJECT_FILE="$IOSDEMO_PROJECT" DESTINATION="OS=8.3,name=iPhone 6" SCHEME="$IOS_EXAMPLE_SCHEME" SDK="$IOS_SDK" POD_LINT="NO" BUILDCMD="clean build"
- PROJECT_FILE="$IOSDEMO_PROJECT" DESTINATION="OS=8.4,name=iPad Retina" SCHEME="$IOS_EXAMPLE_SCHEME" SDK="$IOS_SDK" POD_LINT="NO" BUILDCMD="clean build"
- PROJECT_FILE="$IOSDEMO_PROJECT" DESTINATION="OS=9.0,name=iPhone 6 Plus" SCHEME="$IOS_EXAMPLE_SCHEME" SDK="$IOS_SDK" POD_LINT="NO" BUILDCMD="clean build"
- PROJECT_FILE="$IOSDEMO_PROJECT" DESTINATION="OS=9.1,name=iPhone 6S" SCHEME="$IOS_EXAMPLE_SCHEME" SDK="$IOS_SDK" POD_LINT="NO" BUILDCMD="clean build"
- PROJECT_FILE="$IOSDEMO_PROJECT" DESTINATION="OS=9.2,name=iPhone 6S Plus" SCHEME="$IOS_EXAMPLE_SCHEME" SDK="$IOS_SDK" POD_LINT="NO" BUILDCMD="clean build"
- PROJECT_FILE="$IOSDEMO_PROJECT" DESTINATION="OS=9.3,name=iPad Retina" SCHEME="$IOS_EXAMPLE_SCHEME" SDK="$IOS_SDK" POD_LINT="NO" BUILDCMD="clean build"
- PROJECT_FILE="$OSXDEMO_PROJECT" DESTINATION="arch=x86_64" SCHEME="$OSX_EXAMPLE_SCHEME" SDK="$OSX_SDK" POD_LINT="NO" BUILDCMD="clean build"
- PROJECT_FILE="$TVOSDEMO_PROJECT" DESTINATION="OS=9.2,name=Apple TV 1080p" SCHEME="$TVOS_EXAMPLE_SCHEME" SDK="$TVOS_SDK" POD_LINT="NO" BUILDCMD="clean build"
before_install:
- brew uninstall xctool && brew install --HEAD xctool
- brew update
script:
- set -o pipefail
- xcodebuild -version
- xcodebuild -showsdks

- if [ $POD_LINT == "YES" ]; then pod lib lint; fi
- if [ $POD_LINT == "NO" ]; then xcodebuild -UseSanitizedBuildSystemEnvironment=YES -project "$PROJECT_FILE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES $BUILDCMD | xcpretty -c; fi
- if [ $POD_LINT == "NO" ]; then xcodebuild -UseSanitizedBuildSystemEnvironment=YES -project "$PROJECT_FILE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES $BUILDCMD | xcpretty -c; fi

# Can't specify the SDK or the watchOS builds will fail with: target specifies product type 'com.apple.product-type.watchkit2-extension', but there's no such product type for the 'iphonesimulator' platform
# - xcodebuild -UseSanitizedBuildSystemEnvironment=YES -project "$PROJECT_FILE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES $BUILDCMD;
# - xcodebuild -UseSanitizedBuildSystemEnvironment=YES -project "$PROJECT_FILE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES $BUILDCMD;
30 changes: 30 additions & 0 deletions XCGLogger/DemoApps/OSX/OSXDemo/OSXDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,20 @@
remoteGlobalIDString = 554DF41619D76FE7005708BE;
remoteInfo = "XCGLogger (OS X)";
};
55E328541D6C33BF008CCB8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 555FFCCE19D77B3400F62246 /* XCGLogger.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 558EEB851D6BAC61006A9C7A;
remoteInfo = "XCGLoggerTests (watchOS)";
};
55E328561D6C33BF008CCB8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 555FFCCE19D77B3400F62246 /* XCGLogger.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 558EEB921D6BAC66006A9C7A;
remoteInfo = "XCGLoggerTests (tvOS)";
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
Expand Down Expand Up @@ -198,6 +212,8 @@
55CB2FB51BA12ADE0031F329 /* XCGLogger.framework */,
555FFCD919D77B3400F62246 /* XCGLoggerTests (iOS).xctest */,
5562CA971B7B25DD00F36DD8 /* XCGLoggerTests (OS X).xctest */,
55E328551D6C33BF008CCB8A /* XCGLoggerTests (watchOS).xctest */,
55E328571D6C33BF008CCB8A /* XCGLoggerTests (tvOS).xctest */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -330,6 +346,20 @@
remoteRef = 55CB2FB41BA12ADE0031F329 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
55E328551D6C33BF008CCB8A /* XCGLoggerTests (watchOS).xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = "XCGLoggerTests (watchOS).xctest";
remoteRef = 55E328541D6C33BF008CCB8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
55E328571D6C33BF008CCB8A /* XCGLoggerTests (tvOS).xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = "XCGLoggerTests (tvOS).xctest";
remoteRef = 55E328561D6C33BF008CCB8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */

/* Begin PBXResourcesBuildPhase section */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "555FFCAC19D77B1800F62246"
BuildableName = "OSXDemo.app"
BlueprintName = "OSXDemo"
ReferencedContainer = "container:OSXDemo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "555FFCBC19D77B1800F62246"
BuildableName = "OSXDemoTests.xctest"
BlueprintName = "OSXDemoTests"
ReferencedContainer = "container:OSXDemo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "555FFCBC19D77B1800F62246"
BuildableName = "OSXDemoTests.xctest"
BlueprintName = "OSXDemoTests"
ReferencedContainer = "container:OSXDemo.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "555FFCAC19D77B1800F62246"
BuildableName = "OSXDemo.app"
BlueprintName = "OSXDemo"
ReferencedContainer = "container:OSXDemo.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "555FFCAC19D77B1800F62246"
BuildableName = "OSXDemo.app"
BlueprintName = "OSXDemo"
ReferencedContainer = "container:OSXDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "555FFCAC19D77B1800F62246"
BuildableName = "OSXDemo.app"
BlueprintName = "OSXDemo"
ReferencedContainer = "container:OSXDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
4 changes: 2 additions & 2 deletions XCGLogger/DemoApps/OSX/OSXDemo/OSXDemo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.4</string>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>7</string>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
Expand Down
4 changes: 2 additions & 2 deletions XCGLogger/DemoApps/OSX/OSXDemo/OSXDemoTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>3.4</string>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>7</string>
<string>1</string>
</dict>
</plist>
30 changes: 30 additions & 0 deletions XCGLogger/DemoApps/iOS/iOSDemo/iOSDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,20 @@
remoteGlobalIDString = 55E3EE4419D76F280068C3A7;
remoteInfo = "XCGLogger (iOS)";
};
55419D621D6BF3D1007ED193 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 558C64A819D777B100D6D507 /* XCGLogger.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 558EEB851D6BAC61006A9C7A;
remoteInfo = "XCGLoggerTests (watchOS)";
};
55419D641D6BF3D1007ED193 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 558C64A819D777B100D6D507 /* XCGLogger.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 558EEB921D6BAC66006A9C7A;
remoteInfo = "XCGLoggerTests (tvOS)";
};
558C649819D7770100D6D507 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 558C647A19D7770100D6D507 /* Project object */;
Expand Down Expand Up @@ -293,6 +307,8 @@
55CB2FBC1BA12B4E0031F329 /* XCGLogger.framework */,
558C64B319D777B100D6D507 /* XCGLoggerTests (iOS).xctest */,
55D4395B1B7AAC16001370EC /* XCGLoggerTests (OS X).xctest */,
55419D631D6BF3D1007ED193 /* XCGLoggerTests (watchOS).xctest */,
55419D651D6BF3D1007ED193 /* XCGLoggerTests (tvOS).xctest */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -462,6 +478,20 @@
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
55419D631D6BF3D1007ED193 /* XCGLoggerTests (watchOS).xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = "XCGLoggerTests (watchOS).xctest";
remoteRef = 55419D621D6BF3D1007ED193 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
55419D651D6BF3D1007ED193 /* XCGLoggerTests (tvOS).xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = "XCGLoggerTests (tvOS).xctest";
remoteRef = 55419D641D6BF3D1007ED193 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
558C64AF19D777B100D6D507 /* XCGLogger.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "558C649619D7770100D6D507"
Expand Down
4 changes: 2 additions & 2 deletions XCGLogger/DemoApps/iOS/iOSDemo/iOSDemo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.4</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>7</string>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
4 changes: 2 additions & 2 deletions XCGLogger/DemoApps/iOS/iOSDemo/iOSDemoTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>3.4</string>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>7</string>
<string>1</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>3.4</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>7</string>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
Expand Down
4 changes: 2 additions & 2 deletions XCGLogger/DemoApps/iOS/iOSDemo/watchOSDemo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.4</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>7</string>
<string>1</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
Expand Down
Loading

0 comments on commit 275a904

Please sign in to comment.