Summary: Following mweststrate's advice on how to fix this. Pull Request resolved: https://github.com/facebook/flipper/pull/2956 Test Plan: Watch the Action. Reviewed By: lblasa Differential Revision: D31502115 Pulled By: passy fbshipit-source-id: 0f6dc73bcfde30fe7e2ee78e58d1c8e6fc16ec29
63 lines
2.4 KiB
YAML
63 lines
2.4 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 1.8
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 1.8
|
|
- 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
|