Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
124 changes: 124 additions & 0 deletions .github/workflows/bare-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
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]
env:
XCODE_VERSION: 26.3
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- 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 }}-${{ hashFiles('package.json', '*.podspec', 'example/ios/Podfile') }}
restore-keys: |
${{ runner.os }}-bare-cocoapods-${{ matrix.backend }}-

- 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]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- 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
Loading
Loading