From 15f8d7013c2308fe708599f82eba08d2c9ba743f Mon Sep 17 00:00:00 2001 From: Chirag Jain Date: Mon, 7 May 2018 14:24:32 -0700 Subject: [PATCH] CI: fix watchman install errors and update ios simulators to version 11.2 Summary: Fixes watchman install errors. Check that iphone 5s is booted properly on circle. Check brew install watchman succeeds. [CI] - Fix ios version on circleci and fixes brew install watchman error Closes https://github.com/facebook/react-native/pull/19166 Differential Revision: D7899295 Pulled By: hramos fbshipit-source-id: 2260a2675879cf97fb0b2f11139d9bb84ce7444e --- .circleci/config.yml | 56 ++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7452d4bd4..23c947273 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -147,7 +147,7 @@ aliases: git clone https://github.com/uber/okbuck.git ~/okbuck --depth=1 fi mkdir -p ~/react-native/tooling/junit - cp -R ~/okbuck/tooling/junit/* ~/react-native/tooling/junit/. + cp -R ~/okbuck/tooling/junit/* ~/react-native/tooling/junit/. - &install-node @@ -214,7 +214,7 @@ aliases: - &gradle-download-deps name: Download C++ Dependencies command: ./scripts/circleci/gradle_download_deps.sh - + - &build-android-app name: Build Android App command: | @@ -224,7 +224,7 @@ aliases: - &create-avd name: Create Android Virtual Device command: source scripts/circle-ci-android-setup.sh && createAVD - + - &launch-avd name: Launch Android Virtual Device in Background command: source scripts/circle-ci-android-setup.sh && launchAVD @@ -250,11 +250,11 @@ aliases: - &run-android-instrumentation-tests name: Run Instrumentation Tests command: | - if [[ ! -e ReactAndroid/src/androidTest/assets/AndroidTestBundle.js ]]; then + if [[ ! -e ReactAndroid/src/androidTest/assets/AndroidTestBundle.js ]]; then echo "JavaScript bundle missing, cannot run instrumentation tests. Verify build-js-bundle step completed successfully."; exit 1; fi source scripts/circle-ci-android-setup.sh && NO_BUCKD=1 retry3 timeout 300 buck install ReactAndroid/src/androidTest/buck-runner:instrumentation-tests --config build.threads=$BUILD_THREADS - + - &collect-android-test-results name: Collect Test Results command: | @@ -266,12 +266,12 @@ aliases: - &setup-artifacts name: Initial Setup - command: | + command: | mkdir -p ~/react-native/reports/buck/ mkdir -p ~/react-native/reports/build/ mkdir -p ~/react-native/reports/junit/ mkdir -p ~/react-native/reports/outputs/ - + - &run-objc-ios-tests name: iOS Test Suite command: ./scripts/objc-test-ios.sh test @@ -390,7 +390,9 @@ jobs: - attach_workspace: at: ~/react-native - - run: xcrun instruments -w "iPhone 5s (11.1)" || true + - run: xcrun instruments -w "iPhone 5s (11.2)" || true + # See https://github.com/Homebrew/homebrew-core/issues/26358. + - run: brew upgrade python > /dev/null - run: brew install watchman - run: *run-objc-ios-tests @@ -404,7 +406,9 @@ jobs: - attach_workspace: at: ~/react-native - - run: xcrun instruments -w "Apple TV 1080p (11.1)" || true + - run: xcrun instruments -w "Apple TV 1080p (11.2)" || true + # See https://github.com/Homebrew/homebrew-core/issues/26358. + - run: brew upgrade python > /dev/null - run: brew install watchman - run: *run-objc-tvos-tests @@ -418,7 +422,7 @@ jobs: - attach_workspace: at: ~/react-native - - run: xcrun instruments -w "iPhone 5s (11.1)" || true + - run: xcrun instruments -w "iPhone 5s (11.2)" || true - run: *run-objc-ios-e2e-tests - store_test_results: @@ -432,14 +436,14 @@ jobs: at: ~/react-native - run: ./scripts/process-podspecs.sh - + # Publishes new version onto npm publish_npm_package: <<: *android_defaults steps: # Checkout code so that we can work with `git` in publish.js - checkout - + # Configure Android SDK and related dependencies - run: *configure-android-path - run: *install-android-build-dependencies @@ -472,7 +476,7 @@ jobs: - restore-cache: *restore-cache-yarn - run: *yarn - save-cache: *save-cache-yarn - + - run: name: Publish React Native Package command: | @@ -483,7 +487,7 @@ jobs: echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" > ~/.netrc node ./scripts/publish-npm.js else - echo "Skipping deploy." + echo "Skipping deploy." fi # Set up an Android environment for downstream jobs @@ -505,7 +509,7 @@ jobs: - run: *validate-android-sdk - # Starting emulator in advance as it takes some time to boot. + # Starting emulator in advance as it takes some time to boot. - run: *create-avd - run: *launch-avd @@ -547,7 +551,7 @@ jobs: # Test Suite - run: *run-android-unit-tests - run: *run-android-instrumentation-tests - + # Collect Results - run: *collect-android-test-results - store_test_results: @@ -572,7 +576,7 @@ jobs: cd bots yarn install --non-interactive --cache-folder ~/.cache/yarn else - echo "Skipping dependency installation." + echo "Skipping dependency installation." fi - save-cache: *save-cache-analysis @@ -583,7 +587,7 @@ jobs: if [ -n "$CIRCLE_PR_NUMBER" ]; then cd bots && DANGER_GITHUB_API_TOKEN="b186c9a82bab3b08ec80""c0818117619eec6f281a" yarn danger else - echo "Skipping pull request analysis." + echo "Skipping pull request analysis." fi when: always - run: @@ -593,7 +597,7 @@ jobs: if [ -n "$CIRCLE_PR_NUMBER" ]; then GITHUB_TOKEN="af6ef0d15709bc91d""06a6217a5a826a226fb57b7" CI_USER=$CIRCLE_PROJECT_USERNAME CI_REPO=$CIRCLE_PROJECT_REPONAME PULL_REQUEST_NUMBER=$CIRCLE_PR_NUMBER scripts/circleci/analyze_code.sh else - echo "Skipping code analysis." + echo "Skipping code analysis." fi when: always @@ -652,16 +656,16 @@ workflows: # Checkout repo and run Yarn - checkout_code: filters: *filter-ignore-master-stable - + # Run code checks - - analyze_pr: + - analyze_pr: filters: *filter-ignore-master-stable - requires: + requires: - checkout_code # Only runs on NN-stable branches deploy: - jobs: + jobs: # If we are on a stable branch, wait for approval to deploy to npm - approve_publish_npm_package: filters: *filter-only-stable @@ -671,9 +675,9 @@ workflows: requires: - approve_publish_npm_package - # These tests are flaky or are yet to be fixed. They are placed on their own + # These tests are flaky or are yet to be fixed. They are placed on their own # workflow to avoid marking benign PRs as broken. - # To run them, uncomment the entire block and open a PR (do not merge). + # To run them, uncomment the entire block and open a PR (do not merge). # Once a test is fixed, move the test definition to the 'tests' workflow. # disabled_tests: # jobs: @@ -681,7 +685,7 @@ workflows: # - checkout_code: # filters: *filter-ignore-gh-pages - # # The following were DISABLED because they have not run since + # # The following were DISABLED because they have not run since # # the migration from Travis, and they have broken since then, # # CocoaPods # - test_podspec: