Repository navigation
148 lines (132 loc) · 4.54 KB
/
Copy pathbare-example.yml
File metadata and controls
148 lines (132 loc) · 4.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: Bare example
# Build-only verification of the bare RN example (old RN version, no Expo).
# Behavioral coverage runs against the Expo 57 example in ci.yml; this keeps
# the non-Expo integration compiling without paying for it on every PR.
on:
workflow_dispatch:
schedule:
# Weekly, Monday 06:00 UTC
- cron: '0 6 * * 1'
pull_request:
paths:
- 'example/**'
jobs:
build-bare-ios:
# Pinned to macos-15 — see build-ios in ci.yml.
runs-on: macos-15
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
backend: [experimental, legacy]
nitro: ['0.36.5']
include:
- backend: experimental
nitro: '0.37.2'
env:
XCODE_VERSION: 26.3
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- name: Use react-native-nitro-modules ${{ matrix.nitro }}
if: matrix.nitro != '0.36.5'
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: 'false'
run: |
npm pkg set resolutions.react-native-nitro-modules=${{ matrix.nitro }}
yarn install
- name: Use appropriate Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- name: Restore cocoapods
id: cocoapods-cache
uses: actions/cache/restore@v4
with:
path: example/ios/Pods
key: ${{ runner.os }}-bare-cocoapods-${{ matrix.backend }}-nitro${{ matrix.nitro }}-${{ hashFiles('package.json', '*.podspec', 'example/ios/Podfile') }}
restore-keys: |
${{ runner.os }}-bare-cocoapods-${{ matrix.backend }}-nitro${{ matrix.nitro }}-
- name: Install cocoapods
working-directory: example
env:
USE_RIVE_LEGACY: ${{ matrix.backend == 'legacy' && '1' || '' }}
run: |
bundle install
rm -f ios/Podfile.lock ios/Pods/Manifest.lock
bundle exec pod install --project-directory=ios
- name: Save cocoapods cache
if: steps.cocoapods-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: example/ios/Pods
key: ${{ steps.cocoapods-cache.outputs.cache-primary-key }}
- name: Build iOS app
working-directory: example/ios
run: |
set -o pipefail && xcodebuild \
-derivedDataPath build \
-workspace RiveExample.xcworkspace \
-scheme RiveExample \
-sdk iphonesimulator \
-configuration Debug \
build \
CODE_SIGNING_ALLOWED=NO
build-bare-android:
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
backend: [experimental, legacy]
nitro: ['0.36.5']
include:
- backend: experimental
nitro: '0.37.2'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- name: Use react-native-nitro-modules ${{ matrix.nitro }}
if: matrix.nitro != '0.36.5'
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: 'false'
run: |
npm pkg set resolutions.react-native-nitro-modules=${{ matrix.nitro }}
yarn install
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Finalize Android SDK
run: |
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
for i in 1 2 3; do
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "ndk;27.1.12297006" && break
echo "NDK install attempt $i failed, retrying..."
sleep 10
done
- name: Enable legacy Rive backend
if: matrix.backend == 'legacy'
run: |
printf '\nUSE_RIVE_LEGACY=true\n' >> example/android/gradle.properties
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-gradle-bare-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-bare-
${{ runner.os }}-gradle-
- name: Build Android app
working-directory: example/android
env:
JAVA_OPTS: "-XX:MaxHeapSize=6g"
run: |
./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=x86_64