feat(hooks): async instance creation via useViewModelInstance({ async: true }) #9
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |