From 7b8b22021cdebfcb9cd3e58da2804a1afc52b924 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Mon, 12 Feb 2024 22:46:09 +0100 Subject: [PATCH 1/9] Fix sample app ios build --- .github/workflows/sample-application.yml | 6 +++++- samples/react-native/Gemfile | 4 ++-- samples/react-native/Gemfile.lock | 17 +++++++++-------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/sample-application.yml b/.github/workflows/sample-application.yml index f231aa53bf..c31b11d396 100644 --- a/.github/workflows/sample-application.yml +++ b/.github/workflows/sample-application.yml @@ -54,9 +54,13 @@ jobs: if: ${{ matrix.platform == 'ios' }} with: working-directory: samples/react-native - ruby-version: '3.2.2' # based on what is used in the sample + ruby-version: '3.3.0' # based on what is used in the sample bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - uses: maxim-lobanov/setup-cocoapods@8e97e1e98e6ccf42564fdf5622c8feec74199377 # v1.4.0 + with: + podfile-path: myApp/Podfile.lock + - uses: actions/setup-java@v3 with: java-version: '17' diff --git a/samples/react-native/Gemfile b/samples/react-native/Gemfile index 70c5fa9196..8370e151b0 100644 --- a/samples/react-native/Gemfile +++ b/samples/react-native/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version -ruby "3.2.2" +ruby "3.3.0" -gem 'cocoapods', '~> 1.13' +gem 'cocoapods', '~> 1.15.2' gem 'activesupport', '>= 6.1.7.3', '< 7.1.0' diff --git a/samples/react-native/Gemfile.lock b/samples/react-native/Gemfile.lock index 793f6b1754..98d0984c0f 100644 --- a/samples/react-native/Gemfile.lock +++ b/samples/react-native/Gemfile.lock @@ -8,17 +8,17 @@ GEM i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.5) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) atomos (0.1.3) claide (1.1.0) - cocoapods (1.14.3) + cocoapods (1.15.2) addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.14.3) + cocoapods-core (= 1.15.2) cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 2.1, < 3.0) cocoapods-plugins (>= 1.0.0, < 2.0) @@ -33,7 +33,7 @@ GEM nap (~> 1.0) ruby-macho (>= 2.3.0, < 3.0) xcodeproj (>= 1.23.0, < 2.0) - cocoapods-core (1.14.3) + cocoapods-core (1.15.2) activesupport (>= 5.0, < 8) addressable (~> 2.8) algoliasearch (~> 1.0) @@ -64,7 +64,7 @@ GEM httpclient (2.8.3) i18n (1.14.1) concurrent-ruby (~> 1.0) - json (2.6.3) + json (2.7.1) minitest (5.20.0) molinillo (0.8.0) nanaimo (0.3.0) @@ -77,7 +77,7 @@ GEM ethon (>= 0.9.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - xcodeproj (1.23.0) + xcodeproj (1.24.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) @@ -87,14 +87,15 @@ GEM PLATFORMS arm64-darwin-22 + arm64-darwin-23 x86_64-darwin-20 DEPENDENCIES activesupport (>= 6.1.7.3, < 7.1.0) - cocoapods (~> 1.13) + cocoapods (~> 1.15.2) RUBY VERSION - ruby 3.2.2p53 + ruby 3.3.0p0 BUNDLED WITH 2.4.20 From aa81336e714f3821383b5a04b0d7809ea2bd916b Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Tue, 13 Feb 2024 10:15:12 +0100 Subject: [PATCH 2/9] remove cocoapod action --- .github/workflows/sample-application.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/sample-application.yml b/.github/workflows/sample-application.yml index c31b11d396..2bc58b43e3 100644 --- a/.github/workflows/sample-application.yml +++ b/.github/workflows/sample-application.yml @@ -57,10 +57,6 @@ jobs: ruby-version: '3.3.0' # based on what is used in the sample bundler-cache: true # runs 'bundle install' and caches installed gems automatically - - uses: maxim-lobanov/setup-cocoapods@8e97e1e98e6ccf42564fdf5622c8feec74199377 # v1.4.0 - with: - podfile-path: myApp/Podfile.lock - - uses: actions/setup-java@v3 with: java-version: '17' From d518be8daafe627789657f41c03a774455a0c3ec Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Tue, 13 Feb 2024 11:38:20 +0100 Subject: [PATCH 3/9] enforce exact cocoa pods version --- samples/react-native/Gemfile | 2 +- samples/react-native/Gemfile.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/react-native/Gemfile b/samples/react-native/Gemfile index 8370e151b0..415aba11e0 100644 --- a/samples/react-native/Gemfile +++ b/samples/react-native/Gemfile @@ -3,5 +3,5 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version ruby "3.3.0" -gem 'cocoapods', '~> 1.15.2' +gem 'cocoapods', '1.15.2' gem 'activesupport', '>= 6.1.7.3', '< 7.1.0' diff --git a/samples/react-native/Gemfile.lock b/samples/react-native/Gemfile.lock index 98d0984c0f..0e0e9551e2 100644 --- a/samples/react-native/Gemfile.lock +++ b/samples/react-native/Gemfile.lock @@ -92,7 +92,7 @@ PLATFORMS DEPENDENCIES activesupport (>= 6.1.7.3, < 7.1.0) - cocoapods (~> 1.15.2) + cocoapods (= 1.15.2) RUBY VERSION ruby 3.3.0p0 From d724563189d44d83c0c392ea74d457b18f8326d1 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Tue, 13 Feb 2024 11:46:45 +0100 Subject: [PATCH 4/9] tmp disable cache --- .github/workflows/sample-application.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sample-application.yml b/.github/workflows/sample-application.yml index 2bc58b43e3..e8ab5d9260 100644 --- a/.github/workflows/sample-application.yml +++ b/.github/workflows/sample-application.yml @@ -55,7 +55,7 @@ jobs: with: working-directory: samples/react-native ruby-version: '3.3.0' # based on what is used in the sample - bundler-cache: true # runs 'bundle install' and caches installed gems automatically + bundler-cache: false # runs 'bundle install' and caches installed gems automatically - uses: actions/setup-java@v3 with: From dd4ecdc4a0ea2d0c34fce7bd0ebb3376ed576b1c Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Tue, 13 Feb 2024 12:16:27 +0100 Subject: [PATCH 5/9] use bundle exec pod install --- .github/workflows/sample-application.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sample-application.yml b/.github/workflows/sample-application.yml index e8ab5d9260..eaa8c773ca 100644 --- a/.github/workflows/sample-application.yml +++ b/.github/workflows/sample-application.yml @@ -87,7 +87,7 @@ jobs: [[ "${{ matrix.rn-architecture }}" == "new" ]] && ENABLE_NEW_ARCH=1 || ENABLE_NEW_ARCH=0 echo "ENABLE_PROD=$ENABLE_PROD" echo "ENABLE_NEW_ARCH=$ENABLE_NEW_ARCH" - PRODUCTION=$ENABLE_PROD RCT_NEW_ARCH_ENABLED=$ENABLE_NEW_ARCH pod install + PRODUCTION=$ENABLE_PROD RCT_NEW_ARCH_ENABLED=$ENABLE_NEW_ARCH bundle exec pod install cat Podfile.lock | grep $RN_SENTRY_POD_NAME - name: Build Android App From dc11eaf3562fab7474692475d5028c1f76ba5057 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Tue, 13 Feb 2024 12:39:13 +0100 Subject: [PATCH 6/9] enable auto bundler install --- .github/workflows/sample-application.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sample-application.yml b/.github/workflows/sample-application.yml index eaa8c773ca..548629700f 100644 --- a/.github/workflows/sample-application.yml +++ b/.github/workflows/sample-application.yml @@ -55,7 +55,8 @@ jobs: with: working-directory: samples/react-native ruby-version: '3.3.0' # based on what is used in the sample - bundler-cache: false # runs 'bundle install' and caches installed gems automatically + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + cache-version: 1 # cache the installed gems - uses: actions/setup-java@v3 with: From 32c327428a0307b4e7f9130753e840b15094a557 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Tue, 13 Feb 2024 13:10:32 +0100 Subject: [PATCH 7/9] fix e2e tests pod install --- .github/workflows/e2e.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 3589506cee..241fac94b0 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -225,6 +225,16 @@ jobs: - name: Gradle cache uses: gradle/gradle-build-action@v2 + - uses: ruby/setup-ruby@v1 + if: ${{ matrix.platform == 'ios' && matrix.rn-version != '0.65.3' }} + with: + working-directory: samples/react-native + ruby-version: '3.3.0' # based on what is used in the sample + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + cache-version: 1 # cache the installed gems + - run: gem install cocoapods -v 1.15.2 # fixes Hermes pod install https://github.com/CocoaPods/CocoaPods/issues/12226#issuecomment-1930604302 + if: ${{ matrix.platform == 'ios' && matrix.rn-version != '0.65.3' }} + - name: Setup Global Tools run: | yarn global add yalc semver From 66a766e1751f5fb82383376ff46b2cf77a0737da Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Tue, 13 Feb 2024 13:13:30 +0100 Subject: [PATCH 8/9] set exact cocoapods version for e2e tests --- .github/workflows/e2e.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 241fac94b0..0397c0c7fb 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -225,16 +225,6 @@ jobs: - name: Gradle cache uses: gradle/gradle-build-action@v2 - - uses: ruby/setup-ruby@v1 - if: ${{ matrix.platform == 'ios' && matrix.rn-version != '0.65.3' }} - with: - working-directory: samples/react-native - ruby-version: '3.3.0' # based on what is used in the sample - bundler-cache: true # runs 'bundle install' and caches installed gems automatically - cache-version: 1 # cache the installed gems - - run: gem install cocoapods -v 1.15.2 # fixes Hermes pod install https://github.com/CocoaPods/CocoaPods/issues/12226#issuecomment-1930604302 - if: ${{ matrix.platform == 'ios' && matrix.rn-version != '0.65.3' }} - - name: Setup Global Tools run: | yarn global add yalc semver @@ -297,6 +287,17 @@ jobs: working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp run: yarn add ../../../../e2e + - uses: ruby/setup-ruby@v1 + if: ${{ matrix.platform == 'ios' }} + with: + working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp + ruby-version: '3.3.0' # based on what is used in the sample + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + cache-version: 1 # cache the installed gems + - run: gem install cocoapods -v 1.15.2 # fixes Hermes pod install https://github.com/CocoaPods/CocoaPods/issues/12226#issuecomment-1930604302 + working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp + if: ${{ matrix.platform == 'ios' }} + - name: Install App Pods if: ${{ matrix.platform == 'ios' }} working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp/ios @@ -309,7 +310,7 @@ jobs: echo "ENABLE_PROD=$ENABLE_PROD" echo "ENABLE_NEW_ARCH=$ENABLE_NEW_ARCH" echo "USE_FRAMEWORKS=$USE_FRAMEWORKS" - PRODUCTION=$ENABLE_PROD RCT_NEW_ARCH_ENABLED=$ENABLE_NEW_ARCH pod install + PRODUCTION=$ENABLE_PROD RCT_NEW_ARCH_ENABLED=$ENABLE_NEW_ARCH bundle exec pod install cat Podfile.lock | grep $RN_SENTRY_POD_NAME - name: Patch App RN From 08f5943a6262d94203c2b424b181b53d3a238432 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Tue, 13 Feb 2024 13:21:37 +0100 Subject: [PATCH 9/9] dynamically change pod install command e2e tests based on rn version --- .github/workflows/e2e.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 0397c0c7fb..2e620de179 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -307,10 +307,11 @@ jobs: [[ "${{ matrix.ios-use-frameworks }}" == "dynamic" ]] && export USE_FRAMEWORKS=dynamic && export NO_FLIPPER=1 [[ "${{ matrix.build-type }}" == "production" ]] && ENABLE_PROD=1 || ENABLE_PROD=0 [[ "${{ matrix.rn-architecture }}" == "new" ]] && ENABLE_NEW_ARCH=1 || ENABLE_NEW_ARCH=0 + [[ "${{ matrix.rn-version }}" == "0.65.3" ]] && POD_INSTALL_COMMNAND="pod install" || POD_INSTALL_COMMNAND="bundle exec pod install" echo "ENABLE_PROD=$ENABLE_PROD" echo "ENABLE_NEW_ARCH=$ENABLE_NEW_ARCH" echo "USE_FRAMEWORKS=$USE_FRAMEWORKS" - PRODUCTION=$ENABLE_PROD RCT_NEW_ARCH_ENABLED=$ENABLE_NEW_ARCH bundle exec pod install + PRODUCTION=$ENABLE_PROD RCT_NEW_ARCH_ENABLED=$ENABLE_NEW_ARCH $POD_INSTALL_COMMNAND cat Podfile.lock | grep $RN_SENTRY_POD_NAME - name: Patch App RN