Commit 0e56359
authored
chore(examples): Apply RNRepo to FabricExample (#3963)
## Description
Adds RNRepo build-tools integration to `FabricExample` so that CI builds
can consume pre-built native dependencies instead of compiling them from
scratch, speeding up CI.
The integration is guarded by `CI=true` / `ENV['CI']` environment
variables, so local development is unaffected.
## Changes
- `FabricExample/android/build.gradle` — resolves `@rnrepo/build-tools`
via Node and adds its Gradle plugin JAR to the buildscript classpath.
- `FabricExample/android/app/build.gradle` — applies
`org.rnrepo.tools.prebuilds-plugin` when running in CI.
- `FabricExample/ios/Podfile` — requires the RNRepo CocoaPods plugin and
calls `rnrepo_post_install` in the `post_install` hook, both gated on
`ENV['CI']`.
- `FabricExample/package.json` — adds `@rnrepo/build-tools
~0.1.3-beta.0` as a dev dependency.
## Performance
CI build time comparison (rnrepo vs baseline):
| Platform | Category | rnrepo | basic | Faster |
| --- | --- | --- | --- | --- |
| Android | Without runner cache | 6:53 avg | 8:35 avg | **19.8%** |
| Android | With runner cache | 3:17 avg | 5:29 avg | **40.1%** |
| iOS | Without runner cache | 6:22 | 6:16 | -1.6% |
| iOS | With runner cache | 6:28 avg | 6:18 avg | -2.6% |
| iOS | With runner cache and prebuilt rncore | 3:31 avg | 4:01 avg |
**12.4%** |
Android sees the biggest wins (~20% standard, ~40% with cache). iOS
gains are visible when `rncore` is prebuilt (~12%) (tracked in #3955).
## Test plan
- Verified that a local build (without `CI=true`) still works without
any RNRepo-related side effects.
- CI run with `CI=true` should pick up pre-built artifacts via the
RNRepo plugin on both Android and iOS.1 parent 959df62 commit 0e56359
6 files changed
Lines changed: 58 additions & 1 deletion
File tree
- .github/workflows
- FabricExample
- android
- app
- ios
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
5 | 20 | | |
6 | 21 | | |
7 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
14 | 25 | | |
15 | 26 | | |
16 | 27 | | |
17 | 28 | | |
| 29 | + | |
18 | 30 | | |
19 | 31 | | |
20 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
8 | 26 | | |
9 | 27 | | |
10 | 28 | | |
| |||
32 | 50 | | |
33 | 51 | | |
34 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
35 | 56 | | |
36 | 57 | | |
37 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3101 | 3101 | | |
3102 | 3102 | | |
3103 | 3103 | | |
| 3104 | + | |
| 3105 | + | |
| 3106 | + | |
| 3107 | + | |
| 3108 | + | |
| 3109 | + | |
| 3110 | + | |
3104 | 3111 | | |
3105 | 3112 | | |
3106 | 3113 | | |
| |||
3515 | 3522 | | |
3516 | 3523 | | |
3517 | 3524 | | |
| 3525 | + | |
3518 | 3526 | | |
3519 | 3527 | | |
3520 | 3528 | | |
| |||
0 commit comments