Skip to content
Merged
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
21 changes: 3 additions & 18 deletions .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Install dependencies
description: "Installs and caches the dependencies"
description: 'Installs and caches the dependencies'

runs:
using: "composite"
using: 'composite'
steps:
- name: Install dependencies
shell: bash
Expand All @@ -28,18 +28,3 @@ runs:
shell: bash
run: yarn install --frozen-lockfile
working-directory: example

- name: Cache fabric example node modules
id: cache-fabricexample-npm
uses: actions/cache@v3
env:
cache-name: cached-fabric-npm-deps
with:
path: fabricexample/node_modules
key: ${{ hashFiles('./fabricexample/yarn.lock') }}-${{ hashFiles('./yarn.lock') }}

- name: Install required fabric example dependencies on yarn.lock change
if: steps.cache-fabricexample-npm.outputs.cache-hit != 'true'
shell: bash
run: yarn install --frozen-lockfile
working-directory: fabricexample
69 changes: 26 additions & 43 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,17 @@ on:
- '.github/workflows/android.yml'
- 'android/**'
- 'example/android/**'
- 'fabricexample/android/**'
push:
branches:
- master


concurrency:
concurrency:
group: ${{ github.ref }}-android
cancel-in-progress: true

jobs:
android-build:
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-dependencies
Expand All @@ -42,51 +40,36 @@ jobs:

- name: Install required example dependencies on yarn.lock change
if: steps.cache-example-npm.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
working-directory: example
run: yarn bootstrap-no-pods --frozen-lockfile

- uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "11"

- name: Build Android
run: ./gradlew assembleDebug
working-directory: example/android

android-build-fabric:
runs-on: ubuntu-latest
needs: android-build
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-dependencies
distribution: 'zulu'
java-version: '11'

- name: Pull dependencies
- name: Gradle cache
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ hashFiles('./package.json') }}
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}

- name: Cache fabric example node modules
id: cache-fabricexample-npm
uses: actions/cache@v3
env:
cache-name: cached-fabric-npm-deps
with:
path: fabricexample/node_modules
key: ${{ hashFiles('./fabricexample/yarn.lock') }}-${{ hashFiles('./yarn.lock') }}

- name: Install required fabric example dependencies on yarn.lock change
if: steps.cache-fabricexample-npm.outputs.cache-hit != 'true'
shell: bash
run: yarn install --frozen-lockfile
working-directory: fabricexample
- name: Install Maestro CLI
run: export MAESTRO_VERSION=1.21.3; curl -Ls "https://get.maestro.mobile.dev" | bash

- uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "11"
- name: Add Maestro to path
run: echo "${HOME}/.maestro/bin" >> $GITHUB_PATH

- name: Build Android (Fabric)
run: ./gradlew assembleDebug -PreactNativeArchitectures=arm64-v8a
working-directory: fabricexample/android
- name: Run Android Emulator and app
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
arch: x86_64
target: google_apis
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: |
yarn run-example-android
yarn test:e2e:android
63 changes: 15 additions & 48 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ on:
- '.github/workflows/ios.yml'
- 'ios/**'
- 'example/ios/**'
- 'fabricexample/ios/**'
push:
branches:
push:
branches:
- master

concurrency:
Expand Down Expand Up @@ -57,51 +56,19 @@ jobs:
run: NO_FLIPPER=1 pod install
working-directory: example/ios

- name: Build iOS
run: xcodebuild -scheme PagerViewExample -workspace PagerViewExample.xcworkspace -sdk iphonesimulator -configuration Debug COMPILER_INDEX_STORE_ENABLE=NO
working-directory: example/ios

ios-build-fabric:
needs: ios-build
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-dependencies
- name: Install Maestro CLI
run: |
curl -Ls "https://get.maestro.mobile.dev" | bash
brew tap facebook/fb
brew install facebook/fb/idb-companion

- name: Pull dependencies
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ hashFiles('./package.json') }}
- name: Add Maestro to path
run: echo "${HOME}/.maestro/bin" >> $GITHUB_PATH

- name: Cache fabric example node modules
id: cache-fabricexample-npm
uses: actions/cache@v3
env:
cache-name: cached-fabric-npm-deps
with:
path: fabricexample/node_modules
key: ${{ hashFiles('./fabricexample/yarn.lock') }}-${{ hashFiles('./yarn.lock') }}

- name: Install required fabric example dependencies on yarn.lock change
if: steps.cache-fabricexample-npm.outputs.cache-hit != 'true'
shell: bash
run: yarn install --frozen-lockfile
working-directory: fabricexample

- name: Cache FabricExample Pods
id: cache-pods-fabric
uses: actions/cache@v3
env:
cache-name: cached-ios-pods-deps-fabric
with:
path: fabricexample/ios/Pods
key: ${{ hashFiles('./fabricexample/ios/Podfile.lock') }}

- name: Install FabricExample Pods
run: NO_FLIPPER=1 pod install
working-directory: fabricexample/ios
- name: Build iOS App
run: |
yarn run-example-ios

- name: Build iOS (Fabric)
run: xcodebuild -scheme FabricExample -workspace FabricExample.xcworkspace -sdk iphonesimulator -configuration Debug COMPILER_INDEX_STORE_ENABLE=NO
working-directory: fabricexample/ios
- name: Run tests
run: |
yarn test:e2e:ios
19 changes: 5 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ on:
- master
- next

concurrency:
concurrency:
group: ${{ github.ref }}-js
cancel-in-progress: true

jobs:
install-dependencies:
install-dependencies:
name: Install dependencies
runs-on: ubuntu-latest
steps:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
- name: Install dependencies
uses: ./.github/actions/install-dependencies

verify-package-source:
Expand All @@ -47,20 +47,11 @@ jobs:
path: example/node_modules
key: ${{ hashFiles('./example/yarn.lock') }}-${{ hashFiles('./yarn.lock') }}

- name: Pull fabric example node modules
id: cache-fabricexample-npm
uses: actions/cache@v3
env:
cache-name: cached-fabric-npm-deps
with:
path: fabricexample/node_modules
key: ${{ hashFiles('./fabricexample/yarn.lock') }}-${{ hashFiles('./yarn.lock') }}

- name: Lint files
run: yarn lint

- name: Typecheck files
run: yarn typescript

- name: Build package
run: yarn prepare
run: yarn prepare
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,10 @@ example/vendor
fabricexample/ios/Pods
fabricexample/vendor
fabricexample/android/app/.cxx
.lefthookrc
lefthook.yml


# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*
.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ class PageSelectedEvent(viewTag: Int, private val mPosition: Int) : Event<PageSe
return EVENT_NAME
}

override fun canCoalesce(): Boolean {
return false
}

override fun dispatch(rctEventEmitter: RCTEventEmitter) {
rctEventEmitter.receiveEvent(viewTag, eventName, serializeEventData())
}
Expand Down
6 changes: 0 additions & 6 deletions example/.buckconfig

This file was deleted.

1 change: 1 addition & 0 deletions example/.node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
5 changes: 2 additions & 3 deletions example/Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '2.7.5'

gem 'cocoapods', '~> 1.11', '>= 1.11.2'
ruby '>= 2.6.10'
gem 'cocoapods', '>= 1.11.3'
12 changes: 6 additions & 6 deletions example/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ GEM
specs:
CFPropertyList (3.0.5)
rexml
activesupport (6.1.7)
activesupport (6.1.7.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand Down Expand Up @@ -54,7 +54,7 @@ GEM
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.1.10)
concurrent-ruby (1.2.2)
escape (0.0.4)
ethon (0.15.0)
ffi (>= 1.15.0)
Expand All @@ -66,7 +66,7 @@ GEM
i18n (1.12.0)
concurrent-ruby (~> 1.0)
json (2.6.2)
minitest (5.16.3)
minitest (5.18.0)
molinillo (0.8.0)
nanaimo (0.3.0)
nap (1.1.0)
Expand All @@ -76,7 +76,7 @@ GEM
ruby-macho (2.5.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (2.0.5)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0)
Expand All @@ -85,13 +85,13 @@ GEM
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
zeitwerk (2.6.0)
zeitwerk (2.6.7)

PLATFORMS
ruby

DEPENDENCIES
cocoapods (~> 1.11, >= 1.11.2)
cocoapods (>= 1.11.3)

RUBY VERSION
ruby 2.7.5p203
Expand Down
1 change: 0 additions & 1 deletion example/_node-version

This file was deleted.

Loading