From 57bfcc3f3010cbcf549644985606d64c4857cd61 Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Sat, 21 Jun 2025 22:18:45 +0200 Subject: [PATCH] ci: remove manual pod install step --- .github/workflows/build-templates.yml | 27 ++----------------- .../common/$.github/workflows/ci.yml | 20 +------------- .../native-common/{%- project.name %}.podspec | 2 +- 3 files changed, 4 insertions(+), 45 deletions(-) diff --git a/.github/workflows/build-templates.yml b/.github/workflows/build-templates.yml index d1df5d940..f2bcad51e 100644 --- a/.github/workflows/build-templates.yml +++ b/.github/workflows/build-templates.yml @@ -231,38 +231,15 @@ jobs: uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: ${{ env.XCODE_VERSION }} - - - name: Restore cocoapods - if: env.ios_build == 1 && env.turbo_cache_hit_ios != 1 - id: library-cocoapods-cache - uses: actions/cache/restore@v4 - with: - path: | - ${{ env.work_dir }}/**/ios/Pods - ${{ env.work_dir }}/**/ios/Podfile.lock - key: ${{ runner.os }}-library-cocoapods-${{ hashFiles(format('{0}/example/ios/Podfile', env.work_dir)) }}-${{ hashFiles(format('{0}/yarn.lock', env.work_dir)) }}-${{ hashFiles(format('{0}/**/*ViewNativeComponent.ts', env.work_dir), format('{0}/**/Native*.ts', env.work_dir), format('{0}/**/*.nitro.ts', env.work_dir)) }} - restore-keys: | - ${{ runner.os }}-library-cocoapods-${{ hashFiles(format('{0}/example/ios/Podfile', env.work_dir)) }}-${{ hashFiles(format('{0}/yarn.lock', env.work_dir)) }}- - ${{ runner.os }}-library-cocoapods-${{ hashFiles(format('{0}/example/ios/Podfile', env.work_dir)) }}- - ${{ runner.os }}-library-cocoapods- - - name: Install cocoapods - if: env.ios_build == 1 && env.turbo_cache_hit_ios != 1 && steps.library-cocoapods-cache.outputs.cache-hit != 'true' + if: env.ios_build == 1 && env.turbo_cache_hit_ios != 1 working-directory: ${{ env.work_dir }} run: | cd example bundle install + bundle exec pod repo update --verbose bundle exec pod install --project-directory=ios - - name: Cache cocoapods - if: env.ios_build == 1 && env.turbo_cache_hit_ios != 1 && steps.library-cocoapods-cache.outputs.cache-hit != 'true' - uses: actions/cache/save@v4 - with: - path: | - ${{ env.work_dir }}/**/ios/Pods - ${{ env.work_dir }}/**/ios/Podfile.lock - key: ${{ steps.library-cocoapods-cache.outputs.cache-primary-key }} - - name: Build example (iOS) if: env.ios_build == 1 working-directory: ${{ env.work_dir }} diff --git a/packages/create-react-native-library/templates/common/$.github/workflows/ci.yml b/packages/create-react-native-library/templates/common/$.github/workflows/ci.yml index 50952350d..9fa7e5228 100644 --- a/packages/create-react-native-library/templates/common/$.github/workflows/ci.yml +++ b/packages/create-react-native-library/templates/common/$.github/workflows/ci.yml @@ -151,32 +151,14 @@ jobs: with: xcode-version: ${{ env.XCODE_VERSION }} - - name: Restore cocoapods - if: env.turbo_cache_hit != 1 - id: cocoapods-cache - uses: actions/cache/restore@v4 - with: - path: | - **/ios/Pods - key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }} - restore-keys: | - ${{ runner.os }}-cocoapods- - - name: Install cocoapods if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true' run: | cd example bundle install + bundle exec pod repo update --verbose bundle exec pod install --project-directory=ios - - name: Cache cocoapods - if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true' - uses: actions/cache/save@v4 - with: - path: | - **/ios/Pods - key: ${{ steps.cocoapods-cache.outputs.cache-key }} - - name: Build example for iOS run: | yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" diff --git a/packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec b/packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec index 95125f208..17b3180b2 100644 --- a/packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec +++ b/packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec @@ -24,7 +24,7 @@ Pod::Spec.new do |s| <% if (project.moduleConfig === "nitro-modules") { -%> s.source_files = [ - "ios/**/*.{swift}",= + "ios/**/*.{swift}", "ios/**/*.{m,mm}", "cpp/**/*.{hpp,cpp}", ]