Files
react-native-svg/.github/workflows/android-build-test.yml
Wojciech Lewicki 77267be5fc feat: support Fabric on Android (#1804)
Most of Android changes for Fabric and bump of FabricExample to RN 0.69.2. iOS and JS changes are available in #1821.
The most notable change on Android is adding methods to components that accept String values of each NumberProp instead of Dynamic. Another change is changed structure of RenderableViewManager.java since we needed to abstract methods that belong only to components inheriting from VirtualView in order to be able to properly override them in their children.
2022-08-12 11:42:44 +02:00

80 lines
3.0 KiB
YAML

name: Test Android build
on:
pull_request:
paths:
- '.github/workflows/android-build-test.yml'
- 'android/**'
- 'common/**'
- 'Example/android/**'
- 'FabricExample/android/**'
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
working-directory: [Example, FabricExample]
concurrency:
group: android-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Accept licenses
run: /bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
- name: Restore svg node_modules from cache
uses: actions/cache@v2
id: cache-node-modules-svg
with:
path: |
node_modules
key: ${{ runner.os }}-node-modules-svg-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-modules-svg
- name: Install svg node_modules
run: yarn install --frozen-lockfile
- name: Restore app node_modules from cache
uses: actions/cache@v2
id: cache-node-modules-app
with:
path: |
${{ matrix.working-directory }}/node_modules
key: ${{ runner.os }}-node-modules-${{ matrix.working-directory }}-${{ hashFiles(format('{0}/yarn.lock', matrix.working-directory)) }}
restore-keys: |
${{ runner.os }}-node-modules-${{ matrix.working-directory }}-
- name: Install app node_modules
working-directory: ${{ matrix.working-directory }}
run: yarn install --frozen-lockfile
- name: Restore build from cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
android/build
android/.cxx
${{ matrix.working-directory }}/android/build
${{ matrix.working-directory }}/android/.cxx
${{ matrix.working-directory }}/android/.gradle
${{ matrix.working-directory }}/android/app/build
${{ matrix.working-directory }}/android/app/.cxx
${{ matrix.working-directory }}/node_modules/react-native/ReactAndroid/build
${{ matrix.working-directory }}/node_modules/react-native/ReactAndroid/hermes-engine/build
${{ matrix.working-directory }}/node_modules/react-native/ReactAndroid/hermes-engine/.cxx
key: ${{ runner.os }}-build5-${{ matrix.working-directory }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'android/build.gradle', format('{0}/node_modules/react-native/sdks/.hermesversion', matrix.working-directory)) }}
- name: Build app
working-directory: ${{ matrix.working-directory }}/android
run: ./gradlew assembleDebug --build-cache --console=plain -PreactNativeArchitectures=arm64-v8a