Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/4054 Build RNW example on Github Reviewed By: aigoncharov Differential Revision: D39257309 fbshipit-source-id: dda414c025bfe6720449fe6c3d81fe9fb9373b2a
97 lines
3.6 KiB
YAML
97 lines
3.6 KiB
YAML
name: Build React Native example
|
|
on: [push, pull_request]
|
|
jobs:
|
|
build-react-native-example-ios:
|
|
runs-on: macos-latest
|
|
defaults:
|
|
run:
|
|
working-directory: react-native/ReactNativeFlipperExample
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2.1.5
|
|
with:
|
|
node-version: 14.x
|
|
- uses: maxim-lobanov/setup-cocoapods@v1
|
|
with:
|
|
# Path to Podfile.lock file to determine Cocoapods version
|
|
# n.b. doesn't seem to respect cwd:
|
|
podfile-path: react-native/ReactNativeFlipperExample/ios/Podfile.lock
|
|
- name: Install yarn dependencies
|
|
run: yarn install --ignore-scripts
|
|
- name: Install react-native-flipper
|
|
run: yarn relative-deps
|
|
- name: Install pod dependencies
|
|
run: cd ios && pod install --repo-update
|
|
- name: Build React Native iOS Example debug app
|
|
run: |
|
|
cd ios
|
|
IPHONESIMULATOR=$(xcodebuild -showsdks | grep -o "iphonesimulator[0-9]\\+\\.[0-9]\\+$") && echo $IPHONESIMULATOR
|
|
xcodebuild -workspace ReactNativeFlipperExample.xcworkspace -configuration Debug -scheme ReactNativeFlipperExample -sdk $IPHONESIMULATOR EXCLUDED_ARCHS="arm64"
|
|
|
|
build-react-native-example-android:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: react-native/ReactNativeFlipperExample
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2.1.5
|
|
with:
|
|
node-version: 14.x
|
|
- name: set up JDK
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 11
|
|
- name: Compute build cache
|
|
run: ${GITHUB_WORKSPACE}/scripts/checksum-android.sh checksum-android.txt
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.gradle/caches/modules-*
|
|
~/.gradle/caches/jars-*
|
|
~/.gradle/caches/build-cache-*
|
|
key: gradle-${{ hashFiles('checksum-android.txt') }}
|
|
- name: Install yarn dependencies
|
|
run: yarn install --ignore-scripts
|
|
- name: Install react-native-flipper
|
|
run: yarn relative-deps
|
|
- name: Build React Native Android Example debug app
|
|
run: |
|
|
mkdir -p android/app/src/main/assets
|
|
yarn react-native bundle --platform android --dev true --entry-file index.native.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
|
|
cd android && ./gradlew assembleDebug
|
|
|
|
build-react-native-example-windows:
|
|
runs-on: windows-2019
|
|
defaults:
|
|
run:
|
|
working-directory: react-native/ReactNativeFlipperExample
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2.1.5
|
|
with:
|
|
node-version: 14.x
|
|
- uses: nuget/setup-nuget@v1
|
|
with:
|
|
nuget-version: '5.x'
|
|
- uses: microsoft/setup-msbuild@v1.1
|
|
- name: Gather environment info
|
|
run: npx envinfo
|
|
- name: Install vcpkg packages
|
|
run: vcpkg install openssl:x64-uwp openssl:arm-uwp
|
|
- name: Integrate vcpkg
|
|
run: vcpkg integrate install
|
|
- name: Install yarn dependencies (react-native-flipper)
|
|
run: yarn install
|
|
working-directory: react-native/react-native-flipper
|
|
- name: Nuget restore (react-native-flipper)
|
|
run: nuget install ReactNativeFlipper/packages.config
|
|
working-directory: react-native/react-native-flipper/windows
|
|
- name: Install yarn dependencies
|
|
run: yarn install
|
|
- name: Install react-native-flipper
|
|
run: yarn relative-deps
|
|
- name: Build React Native Windows Example debug app
|
|
shell: powershell
|
|
run: npx react-native run-windows --logging --no-autolink --no-packager --no-deploy --no-launch --arch x64
|