mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-05 22:56:11 +00:00
# Summary Due to the large number of example apps in the repository, I decided to change the structure and move all applications into an "apps" folder to maintain a clear structure.
72 lines
2.3 KiB
YAML
72 lines
2.3 KiB
YAML
name: Example Android check
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- .github/workflows/android-build-test.yml
|
|
- 'android/**'
|
|
- 'src/fabric/**'
|
|
- 'package.json'
|
|
- 'apps/example/android/**'
|
|
- 'apps/example/package.json'
|
|
- 'apps/fabric-example/android/**'
|
|
- 'apps/fabric-example/package.json'
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
working-directory: [example, fabric-example]
|
|
fail-fast: false
|
|
concurrency:
|
|
group: android-${{ matrix.working-directory }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
steps:
|
|
- name: Checkout Git repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: '17'
|
|
|
|
- name: Get react-native-svg node_modules cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: node_modules
|
|
key: ${{ runner.os }}-node-modules-svg-${{ hashFiles('yarn.lock') }}
|
|
restore-keys: ${{ runner.os }}-node-modules-svg-
|
|
|
|
- name: Install react-native-svg node_modules
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Get app node_modules cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: apps/${{ 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: apps/${{ matrix.working-directory }}
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Get build cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: ${{ runner.os }}-gradle-${{matrix.working-directory}}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-${{matrix.working-directory}}-
|
|
|
|
- name: Build app
|
|
working-directory: apps/${{ matrix.working-directory }}/android
|
|
run: ./gradlew assembleDebug --build-cache --console=plain -PreactNativeArchitectures=arm64-v8a
|