Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/android-build-fabric-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: FabricExample Android check
on:
pull_request:
paths:
- .github/workflows/android-build-test.yml
- 'android/**'
- 'src/fabric/**'
- 'package.json'
- 'apps/fabric-example/android/**'
- 'apps/fabric-example/package.json'
push:
branches:
- main
workflow_dispatch:

jobs:
build:
uses: ./.github/workflows/android-build.yml
with:
working-directory: 'fabric-example'
20 changes: 20 additions & 0 deletions .github/workflows/android-build-paper-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: PaperExample Android check
on:
pull_request:
paths:
- .github/workflows/android-build-paper-test.yml
- 'android/**'
- 'src/fabric/**'
- 'package.json'
- 'apps/paper-example/android/**'
- 'apps/paper-example/package.json'
push:
branches:
- main
workflow_dispatch:

jobs:
build:
uses: ./.github/workflows/android-build.yml
with:
working-directory: 'paper-example'
20 changes: 20 additions & 0 deletions .github/workflows/android-build-tests-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: TestsExample Android check
on:
pull_request:
paths:
- .github/workflows/android-build-tests-test.yml
- 'android/**'
- 'src/fabric/**'
- 'package.json'
- 'apps/tests-example/android/**'
- 'apps/tests-example/package.json'
push:
branches:
- main
workflow_dispatch:

jobs:
build:
uses: ./.github/workflows/android-build.yml
with:
working-directory: 'tests-example'
Original file line number Diff line number Diff line change
@@ -1,29 +1,16 @@
name: Example Android check
name: Android Build Reusable
on:
pull_request:
paths:
- .github/workflows/android-build-test.yml
- 'android/**'
- 'src/fabric/**'
- 'package.json'
- 'apps/paper-example/android/**'
- 'apps/paper-example/package.json'
- 'apps/fabric-example/android/**'
- 'apps/fabric-example/package.json'
push:
branches:
- main
workflow_dispatch:
workflow_call:
inputs:
working-directory:
required: true
type: string

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
working-directory: [paper-example, fabric-example]
fail-fast: false
concurrency:
group: android-${{ matrix.working-directory }}-${{ github.ref }}
group: android-${{ inputs.working-directory }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout Git repository
Expand All @@ -48,12 +35,12 @@ jobs:
- 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 }}-
path: apps/${{ inputs.working-directory }}/node_modules
key: ${{ runner.os }}-node-modules-${{ inputs.working-directory }}-${{ hashFiles(format('{0}/yarn.lock', inputs.working-directory)) }}
restore-keys: ${{ runner.os }}-node-modules-${{ inputs.working-directory }}-

- name: Install app node_modules
working-directory: apps/${{ matrix.working-directory }}
working-directory: apps/${{ inputs.working-directory }}
run: yarn install --frozen-lockfile

- name: Get build cache
Expand All @@ -62,10 +49,10 @@ jobs:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{matrix.working-directory}}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
key: ${{ runner.os }}-gradle-${{inputs.working-directory}}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-${{matrix.working-directory}}-
${{ runner.os }}-gradle-${{inputs.working-directory}}-

- name: Build app
working-directory: apps/${{ matrix.working-directory }}/android
working-directory: apps/${{ inputs.working-directory }}/android
run: ./gradlew assembleDebug --build-cache --console=plain -PreactNativeArchitectures=arm64-v8a
21 changes: 21 additions & 0 deletions .github/workflows/ios-build-fabric-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: FabricExample iOS check
on:
pull_request:
paths:
- .github/workflows/ios-build-fabric-test.yml
- RNSVG.podspec
- apple/**
- src/fabric/**
- package.json
- apps/fabric-example/package.json
- apps/fabric-example/ios/**
push:
branches:
- main
workflow_dispatch:

jobs:
build:
uses: ./.github/workflows/ios-build.yml
with:
working-directory: 'fabric-example'
21 changes: 21 additions & 0 deletions .github/workflows/ios-build-paper-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: PaperExample iOS check
on:
pull_request:
paths:
- .github/workflows/ios-build-paper-test.yml
- RNSVG.podspec
- apple/**
- src/fabric/**
- package.json
- apps/paper-example/package.json
- apps/paper-example/ios/**
push:
branches:
- main
workflow_dispatch:

jobs:
build:
uses: ./.github/workflows/ios-build.yml
with:
working-directory: 'paper-example'
21 changes: 21 additions & 0 deletions .github/workflows/ios-build-tests-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: TestsExample iOS check
on:
pull_request:
paths:
- .github/workflows/ios-build-tests-test.yml
- RNSVG.podspec
- apple/**
- src/fabric/**
- package.json
- apps/tests-example/package.json
- apps/tests-example/ios/**
push:
branches:
- main
workflow_dispatch:

jobs:
build:
uses: ./.github/workflows/ios-build.yml
with:
working-directory: 'tests-example'
Original file line number Diff line number Diff line change
@@ -1,32 +1,18 @@
name: Example iOS check
name: iOS Build Reusable
on:
pull_request:
paths:
- .github/workflows/ios-build-test.yml
- RNSVG.podspec
- apple/**
- src/fabric/**
- package.json
- apps/paper-example/package.json
- apps/paper-example/ios/**
- apps/fabric-example/package.json
- apps/fabric-example/ios/**
push:
branches:
- main
workflow_dispatch:
workflow_call:
inputs:
working-directory:
required: true
type: string

jobs:
build:
runs-on: macos-latest
strategy:
matrix:
working-directory: [paper-example, fabric-example]
fail-fast: false
env:
DEVICE: iPhone 17 Pro
concurrency:
group: ios-${{ matrix.working-directory }}-${{ github.ref }}
group: ios-${{ inputs.working-directory }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout Git repository
Expand All @@ -50,48 +36,48 @@ jobs:
- 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('apps/{0}/yarn.lock', matrix.working-directory)) }}
restore-keys: ${{ runner.os }}-node-modules-${{ matrix.working-directory }}-
path: apps/${{ inputs.working-directory }}/node_modules
key: ${{ runner.os }}-node-modules-${{ inputs.working-directory }}-${{ hashFiles(format('apps/{0}/yarn.lock', inputs.working-directory)) }}
restore-keys: ${{ runner.os }}-node-modules-${{ inputs.working-directory }}-

- name: Install app node_modules
working-directory: apps/${{ matrix.working-directory }}
working-directory: apps/${{ inputs.working-directory }}
run: yarn install --frozen-lockfile

- name: Get Pods cache
uses: actions/cache@v4
with:
path: apps/${{ matrix.working-directory }}/ios/Pods
key: ${{ runner.os }}-pods-${{ matrix.working-directory }}-${{ hashFiles(format('apps/{0}/ios/Podfile.lock', matrix.working-directory)) }}
path: apps/${{ inputs.working-directory }}/ios/Pods
key: ${{ runner.os }}-pods-${{ inputs.working-directory }}-${{ hashFiles(format('apps/{0}/ios/Podfile.lock', inputs.working-directory)) }}
restore-keys: |
${{ runner.os }}-pods-${{ matrix.working-directory }}-
${{ runner.os }}-pods-${{ inputs.working-directory }}-

- name: Install Pods
id: install_pods
continue-on-error: true
working-directory: apps/${{ matrix.working-directory }}/ios
working-directory: apps/${{ inputs.working-directory }}/ios
run: bundle install && bundle exec pod install

- if: steps.install_pods.outcome == 'failure'
id: remove_pods
name: Remove pods
working-directory: apps/${{ matrix.working-directory }}/ios
working-directory: apps/${{ inputs.working-directory }}/ios
run: rm -rf build Pods Podfile.lock

- if: steps.remove_pods.outcome == 'success'
id: reinstall_pods
name: Reinstall pods
working-directory: apps/${{ matrix.working-directory }}/ios
working-directory: apps/${{ inputs.working-directory }}/ios
run: bundle install && bundle exec pod install

- name: Get build artifacts cache
uses: actions/cache@v4
with:
path: ~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-ios-derived-data-${{ matrix.working-directory }}-${{ hashFiles(format('apps/{0}/ios/Podfile.lock', matrix.working-directory)) }}
key: ${{ runner.os }}-ios-derived-data-${{ inputs.working-directory }}-${{ hashFiles(format('apps/{0}/ios/Podfile.lock', inputs.working-directory)) }}
restore-keys: |
${{ runner.os }}-ios-derived-data-${{ matrix.working-directory }}-
${{ runner.os }}-ios-derived-data-${{ inputs.working-directory }}-

- name: Build app
working-directory: apps/${{ matrix.working-directory }}
working-directory: apps/${{ inputs.working-directory }}
run: npx react-native run-ios --simulator="${{ env.DEVICE }}" --mode Debug --verbose --no-packager