Fix ci for xcode 8

* Makefile for builds (CLI FTW)

Easier to make sure we're doing the same thing locally as in travis

// FREEBIE
pull/1/head
Michael Kirk 9 years ago
parent a32a18ac67
commit f83f808986

@ -1,27 +1,14 @@
language: objective-c
osx_image: xcode7.3
env:
- TEST_DIR=Example/TSKitiOSTestApp
osx_image: xcode8
before_install:
- cd $TEST_DIR
- brew update
- brew outdated xctool || brew upgrade xctool
- gem install cocoapods xcpretty --no-ri --no-rdoc
- pod repo update --silent
install: pod install
after_failure:
- sleep 10 # This prevents the occasional output truncation that happens when piping to xcpretty.
script:
- |
set -o pipefail
xcodebuild -workspace TSKitiOSTestApp.xcworkspace \
-scheme TSKitiOSTestApp \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 6' \
build test | xcpretty
xcode_workspace: TSKitiOSTestApp.xcworkspace
xcode_scheme: TSKitiOSTestApp
script: make

@ -372,6 +372,7 @@
};
B6273DE91C13A2E500738558 = {
CreatedOnToolsVersion = 7.1.1;
DevelopmentTeam = U68MSDN6DR;
TestTargetID = B6273DD01C13A2E500738558;
};
};
@ -694,6 +695,7 @@
baseConfigurationReference = 36DA6C703F99948D553F4E3F /* Pods-TSKitiOSTestAppTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
DEVELOPMENT_TEAM = U68MSDN6DR;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "$(SRCROOT)/$(PROJECT_NAME)/TSKitiOSTestApp-Prefix.pch";
INFOPLIST_FILE = TSKitiOSTestAppTests/Info.plist;
@ -709,6 +711,7 @@
baseConfigurationReference = D3737F7A041D7147015C02C2 /* Pods-TSKitiOSTestAppTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
DEVELOPMENT_TEAM = U68MSDN6DR;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "$(SRCROOT)/$(PROJECT_NAME)/TSKitiOSTestApp-Prefix.pch";
INFOPLIST_FILE = TSKitiOSTestAppTests/Info.plist;

@ -0,0 +1,33 @@
# Make sure we're failing even though we pipe to xcpretty
SHELL=/bin/bash -o pipefail -o errexit
BUILD_DESTINATION = platform=iOS Simulator,name=iPhone 6,OS=9.3
WORKING_DIR = Example/TSKitiOSTestApp
SCHEME = TSKitiOSTestApp
XCODE_BUILD = xcrun xcodebuild -workspace $(SCHEME).xcworkspace -scheme $(SCHEME) -sdk iphonesimulator
.PHONY: build test retest clean
default: test
test: pod_install retest
pod_install:
cd $(WORKING_DIR) && \
pod install
build: pod_install
cd $(WORKING_DIR) && \
$(XCODE_BUILD) build | xcpretty
retest:
cd $(WORKING_DIR) && \
$(XCODE_BUILD) \
-destination '${BUILD_DESTINATION}' \
build test
clean:
cd $(WORKING_DIR) && \
$(XCODE_BUILD) \
clean | xcpretty

@ -8,6 +8,7 @@
#import "TSContactThread.h"
#import "TSNetworkManager.h"
#import "TSOutgoingMessage.h"
#import "TSStorageManager+keyingMaterial.h"
#import "TSStorageManager.h"
#import <XCTest/XCTest.h>
@ -94,6 +95,9 @@ NS_ASSUME_NONNULL_BEGIN
{
[super setUp];
// Hack to make sure we don't explode when sending sync message.
[TSStorageManager storePhoneNumber:@"+13231231234"];
self.thread = [[TSContactThread alloc] initWithUniqueId:@"fake-thread-id"];
[self.thread save];

Loading…
Cancel
Save