mirror of
https://github.com/facebook/react-native.git
synced 2024-11-21 22:10:14 +00:00
feat: migrate appveyor to circleci (#28245)
Summary: This issue closes https://github.com/facebook/react-native/issues/28241 Migrated Windows test from AppVeyor to CircleCI ## Changelog [Internal] [Changed] - Migrated Windows test from AppVeyor to CircleCI Pull Request resolved: https://github.com/facebook/react-native/pull/28245 Test Plan: For CircleCI to Pass Reviewed By: cpojer Differential Revision: D20689163 Pulled By: hramos fbshipit-source-id: 285c762457ef00f7884ee9157b3f336044c0452f
This commit is contained in:
parent
bbd91446dd
commit
7007df6198
@ -1,47 +0,0 @@
|
||||
environment:
|
||||
ANDROID_HOME: "C:\\android-sdk-windows"
|
||||
ANDROID_NDK: "C:\\android-sdk-windows\\android-ndk-r19c"
|
||||
ANDROID_BUILD_VERSION: 28
|
||||
ANDROID_TOOLS_VERSION: 29.0.2
|
||||
|
||||
GRADLE_OPTS: -Dorg.gradle.daemon=false
|
||||
|
||||
SDK_TOOLS_URL: https://dl.google.com/android/repository/sdk-tools-windows-3859397.zip
|
||||
NDK_TOOLS_URL: https://dl.google.com/android/repository/android-ndk-r19c-windows-x86_64.zip
|
||||
|
||||
matrix:
|
||||
- nodejs_version: 10
|
||||
- nodejs_version: 12
|
||||
|
||||
install:
|
||||
# Install Android SDK Tools
|
||||
- mkdir "%ANDROID_HOME%"
|
||||
- appveyor DownloadFile "%SDK_TOOLS_URL%" -FileName "%TMP%/sdk-tools.zip"
|
||||
- 7z x "%TMP%/sdk-tools.zip" -o"%ANDROID_HOME%" > nul
|
||||
- set PATH=%PATH%;"%ANDROID_HOME%\tools\bin"
|
||||
|
||||
- yes 2> nul | sdkmanager --licenses > nul
|
||||
- yes 2> nul | sdkmanager "system-images;android-19;google_apis;armeabi-v7a"
|
||||
- yes 2> nul | sdkmanager "platforms;android-%ANDROID_BUILD_VERSION%"
|
||||
- yes 2> nul | sdkmanager "build-tools;%ANDROID_TOOLS_VERSION%"
|
||||
- yes 2> nul | sdkmanager "add-ons;addon-google_apis-google-23"
|
||||
- yes 2> nul | sdkmanager "extras;android;m2repository"
|
||||
|
||||
- appveyor DownloadFile "%NDK_TOOLS_URL%" -FileName "%TMP%/ndk.zip"
|
||||
- 7z x "%TMP%/ndk.zip" -o"%ANDROID_HOME%" > nul
|
||||
|
||||
- ps: Install-Product node $env:nodejs_version x64
|
||||
- npx envinfo@latest
|
||||
- appveyor-retry yarn install
|
||||
|
||||
build_script:
|
||||
- yarn run flow-check-android
|
||||
- yarn run flow-check-ios
|
||||
- yarn run test
|
||||
# - gradlew.bat RNTester:android:app:assembleRelease
|
||||
|
||||
cache:
|
||||
- node_modules
|
||||
- "%LOCALAPPDATA%/Yarn"
|
||||
- "%USERPROFILE%/.gradle/caches"
|
||||
- "%USERPROFILE%/.gradle/wrapper"
|
@ -1,5 +1,12 @@
|
||||
version: 2.1
|
||||
|
||||
# -------------------------
|
||||
# ORBS
|
||||
# -------------------------
|
||||
|
||||
orbs:
|
||||
win: circleci/windows@2.4.0
|
||||
|
||||
# -------------------------
|
||||
# DEFAULTS
|
||||
# -------------------------
|
||||
@ -13,6 +20,7 @@ defaults: &defaults
|
||||
- PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A: &github_token_a "78a72af35445ca3f8180"
|
||||
- PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B: &github_token_b "b1a98e0bbd56ff1ccba1"
|
||||
|
||||
|
||||
# -------------------------
|
||||
# EXECUTORS
|
||||
# -------------------------
|
||||
@ -629,6 +637,70 @@ jobs:
|
||||
command: |
|
||||
echo "Nightly build run"
|
||||
|
||||
# -------------------------
|
||||
# JOBS: Windows
|
||||
# -------------------------
|
||||
windows_job:
|
||||
executor:
|
||||
name: win/default
|
||||
environment:
|
||||
- ANDROID_HOME: "C:\\Android\\android-sdk"
|
||||
- ANDROID_NDK: "C:\\Android\\android-sdk\\ndk\\19.2.5345600"
|
||||
- ANDROID_BUILD_VERSION: 28
|
||||
- ANDROID_TOOLS_VERSION: 29.0.2
|
||||
- GRADLE_OPTS: -Dorg.gradle.daemon=false
|
||||
- NDK_VERSION: 19.2.5345600
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Install Android SDK Tools
|
||||
command: choco install android-sdk
|
||||
- run:
|
||||
name: Setup SDK
|
||||
command: sdkmanager --licenses
|
||||
- run: sdkmanager "system-images;android-19;google_apis;armeabi-v7a"
|
||||
- run: sdkmanager "platforms;android-%ANDROID_BUILD_VERSION%"
|
||||
- run: sdkmanager "build-tools;%ANDROID_TOOLS_VERSION%"
|
||||
- run: sdkmanager "add-ons;addon-google_apis-google-23"
|
||||
- run: sdkmanager "extras;android;m2repository"
|
||||
- run: sdkmanager "ndk;%NDK_VERSION%"
|
||||
- restore_cache:
|
||||
keys:
|
||||
- v5-win-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
|
||||
- v5-win-node-{{ arch }}-{{ .Branch }}-
|
||||
- v5-win-node-{{ arch }}-
|
||||
- run:
|
||||
name: Install Yarn
|
||||
command: choco install yarn
|
||||
- run:
|
||||
name: Get Env info
|
||||
command: npx envinfo@latest
|
||||
- run:
|
||||
name: Install Dependencies
|
||||
command: yarn install --frozen-lockfile --non-interactive
|
||||
- save_cache:
|
||||
key: v5-win-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
|
||||
paths:
|
||||
- C:\Users\circleci\AppData\Local\Yarn
|
||||
- run:
|
||||
name: Flow Check Android
|
||||
command: yarn flow-check-android
|
||||
- run:
|
||||
name: Flow Check iOS
|
||||
command: yarn flow-check-ios
|
||||
# TODO: reenable this test
|
||||
# - run:
|
||||
# name: Test Android Build
|
||||
# command: ./gradlew.bat RNTester:android:app:assembleRelease
|
||||
- run:
|
||||
name: Run Test
|
||||
command: yarn test
|
||||
- save_cache:
|
||||
key: v5-win-node-{{ arch }}-{{ .Branch }}-{{ checksum ".gradle" }}
|
||||
paths:
|
||||
- "%USERPROFILE%/.gradle/caches"
|
||||
- "%USERPROFILE%/.gradle/wrapper"
|
||||
|
||||
# -------------------------
|
||||
# WORK FLOWS
|
||||
# -------------------------
|
||||
@ -731,7 +803,9 @@ workflows:
|
||||
- js_coverage:
|
||||
requires:
|
||||
- setup
|
||||
|
||||
windows:
|
||||
jobs:
|
||||
- windows_job
|
||||
nightly:
|
||||
triggers:
|
||||
- schedule:
|
||||
|
@ -16,9 +16,6 @@
|
||||
<a href="https://circleci.com/gh/facebook/react-native">
|
||||
<img src="https://circleci.com/gh/facebook/react-native.svg?style=shield" alt="Current CircleCI build status." />
|
||||
</a>
|
||||
<a href="https://ci.appveyor.com/project/facebook/react-native/branch/master">
|
||||
<img src="https://ci.appveyor.com/api/projects/status/g8d58ipi3auqdtrk/branch/master?svg=true" alt="Current Appveyor build status." />
|
||||
</a>
|
||||
<a href="https://www.npmjs.org/package/react-native">
|
||||
<img src="https://badge.fury.io/js/react-native.svg" alt="Current npm package version." />
|
||||
</a>
|
||||
|
Loading…
Reference in New Issue
Block a user