fix: add number to source prop type to support require() assets #86
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| merge_group: | |
| types: | |
| - checks_requested | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Lint files | |
| run: yarn lint | |
| - name: Typecheck files | |
| run: yarn typecheck | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| build-library: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Build package | |
| run: yarn prepare | |
| build-android: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Install JDK | |
| uses: actions/setup-java@v3 | |
| 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" | |
| - name: Cache Gradle | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.gradle/wrapper | |
| ~/.gradle/caches | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Build Android example (Paper) | |
| env: | |
| JAVA_OPTS: "-XX:MaxHeapSize=6g" | |
| run: yarn android:paper:build | |
| - name: Build Android example (Fabric) | |
| env: | |
| JAVA_OPTS: "-XX:MaxHeapSize=6g" | |
| run: yarn android:fabric:build | |
| build-ios: | |
| runs-on: macos-14 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| mode: [paper, fabric] | |
| env: | |
| RCT_NEW_ARCH_ENABLED: ${{ matrix.mode == 'fabric' && '1' || '0' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Select Xcode 16.1 | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '16.1' | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Cache CocoaPods | |
| id: cocoapods-cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| example/ios/Pods | |
| example/ios/build/generated/ios | |
| key: ${{ runner.os }}-cocoapods-${{ matrix.mode }}-${{ hashFiles('example/ios/Podfile.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cocoapods-${{ matrix.mode }}- | |
| - name: Install CocoaPods | |
| run: | | |
| cd example/ios | |
| set -o pipefail | |
| if ! pod install; then | |
| echo "pod install failed; retrying after updating hermes-engine" >&2 | |
| pod update hermes-engine --no-repo-update | |
| pod install | |
| fi | |
| env: | |
| NO_FLIPPER: 1 | |
| - name: Ensure DerivedData directory | |
| run: mkdir -p ~/Library/Developer/Xcode/DerivedData | |
| - name: Cache DerivedData | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/Library/Developer/Xcode/DerivedData/example-* | |
| key: ${{ runner.os }}-deriveddata-${{ matrix.mode }}-${{ hashFiles('example/ios/Podfile.lock') }} | |
| - name: Build iOS example (${{ matrix.mode }}) | |
| run: yarn ios:${{ matrix.mode }}:build | |
| build-web: | |
| runs-on: ubuntu-latest | |
| env: | |
| TURBO_CACHE_DIR: .turbo/web | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Cache turborepo for Web | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ env.TURBO_CACHE_DIR }} | |
| key: ${{ runner.os }}-turborepo-web-${{ hashFiles('yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-turborepo-web- | |
| - name: Check turborepo cache for Web | |
| run: | | |
| TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:web --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:web').cache.status") | |
| if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then | |
| echo "turbo_cache_hit=1" >> $GITHUB_ENV | |
| fi | |
| - name: Build example for Web | |
| run: | | |
| yarn turbo run build:web --cache-dir="${{ env.TURBO_CACHE_DIR }}" |