Browse Source

fixed travis and ios release

Daniel Zlotin 7 years ago
parent
commit
f93c62b8c4

+ 1
- 1
playground/ios/playground.xcodeproj/project.pbxproj View File

@@ -813,7 +813,7 @@
813 813
 			);
814 814
 			runOnlyForDeploymentPostprocessing = 0;
815 815
 			shellPath = /bin/sh;
816
-			shellScript = "export NODE_BINARY=node\n../../node_modules/react-native/packager/react-native-xcode.sh";
816
+			shellScript = "export NODE_BINARY=node\n../../node_modules/react-native/packager/react-native-xcode.sh ./playground/index.ios.js";
817 817
 		};
818 818
 /* End PBXShellScriptBuildPhase section */
819 819
 

+ 15
- 1
playground/ios/playground.xcodeproj/xcshareddata/xcschemes/playground.xcscheme View File

@@ -6,6 +6,20 @@
6 6
       parallelizeBuildables = "NO"
7 7
       buildImplicitDependencies = "YES">
8 8
       <BuildActionEntries>
9
+         <BuildActionEntry
10
+            buildForTesting = "YES"
11
+            buildForRunning = "YES"
12
+            buildForProfiling = "YES"
13
+            buildForArchiving = "YES"
14
+            buildForAnalyzing = "YES">
15
+            <BuildableReference
16
+               BuildableIdentifier = "primary"
17
+               BlueprintIdentifier = "3D3C04B91DE3340900C268FA"
18
+               BuildableName = "libyoga.a"
19
+               BlueprintName = "yoga"
20
+               ReferencedContainer = "container:../../node_modules/react-native/React/React.xcodeproj">
21
+            </BuildableReference>
22
+         </BuildActionEntry>
9 23
          <BuildActionEntry
10 24
             buildForTesting = "YES"
11 25
             buildForRunning = "YES"
@@ -17,7 +31,7 @@
17 31
                BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
18 32
                BuildableName = "libReact.a"
19 33
                BlueprintName = "React"
20
-               ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
34
+               ReferencedContainer = "container:../../node_modules/react-native/React/React.xcodeproj">
21 35
             </BuildableReference>
22 36
          </BuildActionEntry>
23 37
          <BuildActionEntry

+ 15
- 1
playground/ios/playground.xcodeproj/xcshareddata/xcschemes/playground_release.xcscheme View File

@@ -6,6 +6,20 @@
6 6
       parallelizeBuildables = "NO"
7 7
       buildImplicitDependencies = "YES">
8 8
       <BuildActionEntries>
9
+         <BuildActionEntry
10
+            buildForTesting = "YES"
11
+            buildForRunning = "YES"
12
+            buildForProfiling = "YES"
13
+            buildForArchiving = "YES"
14
+            buildForAnalyzing = "YES">
15
+            <BuildableReference
16
+               BuildableIdentifier = "primary"
17
+               BlueprintIdentifier = "3D3C04B91DE3340900C268FA"
18
+               BuildableName = "libyoga.a"
19
+               BlueprintName = "yoga"
20
+               ReferencedContainer = "container:../../node_modules/react-native/React/React.xcodeproj">
21
+            </BuildableReference>
22
+         </BuildActionEntry>
9 23
          <BuildActionEntry
10 24
             buildForTesting = "YES"
11 25
             buildForRunning = "YES"
@@ -17,7 +31,7 @@
17 31
                BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
18 32
                BuildableName = "libReact.a"
19 33
                BlueprintName = "React"
20
-               ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
34
+               ReferencedContainer = "container:../../node_modules/react-native/React/React.xcodeproj">
21 35
             </BuildableReference>
22 36
          </BuildActionEntry>
23 37
          <BuildActionEntry

+ 3
- 8
scripts/test.e2e.android.js View File

@@ -6,14 +6,9 @@ function run() {
6 6
     return;
7 7
   }
8 8
 
9
-  try {
10
-    exec.execSync(`echo 'travis_fold:start:android-e2e'`);
11
-    exec.execSync(`yarn run uninstall-android`);
12
-    exec.execSync(`yarn run install-android`);
13
-    exec.execSync(`cd AndroidE2E && ./gradlew connectedDebugAndroidTest`);
14
-  } finally {
15
-    exec.execSync(`echo 'travis_fold:end:android-e2e'`);
16
-  }
9
+  exec.execSync(`yarn run uninstall-android`);
10
+  exec.execSync(`yarn run install-android`);
11
+  exec.execSync(`cd AndroidE2E && ./gradlew connectedDebugAndroidTest`);
17 12
 }
18 13
 
19 14
 run();

+ 0
- 4
scripts/test.e2e.ios.js View File

@@ -6,7 +6,6 @@ const release = _.includes(process.argv, 'release');
6 6
 function buildProjForDetox() {
7 7
   const scheme = release ? `playground_release` : `playground`;
8 8
 
9
-  shellUtils.exec.execSync(`echo 'travis_fold:start:xcodebuild'`);
10 9
   const cmd = `RCT_NO_LAUNCH_PACKAGER=true
11 10
           cd ./playground/ios && xcodebuild
12 11
             -scheme ${scheme}
@@ -20,7 +19,6 @@ function buildProjForDetox() {
20 19
   } else {
21 20
     shellUtils.exec.execSync(`${cmd}`);
22 21
   }
23
-  shellUtils.exec.execSync(`echo 'travis_fold:end:xcodebuild'`);
24 22
 }
25 23
 function isInstalled(what) {
26 24
   try {
@@ -32,7 +30,6 @@ function isInstalled(what) {
32 30
 
33 31
 function e2e() { //eslint-disable-line
34 32
   try {
35
-    shellUtils.exec.execSync(`echo 'travis_fold:start:detox-ios'`);
36 33
     shellUtils.exec.execSyncSilent(`watchman watch-del-all || true`);
37 34
     const detoxAppBuildPath = `playground/ios/DerivedData/playground/Build/Products/${release ? 'Release' : 'Debug'}-iphonesimulator/playground.app`;
38 35
 
@@ -48,7 +45,6 @@ function e2e() { //eslint-disable-line
48 45
       shellUtils.exec.kill(`CoreSimulator`);
49 46
       shellUtils.exec.execSync(`sleep 5`);
50 47
     }
51
-    shellUtils.exec.execSync(`echo 'travis_fold:end:detox-ios'`);
52 48
   }
53 49
 }
54 50
 

+ 2
- 7
scripts/test.unit.ios.js View File

@@ -17,24 +17,19 @@ function hasXcpretty() {
17 17
 }
18 18
 
19 19
 function run() {
20
-  try {
21
-    shellUtils.exec.execSync(`echo 'travis_fold:start:xcodeunit'`);
22
-    runWithXcprettyIfPossible(`RCT_NO_LAUNCH_PACKAGER=true
20
+  runWithXcprettyIfPossible(`RCT_NO_LAUNCH_PACKAGER=true
23 21
           cd ./playground/ios && xcodebuild
24 22
             build build-for-testing
25 23
             -scheme "playground"
26 24
             -project playground.xcodeproj
27 25
             -sdk iphonesimulator
28 26
             -configuration Debug`);
29
-    runWithXcprettyIfPossible(`RCT_NO_LAUNCH_PACKAGER=true
27
+  runWithXcprettyIfPossible(`RCT_NO_LAUNCH_PACKAGER=true
30 28
           cd ./playground/ios && xcodebuild
31 29
             test-without-building
32 30
             -scheme "playground"
33 31
             -project playground.xcodeproj
34 32
             -destination 'platform=iOS Simulator,name=iPhone 7'`);
35
-  } finally {
36
-    shellUtils.exec.execSync(`echo 'travis_fold:end:xcodeunit'`);
37
-  }
38 33
 }
39 34
 
40 35
 run();

+ 4
- 2
scripts/travis.sh View File

@@ -21,6 +21,8 @@ run_f () {
21 21
 
22 22
 run_f "yarn install"
23 23
 run_f "yarn run test-js"
24
-run_f "yarn run test-android"
25
-run_f "yarn run test-ios"
24
+run_f "yarn run test-unit-android"
25
+run_f "yarn run test-unit-ios"
26
+run_f "yarn run test-e2e-android"
27
+run_f "yarn run test-e2e-ios"
26 28
 run_f "yarn run release"