Files
flipper/.github/workflows/react-native-example.yml
Pascal Hartig da9511a5bf Fix CI build for Android (#2836)
Summary:
I've been really sweating about this one. It looks like Google now removed NDK 21 as it's too old. However, we've been struggling with the upgrade because OpenSSL was built against an old version of the NDK/glibc/LLVM/some other stuff.

I've now managed to create an OpenSSL distribution for 1.1.1k (we had 1.1.0h before) that seems to build with this after some small modifications.

This seems to do the trick, but I wouldn't be shocked if we found some more incompatibilities further down the line.

Pull Request resolved: https://github.com/facebook/flipper/pull/2836

Test Plan:
- Locally: `./gradlew :tutorial:installDebug`. Builds, starts up. Cool.
- Public GitHub CI: Happy.
- Circle CI: Only triggers post-land. We'll see. But the setup is simple, so hopefully it should work there, too.
- Internal CI: Waiting for signal.

Reviewed By: fabiomassimo

Differential Revision: D30839209

Pulled By: passy

fbshipit-source-id: efe599f28cc0edfdf2149f905c3483555239edc0
2021-09-09 08:46:59 -07:00

63 lines
2.3 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: 12.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: 12.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.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
cd android && ./gradlew assembleDebug