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
This commit is contained in:
Chirag Jain 2018-05-07 14:24:32 -07:00 committed by Facebook Github Bot
parent 4d99daaa91
commit 15f8d7013c
1 changed files with 30 additions and 26 deletions

View File

@ -147,7 +147,7 @@ aliases:
git clone https://github.com/uber/okbuck.git ~/okbuck --depth=1 git clone https://github.com/uber/okbuck.git ~/okbuck --depth=1
fi fi
mkdir -p ~/react-native/tooling/junit 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 - &install-node
@ -214,7 +214,7 @@ aliases:
- &gradle-download-deps - &gradle-download-deps
name: Download C++ Dependencies name: Download C++ Dependencies
command: ./scripts/circleci/gradle_download_deps.sh command: ./scripts/circleci/gradle_download_deps.sh
- &build-android-app - &build-android-app
name: Build Android App name: Build Android App
command: | command: |
@ -224,7 +224,7 @@ aliases:
- &create-avd - &create-avd
name: Create Android Virtual Device name: Create Android Virtual Device
command: source scripts/circle-ci-android-setup.sh && createAVD command: source scripts/circle-ci-android-setup.sh && createAVD
- &launch-avd - &launch-avd
name: Launch Android Virtual Device in Background name: Launch Android Virtual Device in Background
command: source scripts/circle-ci-android-setup.sh && launchAVD command: source scripts/circle-ci-android-setup.sh && launchAVD
@ -250,11 +250,11 @@ aliases:
- &run-android-instrumentation-tests - &run-android-instrumentation-tests
name: Run Instrumentation Tests name: Run Instrumentation Tests
command: | 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; echo "JavaScript bundle missing, cannot run instrumentation tests. Verify build-js-bundle step completed successfully."; exit 1;
fi 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 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 - &collect-android-test-results
name: Collect Test Results name: Collect Test Results
command: | command: |
@ -266,12 +266,12 @@ aliases:
- &setup-artifacts - &setup-artifacts
name: Initial Setup name: Initial Setup
command: | command: |
mkdir -p ~/react-native/reports/buck/ mkdir -p ~/react-native/reports/buck/
mkdir -p ~/react-native/reports/build/ mkdir -p ~/react-native/reports/build/
mkdir -p ~/react-native/reports/junit/ mkdir -p ~/react-native/reports/junit/
mkdir -p ~/react-native/reports/outputs/ mkdir -p ~/react-native/reports/outputs/
- &run-objc-ios-tests - &run-objc-ios-tests
name: iOS Test Suite name: iOS Test Suite
command: ./scripts/objc-test-ios.sh test command: ./scripts/objc-test-ios.sh test
@ -390,7 +390,9 @@ jobs:
- attach_workspace: - attach_workspace:
at: ~/react-native 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: brew install watchman
- run: *run-objc-ios-tests - run: *run-objc-ios-tests
@ -404,7 +406,9 @@ jobs:
- attach_workspace: - attach_workspace:
at: ~/react-native 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: brew install watchman
- run: *run-objc-tvos-tests - run: *run-objc-tvos-tests
@ -418,7 +422,7 @@ jobs:
- attach_workspace: - attach_workspace:
at: ~/react-native 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 - run: *run-objc-ios-e2e-tests
- store_test_results: - store_test_results:
@ -432,14 +436,14 @@ jobs:
at: ~/react-native at: ~/react-native
- run: ./scripts/process-podspecs.sh - run: ./scripts/process-podspecs.sh
# Publishes new version onto npm # Publishes new version onto npm
publish_npm_package: publish_npm_package:
<<: *android_defaults <<: *android_defaults
steps: steps:
# Checkout code so that we can work with `git` in publish.js # Checkout code so that we can work with `git` in publish.js
- checkout - checkout
# Configure Android SDK and related dependencies # Configure Android SDK and related dependencies
- run: *configure-android-path - run: *configure-android-path
- run: *install-android-build-dependencies - run: *install-android-build-dependencies
@ -472,7 +476,7 @@ jobs:
- restore-cache: *restore-cache-yarn - restore-cache: *restore-cache-yarn
- run: *yarn - run: *yarn
- save-cache: *save-cache-yarn - save-cache: *save-cache-yarn
- run: - run:
name: Publish React Native Package name: Publish React Native Package
command: | command: |
@ -483,7 +487,7 @@ jobs:
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" > ~/.netrc echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" > ~/.netrc
node ./scripts/publish-npm.js node ./scripts/publish-npm.js
else else
echo "Skipping deploy." echo "Skipping deploy."
fi fi
# Set up an Android environment for downstream jobs # Set up an Android environment for downstream jobs
@ -505,7 +509,7 @@ jobs:
- run: *validate-android-sdk - 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: *create-avd
- run: *launch-avd - run: *launch-avd
@ -547,7 +551,7 @@ jobs:
# Test Suite # Test Suite
- run: *run-android-unit-tests - run: *run-android-unit-tests
- run: *run-android-instrumentation-tests - run: *run-android-instrumentation-tests
# Collect Results # Collect Results
- run: *collect-android-test-results - run: *collect-android-test-results
- store_test_results: - store_test_results:
@ -572,7 +576,7 @@ jobs:
cd bots cd bots
yarn install --non-interactive --cache-folder ~/.cache/yarn yarn install --non-interactive --cache-folder ~/.cache/yarn
else else
echo "Skipping dependency installation." echo "Skipping dependency installation."
fi fi
- save-cache: *save-cache-analysis - save-cache: *save-cache-analysis
@ -583,7 +587,7 @@ jobs:
if [ -n "$CIRCLE_PR_NUMBER" ]; then if [ -n "$CIRCLE_PR_NUMBER" ]; then
cd bots && DANGER_GITHUB_API_TOKEN="b186c9a82bab3b08ec80""c0818117619eec6f281a" yarn danger cd bots && DANGER_GITHUB_API_TOKEN="b186c9a82bab3b08ec80""c0818117619eec6f281a" yarn danger
else else
echo "Skipping pull request analysis." echo "Skipping pull request analysis."
fi fi
when: always when: always
- run: - run:
@ -593,7 +597,7 @@ jobs:
if [ -n "$CIRCLE_PR_NUMBER" ]; then 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 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 else
echo "Skipping code analysis." echo "Skipping code analysis."
fi fi
when: always when: always
@ -652,16 +656,16 @@ workflows:
# Checkout repo and run Yarn # Checkout repo and run Yarn
- checkout_code: - checkout_code:
filters: *filter-ignore-master-stable filters: *filter-ignore-master-stable
# Run code checks # Run code checks
- analyze_pr: - analyze_pr:
filters: *filter-ignore-master-stable filters: *filter-ignore-master-stable
requires: requires:
- checkout_code - checkout_code
# Only runs on NN-stable branches # Only runs on NN-stable branches
deploy: deploy:
jobs: jobs:
# If we are on a stable branch, wait for approval to deploy to npm # If we are on a stable branch, wait for approval to deploy to npm
- approve_publish_npm_package: - approve_publish_npm_package:
filters: *filter-only-stable filters: *filter-only-stable
@ -671,9 +675,9 @@ workflows:
requires: requires:
- approve_publish_npm_package - 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. # 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. # Once a test is fixed, move the test definition to the 'tests' workflow.
# disabled_tests: # disabled_tests:
# jobs: # jobs:
@ -681,7 +685,7 @@ workflows:
# - checkout_code: # - checkout_code:
# filters: *filter-ignore-gh-pages # 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, # # the migration from Travis, and they have broken since then,
# # CocoaPods # # CocoaPods
# - test_podspec: # - test_podspec: