Skip to content

Commit

Permalink
[CI] Fixes tests by removing macOS target.
Browse files Browse the repository at this point in the history
A combination of the following work:

Removed all codesigning.

[CI] Early fail.

[CocoaPods] Bleeding edge.

Switches order of tests.

Removes macOS, re-adds tvOS.

Updated Rakefile for tvOS testing.
  • Loading branch information
ashfurrow committed Sep 18, 2016
1 parent e396702 commit b1d749d
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 46 deletions.
12 changes: 4 additions & 8 deletions Demo/Demo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
790537B10A9ABE236DEBD189 /* [CP] Copy Pods Resources */ = {
Expand Down Expand Up @@ -540,7 +540,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
9B66D7F21CA74DB56EE7A589 /* [CP] Copy Pods Resources */ = {
Expand Down Expand Up @@ -570,7 +570,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
A787EC4F41FDE73A8156E105 /* [CP] Embed Pods Frameworks */ = {
Expand Down Expand Up @@ -615,7 +615,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -763,7 +763,6 @@
baseConfigurationReference = 7C709DF02DA056BF033C0298 /* Pods-MoyaTests-Mac.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_NO_COMMON_BLOCKS = YES;
Expand All @@ -782,7 +781,6 @@
baseConfigurationReference = AC6FB71F11D38C06B1A7AEFF /* Pods-MoyaTests-Mac.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
Expand Down Expand Up @@ -816,7 +814,6 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -862,7 +859,6 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down
2 changes: 1 addition & 1 deletion Demo/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 96e9b55f3f3195f74670d808fde9bdd2e6d114c8

COCOAPODS: 1.0.1
COCOAPODS: 1.1.0.rc.2
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ source 'https://rubygems.org'

gem 'xcpretty'

gem 'cocoapods'
gem 'cocoapods', git: 'https://github.com/CocoaPods/CocoaPods.git', branch: 'master'
gem 'cocoapods-core', git: 'https://github.com/CocoaPods/Core.git', branch: 'master'
gem 'rake'
gem 'octokit', '~> 4.3'

Expand Down
73 changes: 44 additions & 29 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,41 @@
GIT
remote: https://github.com/CocoaPods/CocoaPods.git
revision: 60c97e39892548096257f05ba39c4cc686dc4fa0
branch: master
specs:
cocoapods (1.1.0.rc.2)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.0, < 2.0)
cocoapods-core (= 1.1.0.rc.2)
cocoapods-deintegrate (>= 1.0.1, < 2.0)
cocoapods-downloader (>= 1.1.1, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.0.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored (~> 1.2)
escape (~> 0.0.4)
fourflusher (~> 1.0.1)
gh_inspector (~> 1.0)
molinillo (~> 0.5.1)
nap (~> 1.0)
xcodeproj (>= 1.3.1, < 2.0)

GIT
remote: https://github.com/CocoaPods/Core.git
revision: fc8c258d0bce73e091f09de260a1a65bed3482a1
branch: master
specs:
cocoapods-core (1.1.0.rc.2)
activesupport (>= 4.0.2, < 5)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)

GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.6)
activesupport (4.2.7.1)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
Expand All @@ -13,37 +47,16 @@ GEM
cork (~> 0)
nap (~> 1.0)
open4 (~> 1.3)
cocoapods (1.0.1)
activesupport (>= 4.0.2)
claide (>= 1.0.0, < 2.0)
cocoapods-core (= 1.0.1)
cocoapods-deintegrate (>= 1.0.0, < 2.0)
cocoapods-downloader (>= 1.0.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.0.0, < 2.0)
cocoapods-try (>= 1.0.0, < 2.0)
colored (~> 1.2)
escape (~> 0.0.4)
fourflusher (~> 0.3.0)
molinillo (~> 0.4.5)
nap (~> 1.0)
xcodeproj (>= 1.1.0, < 2.0)
cocoapods-core (1.0.1)
activesupport (>= 4.0.2)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.0)
cocoapods-downloader (1.0.1)
cocoapods-deintegrate (1.0.1)
cocoapods-downloader (1.1.1)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.0.0)
cocoapods-trunk (1.0.0)
nap (>= 0.8, < 2.0)
netrc (= 0.7.8)
cocoapods-try (1.0.0)
cocoapods-try (1.1.0)
colored (1.2)
cork (0.1.0)
colored (~> 1.2)
Expand All @@ -65,13 +78,14 @@ GEM
multipart-post (>= 1.2, < 3)
faraday-http-cache (1.3.0)
faraday (~> 0.8)
fourflusher (0.3.2)
fourflusher (1.0.1)
fuzzy_match (2.0.4)
gh_inspector (1.0.2)
git (1.3.0)
i18n (0.7.0)
json (1.8.3)
minitest (5.9.0)
molinillo (0.4.5)
molinillo (0.5.1)
multipart-post (2.0.0)
nap (1.1.0)
netrc (0.7.8)
Expand All @@ -88,7 +102,7 @@ GEM
thread_safe (0.3.5)
tzinfo (1.2.2)
thread_safe (~> 0.1)
xcodeproj (1.1.0)
xcodeproj (1.3.1)
activesupport (>= 3)
claide (>= 1.0.0, < 2.0)
colored (~> 1.2)
Expand All @@ -99,7 +113,8 @@ PLATFORMS
ruby

DEPENDENCIES
cocoapods
cocoapods!
cocoapods-core!
danger
danger-swiftlint
octokit (~> 4.3)
Expand Down
28 changes: 23 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ end

def targets
return [
:ios,
:osx,
# :tvos # Note: we're omiting this until Circle supports testing on tvOS simulators.
# :osx, # Note: we're experiencing macOS build problems on circle, commenting out.
:tvos,
:ios
]
end

Expand All @@ -26,7 +26,7 @@ def sdks
return {
ios: 'iphonesimulator',
osx: 'macosx',
tvos: 'appletvsimulator9.2'
tvos: 'appletvsimulator'
}
end

Expand Down Expand Up @@ -58,7 +58,7 @@ task :clean do
xcodebuild_in_demo_dir 'clean', :ios
end

desc 'Build, then run tests.'
desc 'Build, then run all tests.'
task :test do
targets.map do |platform|
puts "Testing on #{platform}."
Expand All @@ -67,6 +67,24 @@ task :test do
sh "killall Simulator"
end

desc 'Individual test tasks.'
namespace :test do
desc 'Test on iOS.'
task :ios do
xcodebuild_in_demo_dir 'build test', :ios, xcprety_args: '--test'
end

desc 'Test on macOS.'
task :osx do
xcodebuild_in_demo_dir 'build test', :osx, xcprety_args: '--test'
end

desc 'Test on tvOS.'
task :tvos do
xcodebuild_in_demo_dir 'build test', :tvos, xcprety_args: '--test'
end
end

desc 'Release a version, specified as an argument.'
task :release, :version do |task, args|
version = args[:version]
Expand Down
3 changes: 1 addition & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ test:
- xcrun instruments -w 'E8DD285C-51EE-4DB5-B326-7E927686EC36' || true
- sleep 15
override:
- rake test
- rake carthage_test
- rake test && rake carthage_test
post:
- bundle exec danger
- bash <(curl -s https://codecov.io/bash)

0 comments on commit b1d749d

Please sign in to comment.