Skip to content

Commit e7da67f

Browse files
committed
Fixes CI.
1 parent da85f03 commit e7da67f

File tree

4 files changed

+33
-72
lines changed

4 files changed

+33
-72
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: objective-c
22

3-
osx_image: xcode8
3+
osx_image: xcode8.3
44

55
notifications:
66
slack: rxswift:3ykt2Z61f8GkdvhCZTYPduOL
@@ -9,7 +9,7 @@ notifications:
99
install: true
1010

1111
script:
12-
- mkdir -p build && . ./scripts/common.sh && rx "Tests" Release "${DEFAULT_IOS_SIMULATOR}" test && rx "ExampleUITests" Release "${DEFAULT_IOS_SIMULATOR}" test && set +e
12+
- mkdir -p build && . ./scripts/common.sh && pod install && rx "Tests" Release "${DEFAULT_IOS_SIMULATOR}" test && rx "ExampleUITests" Release "${DEFAULT_IOS_SIMULATOR}" test && set +e
1313

1414
after_success:
1515
- sleep 5 # workaround https://github.com/travis-ci/travis-ci/issues/4725

Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ platform :ios, '8.0'
22
use_frameworks!
33

44
def common
5-
pod 'RxSwift', :git => 'git@github.com:ReactiveX/RxSwift.git', :branch => 'master'
6-
pod 'RxCocoa', :git => 'git@github.com:ReactiveX/RxSwift.git', :branch => 'master'
5+
pod 'RxSwift', :git => 'https://github.com/ReactiveX/RxSwift.git', :branch => 'master'
6+
pod 'RxCocoa', :git => 'https://github.com/ReactiveX/RxSwift.git', :branch => 'master'
77
end
88

99
target 'RxDataSources-iOS' do

RxDataSources.xcodeproj/project.pbxproj

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
C8BB76831C4C3EC5002B21C8 /* RxDataSources.h in Headers */ = {isa = PBXBuildFile; fileRef = C8984C5D1C36AF35001E4272 /* RxDataSources.h */; settings = {ATTRIBUTES = (Public, ); }; };
9191
C8CC634E1CCF8492006AE8CE /* Array+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8CC634C1CCF8492006AE8CE /* Array+Extensions.swift */; };
9292
C8CC634F1CCF8492006AE8CE /* Array+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8CC634C1CCF8492006AE8CE /* Array+Extensions.swift */; };
93-
EA78F009FC91B3AC45AE7FE9 /* Pods_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E3CB312567712E0443B47BE1 /* Pods_Tests.framework */; };
93+
C8E3905A1F36625B004FC993 /* RxDataSources.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C8984C5A1C36AF35001E4272 /* RxDataSources.framework */; };
9494
/* End PBXBuildFile section */
9595

9696
/* Begin PBXContainerItemProxy section */
@@ -384,7 +384,7 @@
384384
isa = PBXFrameworksBuildPhase;
385385
buildActionMask = 2147483647;
386386
files = (
387-
EA78F009FC91B3AC45AE7FE9 /* Pods_Tests.framework in Frameworks */,
387+
C8E3905A1F36625B004FC993 /* RxDataSources.framework in Frameworks */,
388388
);
389389
runOnlyForDeploymentPostprocessing = 0;
390390
};
@@ -690,12 +690,9 @@
690690
isa = PBXNativeTarget;
691691
buildConfigurationList = C81905B81DEA019100AE679C /* Build configuration list for PBXNativeTarget "Tests" */;
692692
buildPhases = (
693-
7A8FAF6881AA4DF25A688A5C /* [CP] Check Pods Manifest.lock */,
694693
C81905AA1DEA019100AE679C /* Sources */,
695694
C81905AB1DEA019100AE679C /* Frameworks */,
696695
C81905AC1DEA019100AE679C /* Resources */,
697-
73C0AF3DE0CAD577E16D87A7 /* [CP] Embed Pods Frameworks */,
698-
27A442B5AD6499855584BB53 /* [CP] Copy Pods Resources */,
699696
);
700697
buildRules = (
701698
);
@@ -1022,51 +1019,6 @@
10221019
/* End PBXResourcesBuildPhase section */
10231020

10241021
/* Begin PBXShellScriptBuildPhase section */
1025-
27A442B5AD6499855584BB53 /* [CP] Copy Pods Resources */ = {
1026-
isa = PBXShellScriptBuildPhase;
1027-
buildActionMask = 2147483647;
1028-
files = (
1029-
);
1030-
inputPaths = (
1031-
);
1032-
name = "[CP] Copy Pods Resources";
1033-
outputPaths = (
1034-
);
1035-
runOnlyForDeploymentPostprocessing = 0;
1036-
shellPath = /bin/sh;
1037-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Tests/Pods-Tests-resources.sh\"\n";
1038-
showEnvVarsInLog = 0;
1039-
};
1040-
73C0AF3DE0CAD577E16D87A7 /* [CP] Embed Pods Frameworks */ = {
1041-
isa = PBXShellScriptBuildPhase;
1042-
buildActionMask = 2147483647;
1043-
files = (
1044-
);
1045-
inputPaths = (
1046-
);
1047-
name = "[CP] Embed Pods Frameworks";
1048-
outputPaths = (
1049-
);
1050-
runOnlyForDeploymentPostprocessing = 0;
1051-
shellPath = /bin/sh;
1052-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Tests/Pods-Tests-frameworks.sh\"\n";
1053-
showEnvVarsInLog = 0;
1054-
};
1055-
7A8FAF6881AA4DF25A688A5C /* [CP] Check Pods Manifest.lock */ = {
1056-
isa = PBXShellScriptBuildPhase;
1057-
buildActionMask = 2147483647;
1058-
files = (
1059-
);
1060-
inputPaths = (
1061-
);
1062-
name = "[CP] Check Pods Manifest.lock";
1063-
outputPaths = (
1064-
);
1065-
runOnlyForDeploymentPostprocessing = 0;
1066-
shellPath = /bin/sh;
1067-
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/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";
1068-
showEnvVarsInLog = 0;
1069-
};
10701022
C82FDC991F3651D0002FA2B6 /* NormalizeCocoapods */ = {
10711023
isa = PBXShellScriptBuildPhase;
10721024
buildActionMask = 2147483647;

scripts/common.sh

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,30 @@ BOLDWHITE="\033[1m\033[37m"
2121

2222
# make sure all tests are passing
2323

24-
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.iOS-10-1 | wc -l` -eq 1 ]; then
25-
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-6/iOS/10.1
26-
else
27-
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-6/iOS/10.0
28-
fi
29-
30-
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.watchOS-3-1 | wc -l` -eq 1 ]; then
31-
DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-38mm/watchOS/3.1
32-
else
33-
DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-38mm/watchOS/3.0
34-
fi
35-
36-
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.tvOS-10-1 | wc -l` -eq 1 ]; then
37-
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/10.1
38-
else
39-
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/10.0
24+
if [[ `uname` == "Darwin" ]]; then
25+
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.iOS-10-3 | wc -l` -eq 1 ]; then
26+
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-6/iOS/10.3
27+
elif [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.iOS-11-0 | wc -l` -eq 1 ]; then
28+
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-6/iOS/11.0
29+
else
30+
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-6/iOS/10.0
31+
fi
32+
33+
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.watchOS-3-2 | wc -l` -eq 1 ]; then
34+
DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-38mm/watchOS/3.2
35+
elif [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.watchOS-4-0 | wc -l` -eq 1 ]; then
36+
DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-38mm/watchOS/4.0
37+
else
38+
DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-38mm/watchOS/3.0
39+
fi
40+
41+
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.tvOS-10-2 | wc -l` -eq 1 ]; then
42+
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/10.2
43+
elif [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.tvOS-11-0 | wc -l` -eq 1 ]; then
44+
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/11.0
45+
else
46+
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/10.0
47+
fi
4048
fi
4149
RUN_SIMULATOR_BY_NAME=0
4250

@@ -111,7 +119,7 @@ function ensure_simulator_available() {
111119
BUILD_DIRECTORY=build
112120

113121
function rx() {
114-
action RxDataSources.xcworkspace "$1" "$2" "$3" "$4"
122+
action `find . -name "*.xcworkspace" -maxdepth 1` "$1" "$2" "$3" "$4"
115123
}
116124

117125
function action() {
@@ -148,6 +156,7 @@ function action() {
148156
fi
149157

150158
set -x
159+
mkdir -p build
151160
killall Simulator || true
152161
xcodebuild -workspace "${WORKSPACE}" \
153162
-scheme "${SCHEME}" \
@@ -165,4 +174,4 @@ function exitIfLastStatusWasUnsuccessful() {
165174
echo $STATUS
166175
exit $STATUS
167176
fi
168-
}
177+
}

0 commit comments

Comments
 (0)