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
 			);
813
 			);
814
 			runOnlyForDeploymentPostprocessing = 0;
814
 			runOnlyForDeploymentPostprocessing = 0;
815
 			shellPath = /bin/sh;
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
 /* End PBXShellScriptBuildPhase section */
818
 /* End PBXShellScriptBuildPhase section */
819
 
819
 

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

6
       parallelizeBuildables = "NO"
6
       parallelizeBuildables = "NO"
7
       buildImplicitDependencies = "YES">
7
       buildImplicitDependencies = "YES">
8
       <BuildActionEntries>
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
          <BuildActionEntry
23
          <BuildActionEntry
10
             buildForTesting = "YES"
24
             buildForTesting = "YES"
11
             buildForRunning = "YES"
25
             buildForRunning = "YES"
17
                BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
31
                BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
18
                BuildableName = "libReact.a"
32
                BuildableName = "libReact.a"
19
                BlueprintName = "React"
33
                BlueprintName = "React"
20
-               ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
34
+               ReferencedContainer = "container:../../node_modules/react-native/React/React.xcodeproj">
21
             </BuildableReference>
35
             </BuildableReference>
22
          </BuildActionEntry>
36
          </BuildActionEntry>
23
          <BuildActionEntry
37
          <BuildActionEntry

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

6
       parallelizeBuildables = "NO"
6
       parallelizeBuildables = "NO"
7
       buildImplicitDependencies = "YES">
7
       buildImplicitDependencies = "YES">
8
       <BuildActionEntries>
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
          <BuildActionEntry
23
          <BuildActionEntry
10
             buildForTesting = "YES"
24
             buildForTesting = "YES"
11
             buildForRunning = "YES"
25
             buildForRunning = "YES"
17
                BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
31
                BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
18
                BuildableName = "libReact.a"
32
                BuildableName = "libReact.a"
19
                BlueprintName = "React"
33
                BlueprintName = "React"
20
-               ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
34
+               ReferencedContainer = "container:../../node_modules/react-native/React/React.xcodeproj">
21
             </BuildableReference>
35
             </BuildableReference>
22
          </BuildActionEntry>
36
          </BuildActionEntry>
23
          <BuildActionEntry
37
          <BuildActionEntry

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

6
     return;
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
 run();
14
 run();

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

6
 function buildProjForDetox() {
6
 function buildProjForDetox() {
7
   const scheme = release ? `playground_release` : `playground`;
7
   const scheme = release ? `playground_release` : `playground`;
8
 
8
 
9
-  shellUtils.exec.execSync(`echo 'travis_fold:start:xcodebuild'`);
10
   const cmd = `RCT_NO_LAUNCH_PACKAGER=true
9
   const cmd = `RCT_NO_LAUNCH_PACKAGER=true
11
           cd ./playground/ios && xcodebuild
10
           cd ./playground/ios && xcodebuild
12
             -scheme ${scheme}
11
             -scheme ${scheme}
20
   } else {
19
   } else {
21
     shellUtils.exec.execSync(`${cmd}`);
20
     shellUtils.exec.execSync(`${cmd}`);
22
   }
21
   }
23
-  shellUtils.exec.execSync(`echo 'travis_fold:end:xcodebuild'`);
24
 }
22
 }
25
 function isInstalled(what) {
23
 function isInstalled(what) {
26
   try {
24
   try {
32
 
30
 
33
 function e2e() { //eslint-disable-line
31
 function e2e() { //eslint-disable-line
34
   try {
32
   try {
35
-    shellUtils.exec.execSync(`echo 'travis_fold:start:detox-ios'`);
36
     shellUtils.exec.execSyncSilent(`watchman watch-del-all || true`);
33
     shellUtils.exec.execSyncSilent(`watchman watch-del-all || true`);
37
     const detoxAppBuildPath = `playground/ios/DerivedData/playground/Build/Products/${release ? 'Release' : 'Debug'}-iphonesimulator/playground.app`;
34
     const detoxAppBuildPath = `playground/ios/DerivedData/playground/Build/Products/${release ? 'Release' : 'Debug'}-iphonesimulator/playground.app`;
38
 
35
 
48
       shellUtils.exec.kill(`CoreSimulator`);
45
       shellUtils.exec.kill(`CoreSimulator`);
49
       shellUtils.exec.execSync(`sleep 5`);
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
 }
17
 }
18
 
18
 
19
 function run() {
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
           cd ./playground/ios && xcodebuild
21
           cd ./playground/ios && xcodebuild
24
             build build-for-testing
22
             build build-for-testing
25
             -scheme "playground"
23
             -scheme "playground"
26
             -project playground.xcodeproj
24
             -project playground.xcodeproj
27
             -sdk iphonesimulator
25
             -sdk iphonesimulator
28
             -configuration Debug`);
26
             -configuration Debug`);
29
-    runWithXcprettyIfPossible(`RCT_NO_LAUNCH_PACKAGER=true
27
+  runWithXcprettyIfPossible(`RCT_NO_LAUNCH_PACKAGER=true
30
           cd ./playground/ios && xcodebuild
28
           cd ./playground/ios && xcodebuild
31
             test-without-building
29
             test-without-building
32
             -scheme "playground"
30
             -scheme "playground"
33
             -project playground.xcodeproj
31
             -project playground.xcodeproj
34
             -destination 'platform=iOS Simulator,name=iPhone 7'`);
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
 run();
35
 run();

+ 4
- 2
scripts/travis.sh View File

21
 
21
 
22
 run_f "yarn install"
22
 run_f "yarn install"
23
 run_f "yarn run test-js"
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
 run_f "yarn run release"
28
 run_f "yarn run release"