From 6dba251dd95330ec0e092d5c1e54deadb8246eb5 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Thu, 22 Oct 2026 13:15:05 -0500 Subject: [PATCH 1/7] feat(app, sdk): bump Firebase iOS SDK to 13.1.0 Adopt firebase-ios-sdk 13.1.0 (released 2026-10-21) via sdkVersions.ios.firebase and matching SPM exact pins. --- docs/ios-spm.mdx | 2 +- packages/app/package.json | 2 +- test-rn-bare/ios/testrnbare.xcodeproj/project.pbxproj | 2 +- tests/ios/testing.xcodeproj/project.pbxproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/ios-spm.mdx b/docs/ios-spm.mdx index aa708621be..45ec74f7fa 100644 --- a/docs/ios-spm.mdx +++ b/docs/ios-spm.mdx @@ -25,7 +25,7 @@ CocoaPods**. The last CocoaPods release is **12.19.0**. See Google's - SPM requires CocoaPods 1.10 or newer for the React Native pod integration. React Native 0.75+ templates already satisfy this requirement. - SPM pins the Firebase iOS SDK to the exact version in - `sdkVersions.ios.firebase` in `@react-native-firebase/app` (currently **13.0.0**). + `sdkVersions.ios.firebase` in `@react-native-firebase/app` (currently **13.1.0**). SPM requires dynamic framework linkage: diff --git a/packages/app/package.json b/packages/app/package.json index 54e0cf4c59..e353782e60 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -131,7 +131,7 @@ }, "sdkVersions": { "ios": { - "firebase": "13.0.0", + "firebase": "13.1.0", "firebaseSpmUrl": "https://github.com/firebase/firebase-ios-sdk.git", "iosTarget": "15.0", "macosTarget": "11.0", diff --git a/test-rn-bare/ios/testrnbare.xcodeproj/project.pbxproj b/test-rn-bare/ios/testrnbare.xcodeproj/project.pbxproj index a82b33a83e..0377728a0e 100644 --- a/test-rn-bare/ios/testrnbare.xcodeproj/project.pbxproj +++ b/test-rn-bare/ios/testrnbare.xcodeproj/project.pbxproj @@ -622,7 +622,7 @@ repositoryURL = "https://github.com/firebase/firebase-ios-sdk.git"; requirement = { kind = exactVersion; - version = 13.0.0; + version = 13.1.0; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/tests/ios/testing.xcodeproj/project.pbxproj b/tests/ios/testing.xcodeproj/project.pbxproj index b9781bc1e9..4577254d6b 100644 --- a/tests/ios/testing.xcodeproj/project.pbxproj +++ b/tests/ios/testing.xcodeproj/project.pbxproj @@ -832,7 +832,7 @@ repositoryURL = "https://github.com/firebase/firebase-ios-sdk.git"; requirement = { kind = exactVersion; - version = 13.0.0; + version = 13.1.0; }; }; /* End XCRemoteSwiftPackageReference section */ From 5cb9e456f9b0639a4cc3fc04221ee692f348b84c Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Thu, 22 Oct 2026 13:18:05 -0500 Subject: [PATCH 2/7] fix(app, sdk): sync RNFBFirebase Package.swift pin to 13.1.0 --- packages/app/ios/RNFBFirebase/Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/ios/RNFBFirebase/Package.swift b/packages/app/ios/RNFBFirebase/Package.swift index 784840c267..275445288d 100644 --- a/packages/app/ios/RNFBFirebase/Package.swift +++ b/packages/app/ios/RNFBFirebase/Package.swift @@ -28,7 +28,7 @@ let package = Package( dependencies: [ .package( url: "https://github.com/firebase/firebase-ios-sdk.git", - exact: "13.0.0" + exact: "13.1.0" ), ], targets: [ From 25b03b2f6d7974eef131aac9456d3997fde78821 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Thu, 22 Oct 2026 13:39:09 -0500 Subject: [PATCH 3/7] docs: align Firebase Apple SDK override examples with 13.1.0 --- docs/index.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.mdx b/docs/index.mdx index f084700667..ed73247bd6 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -360,12 +360,12 @@ Open your projects `/ios/Podfile` and add any of the globals shown below to the ```ruby # Override Firebase Apple SDK SPM exact pin if desired (see /ios-spm) -$FirebaseSDKVersion = '13.0.0' +$FirebaseSDKVersion = '13.1.0' ``` Once changed, reinstall your projects pods via pod install and rebuild your project with `npx react-native run-ios`. -Alternatively, if you cannot edit the Podfile easily (as when using Expo), you may add the environment variable `FIREBASE_SDK_VERSION=13.0.0` (or whatever SPM exact pin you need) to the command line that installs pods. For example `FIREBASE_SDK_VERSION=13.0.0 yarn expo prebuild --clean` +Alternatively, if you cannot edit the Podfile easily (as when using Expo), you may add the environment variable `FIREBASE_SDK_VERSION=13.1.0` (or whatever SPM exact pin you need) to the command line that installs pods. For example `FIREBASE_SDK_VERSION=13.1.0 yarn expo prebuild --clean` ### Android Performance From f93ae254ab46371ab30927c564b21f3d54aece4e Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Thu, 22 Oct 2026 16:01:27 -0500 Subject: [PATCH 4/7] ci(expo): raise iOS link+launch job timeout for cold Firebase SPM builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Raise timeout-minutes 60→90. Include packages/app/package.json in path filters and ccache hash (expo-link-ios-v2) so sdkVersions.ios.firebase pin bumps alone trigger and invalidate the compile cache. --- .github/workflows/test_expo_ios_link.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_expo_ios_link.yml b/.github/workflows/test_expo_ios_link.yml index a069823deb..3066387677 100644 --- a/.github/workflows/test_expo_ios_link.yml +++ b/.github/workflows/test_expo_ios_link.yml @@ -9,6 +9,7 @@ on: - '**' paths: - 'test-expo/**' + - 'packages/app/package.json' - 'packages/app/firebase_spm.rb' - 'packages/app/firebase_json.rb' - 'packages/app/RNFBApp.podspec' @@ -27,6 +28,7 @@ on: - release-v* paths: - 'test-expo/**' + - 'packages/app/package.json' - 'packages/app/firebase_spm.rb' - 'packages/app/firebase_json.rb' - 'packages/app/RNFBApp.podspec' @@ -52,7 +54,7 @@ jobs: test-expo-ios-link: name: test-expo iOS link + launch smoke runs-on: xcode-27 - timeout-minutes: 60 + timeout-minutes: 90 env: XCODE_VERSION: '27.0' RNFB_IOS_SIM_RUNTIME: iOS 27.0 @@ -86,7 +88,7 @@ jobs: - uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 name: Xcode Compile Cache with: - key: ${{ runner.os }}-expo-link-ios-v1-xcode27-${{ hashFiles('yarn.lock', 'test-expo/**', 'packages/app/ios/**', 'packages/app/*.podspec', 'packages/app/firebase_spm.rb', 'packages/app/firebase_json.rb', 'packages/app/plugin/**', 'packages/app/app.plugin.js') }} + key: ${{ runner.os }}-expo-link-ios-v2-xcode27-${{ hashFiles('yarn.lock', 'test-expo/**', 'packages/app/package.json', 'packages/app/ios/**', 'packages/app/*.podspec', 'packages/app/firebase_spm.rb', 'packages/app/firebase_json.rb', 'packages/app/plugin/**', 'packages/app/app.plugin.js') }} append-timestamp: false save: ${{ github.ref == 'refs/heads/main' }} create-symlink: true From 1a765f9317c51ddb5f8f6f3b4dd6f3b861216b14 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Thu, 22 Oct 2026 16:27:50 -0500 Subject: [PATCH 5/7] ci: narrow Xcode ccache hashFiles to avoid Post-cache timeouts Post-cache re-hash walked node_modules and broad ios trees after yarn/Pods, hitting GHA's hashFiles limit. Constrain globs to fixture roots, RNFB/generated app sources, and plugin; exclude UnitTests build artifacts. Applies to rn-bare (shipped + dynfb) and expo-link ccache keys (v2/v3 bump). --- .github/workflows/test_expo_ios_link.yml | 2 +- .github/workflows/test_rn_bare_ios_build.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_expo_ios_link.yml b/.github/workflows/test_expo_ios_link.yml index 3066387677..d87ab96593 100644 --- a/.github/workflows/test_expo_ios_link.yml +++ b/.github/workflows/test_expo_ios_link.yml @@ -88,7 +88,7 @@ jobs: - uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 name: Xcode Compile Cache with: - key: ${{ runner.os }}-expo-link-ios-v2-xcode27-${{ hashFiles('yarn.lock', 'test-expo/**', 'packages/app/package.json', 'packages/app/ios/**', 'packages/app/*.podspec', 'packages/app/firebase_spm.rb', 'packages/app/firebase_json.rb', 'packages/app/plugin/**', 'packages/app/app.plugin.js') }} + key: ${{ runner.os }}-expo-link-ios-v3-xcode27-${{ hashFiles('yarn.lock', 'test-expo/*', 'test-expo/app/**', 'test-expo/src/**', 'test-expo/assets/**', 'packages/app/*', 'packages/app/ios/RNFB*/**', 'packages/app/ios/generated/**', 'packages/app/plugin/**', '!packages/app/ios/**/build/**') }} append-timestamp: false save: ${{ github.ref == 'refs/heads/main' }} create-symlink: true diff --git a/.github/workflows/test_rn_bare_ios_build.yml b/.github/workflows/test_rn_bare_ios_build.yml index 033f427251..a4e89d5d1b 100644 --- a/.github/workflows/test_rn_bare_ios_build.yml +++ b/.github/workflows/test_rn_bare_ios_build.yml @@ -104,7 +104,7 @@ jobs: - uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 name: Xcode Compile Cache with: - key: ${{ runner.os }}-rn-bare-ios-v1-xcode27-${{ hashFiles('yarn.lock', 'test-rn-bare/**', 'packages/app/ios/**', 'packages/app/*.podspec', 'packages/app/firebase_spm.rb', 'packages/app/firebase_json.rb', 'packages/app/plugin/**', 'packages/app/app.plugin.js') }} + key: ${{ runner.os }}-rn-bare-ios-v2-xcode27-${{ hashFiles('yarn.lock', 'test-rn-bare/*', 'test-rn-bare/ios/*', 'test-rn-bare/ios/testrnbare/**', 'test-rn-bare/ios/*.xcodeproj/**', 'packages/app/*', 'packages/app/ios/RNFB*/**', 'packages/app/ios/generated/**', 'packages/app/plugin/**', '!packages/app/ios/**/build/**') }} append-timestamp: false save: ${{ github.ref == 'refs/heads/main' }} create-symlink: true @@ -178,7 +178,7 @@ jobs: - uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 name: Xcode Compile Cache with: - key: ${{ runner.os }}-rn-bare-dynfb-ios-v1-xcode27-${{ hashFiles('yarn.lock', 'test-rn-bare/**', 'packages/app/ios/**', 'packages/app/*.podspec', 'packages/app/firebase_spm.rb', 'packages/app/firebase_json.rb', 'packages/app/plugin/**', 'packages/app/app.plugin.js', 'packages/app/package.json') }} + key: ${{ runner.os }}-rn-bare-dynfb-ios-v2-xcode27-${{ hashFiles('yarn.lock', 'test-rn-bare/*', 'test-rn-bare/ios/*', 'test-rn-bare/ios/testrnbare/**', 'test-rn-bare/ios/*.xcodeproj/**', 'packages/app/*', 'packages/app/ios/RNFB*/**', 'packages/app/ios/generated/**', 'packages/app/plugin/**', '!packages/app/ios/**/build/**') }} append-timestamp: false save: ${{ github.ref == 'refs/heads/main' }} create-symlink: true From 39483e8c689737baae4874afb0732a2743478712 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Thu, 22 Oct 2026 19:37:54 -0500 Subject: [PATCH 6/7] ci: narrow e2e Xcode ccache hashFiles like rn-bare/expo iOS release Post-cache hit the same hashFiles 120s limit on packages/*/ios/** after UnitTests/build trees exist. Constrain to RNFB*/generated/plugin and exclude **/build/**; bump e2e ios/archive/macos cache key versions. --- .github/workflows/tests_e2e_ios.yml | 5 +++-- .github/workflows/tests_e2e_other.yml | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests_e2e_ios.yml b/.github/workflows/tests_e2e_ios.yml index 4506f71321..a57ba0e98e 100644 --- a/.github/workflows/tests_e2e_ios.yml +++ b/.github/workflows/tests_e2e_ios.yml @@ -199,7 +199,8 @@ jobs: name: Xcode Compile Cache with: # Sticky content-hash key (append-timestamp: false). SPM-only matrix (no cocoapods leg); debug/release stay distinct. - key: ${{ runner.os }}-e2e-${{ matrix.buildmode }}-ios-v5-xcode27-${{ hashFiles('yarn.lock', 'packages/*/*.podspec', 'packages/*/ios/**', 'tests/ios/Podfile.lock') }} + # Narrow globs: Post-cache re-hash of packages/*/ios/** walks UnitTests/build and can exceed hashFiles 120s. + key: ${{ runner.os }}-e2e-${{ matrix.buildmode }}-ios-v6-xcode27-${{ hashFiles('yarn.lock', 'packages/*/*.podspec', 'packages/*/package.json', 'packages/*/ios/RNFB*/**', 'packages/*/ios/generated/**', 'packages/app/plugin/**', 'tests/ios/Podfile.lock', '!packages/*/ios/**/build/**') }} save: "${{ github.ref == 'refs/heads/main' && matrix.iteration == 0 }}" append-timestamp: false create-symlink: true @@ -646,7 +647,7 @@ jobs: name: Xcode Compile Cache with: # Sticky content-hash key (append-timestamp: false). SPM-only archive job. - key: ${{ runner.os }}-e2e-archive-ios-v3-xcode27-${{ hashFiles('yarn.lock', 'packages/*/*.podspec', 'packages/*/ios/**', 'tests/ios/Podfile.lock') }} + key: ${{ runner.os }}-e2e-archive-ios-v4-xcode27-${{ hashFiles('yarn.lock', 'packages/*/*.podspec', 'packages/*/package.json', 'packages/*/ios/RNFB*/**', 'packages/*/ios/generated/**', 'packages/app/plugin/**', 'tests/ios/Podfile.lock', '!packages/*/ios/**/build/**') }} save: "${{ github.ref == 'refs/heads/main' }}" append-timestamp: false create-symlink: true diff --git a/.github/workflows/tests_e2e_other.yml b/.github/workflows/tests_e2e_other.yml index 2a03f955b4..d8931fd42d 100644 --- a/.github/workflows/tests_e2e_other.yml +++ b/.github/workflows/tests_e2e_other.yml @@ -172,7 +172,8 @@ jobs: name: Xcode Compile Cache with: # Sticky content-hash key (append-timestamp: false). Native sources live under packages/*/ios (no packages/*/macos tree). - key: ${{ runner.os }}-e2e-macos-v3-xcode27-${{ hashFiles('yarn.lock', 'packages/*/*.podspec', 'packages/*/ios/**', 'tests-macos/macos/Podfile.lock') }} + # Same Post-cache hashFiles constraint as tests_e2e_ios.yml (native sources under packages/*/ios). + key: ${{ runner.os }}-e2e-macos-v4-xcode27-${{ hashFiles('yarn.lock', 'packages/*/*.podspec', 'packages/*/package.json', 'packages/*/ios/RNFB*/**', 'packages/*/ios/generated/**', 'packages/app/plugin/**', 'tests-macos/macos/Podfile.lock', '!packages/*/ios/**/build/**') }} save: "${{ github.ref == 'refs/heads/main' && matrix.iteration == 0 }}" append-timestamp: false create-symlink: true From 6bcc003bbc7773039764a2bb85bb2e925308d49d Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Thu, 22 Oct 2026 21:17:25 -0500 Subject: [PATCH 7/7] ci: precompute Xcode ccache keys without hashFiles Post-cache re-evaluation of hashFiles still exceeded 120s on the dynfb job after narrowing globs; hash tracked sources once via git ls-files so Post can reuse the step output. --- .../scripts/compute-xcode-ccache-key.sh | 80 +++++++++++++++++++ .github/workflows/test_expo_ios_link.yml | 7 +- .github/workflows/test_rn_bare_ios_build.yml | 16 +++- .github/workflows/tests_e2e_ios.yml | 14 +++- .github/workflows/tests_e2e_other.yml | 8 +- 5 files changed, 117 insertions(+), 8 deletions(-) create mode 100755 .github/workflows/scripts/compute-xcode-ccache-key.sh diff --git a/.github/workflows/scripts/compute-xcode-ccache-key.sh b/.github/workflows/scripts/compute-xcode-ccache-key.sh new file mode 100755 index 0000000000..6a9b583092 --- /dev/null +++ b/.github/workflows/scripts/compute-xcode-ccache-key.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash +# Content hash for ccache-action keys without actions/hashFiles. +# hashFiles re-runs on Post-cache and can exceed the 120s limit on dirty CI trees +# (DerivedData, SPM checkouts under packages/*/ios). git ls-files only sees tracked +# sources, so Post can reuse the step output with no filesystem walk. +set -euo pipefail + +usage() { + echo "usage: $0 " >&2 + exit 2 +} + +[[ $# -eq 1 ]] || usage + +case "$1" in + rn-bare) + PATHSPECS=( + yarn.lock + ':(glob)test-rn-bare/*' + ':(glob)test-rn-bare/ios/*' + ':(glob)test-rn-bare/ios/testrnbare/**' + ':(glob)test-rn-bare/ios/*.xcodeproj/**' + ':(glob)packages/app/*' + ':(glob)packages/app/ios/RNFB*/**' + ':(glob)packages/app/ios/generated/**' + ':(glob)packages/app/plugin/**' + ':(exclude,glob)packages/app/ios/**/build/**' + ) + ;; + expo) + PATHSPECS=( + yarn.lock + ':(glob)test-expo/*' + ':(glob)test-expo/app/**' + ':(glob)test-expo/src/**' + ':(glob)test-expo/assets/**' + ':(glob)packages/app/*' + ':(glob)packages/app/ios/RNFB*/**' + ':(glob)packages/app/ios/generated/**' + ':(glob)packages/app/plugin/**' + ':(exclude,glob)packages/app/ios/**/build/**' + ) + ;; + e2e-ios) + PATHSPECS=( + yarn.lock + ':(glob)packages/*/*.podspec' + ':(glob)packages/*/package.json' + ':(glob)packages/*/ios/RNFB*/**' + ':(glob)packages/*/ios/generated/**' + ':(glob)packages/app/plugin/**' + tests/ios/Podfile.lock + ':(exclude,glob)packages/*/ios/**/build/**' + ) + ;; + e2e-macos) + PATHSPECS=( + yarn.lock + ':(glob)packages/*/*.podspec' + ':(glob)packages/*/package.json' + ':(glob)packages/*/ios/RNFB*/**' + ':(glob)packages/*/ios/generated/**' + ':(glob)packages/app/plugin/**' + tests-macos/macos/Podfile.lock + ':(exclude,glob)packages/*/ios/**/build/**' + ) + ;; + *) + usage + ;; +esac + +# Stable order; each line is " " so renames invalidate. +{ + git ls-files -z -- "${PATHSPECS[@]}" \ + | sort -z \ + | while IFS= read -r -d '' f; do + shasum -a 256 -- "$f" + done +} | shasum -a 256 | awk '{print $1}' diff --git a/.github/workflows/test_expo_ios_link.yml b/.github/workflows/test_expo_ios_link.yml index d87ab96593..c64cb62d13 100644 --- a/.github/workflows/test_expo_ios_link.yml +++ b/.github/workflows/test_expo_ios_link.yml @@ -83,12 +83,17 @@ jobs: - name: Configure Apple CI (Xcode 27 + iOS 27 runtime) run: bash .github/workflows/scripts/configure-apple-ci.sh + # Precompute key: hashFiles re-runs on Post-cache and can exceed 120s on dirty trees. + - name: Compute Xcode compile cache key + id: xcode_cache_key + run: echo "key=$(bash .github/workflows/scripts/compute-xcode-ccache-key.sh expo)" >> "$GITHUB_OUTPUT" + # Sticky content-hash key (append-timestamp: false). Distinct from e2e (`expo-link` app id). # https://github.com/hendrikmuhs/ccache-action/releases - uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 name: Xcode Compile Cache with: - key: ${{ runner.os }}-expo-link-ios-v3-xcode27-${{ hashFiles('yarn.lock', 'test-expo/*', 'test-expo/app/**', 'test-expo/src/**', 'test-expo/assets/**', 'packages/app/*', 'packages/app/ios/RNFB*/**', 'packages/app/ios/generated/**', 'packages/app/plugin/**', '!packages/app/ios/**/build/**') }} + key: ${{ runner.os }}-expo-link-ios-v4-xcode27-${{ steps.xcode_cache_key.outputs.key }} append-timestamp: false save: ${{ github.ref == 'refs/heads/main' }} create-symlink: true diff --git a/.github/workflows/test_rn_bare_ios_build.yml b/.github/workflows/test_rn_bare_ios_build.yml index a4e89d5d1b..b97fe45ed9 100644 --- a/.github/workflows/test_rn_bare_ios_build.yml +++ b/.github/workflows/test_rn_bare_ios_build.yml @@ -26,6 +26,7 @@ on: - '.github/workflows/scripts/lib/rn-bare-probe-launch-assertions.sh' - '.github/workflows/scripts/test-rn-bare-ios-launch-smoke.sh' - '.github/workflows/scripts/configure-apple-ci.sh' + - '.github/workflows/scripts/compute-xcode-ccache-key.sh' - 'packages/app/__tests__/rnfb_app_ios_objc_import_guard_test.rb' - 'packages/app/__tests__/iosProbeSdkPin.test.js' - 'packages/app/__tests__/iosProbeSingleCopyAssertions.test.js' @@ -52,6 +53,7 @@ on: - '.github/workflows/scripts/lib/rn-bare-probe-launch-assertions.sh' - '.github/workflows/scripts/test-rn-bare-ios-launch-smoke.sh' - '.github/workflows/scripts/configure-apple-ci.sh' + - '.github/workflows/scripts/compute-xcode-ccache-key.sh' - 'packages/app/__tests__/rnfb_app_ios_objc_import_guard_test.rb' - 'packages/app/__tests__/iosProbeSdkPin.test.js' - 'packages/app/__tests__/iosProbeSingleCopyAssertions.test.js' @@ -99,12 +101,17 @@ jobs: - name: Configure Apple CI (Xcode 27 + iOS 27 runtime) run: bash .github/workflows/scripts/configure-apple-ci.sh + # Precompute key: hashFiles re-runs on Post-cache and can exceed 120s on dirty trees. + - name: Compute Xcode compile cache key + id: xcode_cache_key + run: echo "key=$(bash .github/workflows/scripts/compute-xcode-ccache-key.sh rn-bare)" >> "$GITHUB_OUTPUT" + # Sticky content-hash key (append-timestamp: false). Distinct from e2e/expo (`rn-bare` app id). # https://github.com/hendrikmuhs/ccache-action/releases - uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 name: Xcode Compile Cache with: - key: ${{ runner.os }}-rn-bare-ios-v2-xcode27-${{ hashFiles('yarn.lock', 'test-rn-bare/*', 'test-rn-bare/ios/*', 'test-rn-bare/ios/testrnbare/**', 'test-rn-bare/ios/*.xcodeproj/**', 'packages/app/*', 'packages/app/ios/RNFB*/**', 'packages/app/ios/generated/**', 'packages/app/plugin/**', '!packages/app/ios/**/build/**') }} + key: ${{ runner.os }}-rn-bare-ios-v3-xcode27-${{ steps.xcode_cache_key.outputs.key }} append-timestamp: false save: ${{ github.ref == 'refs/heads/main' }} create-symlink: true @@ -173,12 +180,17 @@ jobs: - name: Configure Apple CI (Xcode 27 + iOS 27 runtime) run: bash .github/workflows/scripts/configure-apple-ci.sh + # Precompute key: hashFiles re-runs on Post-cache and can exceed 120s on dirty trees. + - name: Compute Xcode compile cache key + id: xcode_cache_key + run: echo "key=$(bash .github/workflows/scripts/compute-xcode-ccache-key.sh rn-bare)" >> "$GITHUB_OUTPUT" + # Sticky content-hash key (append-timestamp: false). Distinct from shipped-path job (`rn-bare-dynfb`). # https://github.com/hendrikmuhs/ccache-action/releases - uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 name: Xcode Compile Cache with: - key: ${{ runner.os }}-rn-bare-dynfb-ios-v2-xcode27-${{ hashFiles('yarn.lock', 'test-rn-bare/*', 'test-rn-bare/ios/*', 'test-rn-bare/ios/testrnbare/**', 'test-rn-bare/ios/*.xcodeproj/**', 'packages/app/*', 'packages/app/ios/RNFB*/**', 'packages/app/ios/generated/**', 'packages/app/plugin/**', '!packages/app/ios/**/build/**') }} + key: ${{ runner.os }}-rn-bare-dynfb-ios-v3-xcode27-${{ steps.xcode_cache_key.outputs.key }} append-timestamp: false save: ${{ github.ref == 'refs/heads/main' }} create-symlink: true diff --git a/.github/workflows/tests_e2e_ios.yml b/.github/workflows/tests_e2e_ios.yml index a57ba0e98e..f2a5b8ff3c 100644 --- a/.github/workflows/tests_e2e_ios.yml +++ b/.github/workflows/tests_e2e_ios.yml @@ -193,14 +193,18 @@ jobs: path: ~/Library/Detox/ios key: ${{ runner.os }}-detox-framework-cache-${{ steps.workflow-variables.outputs.xcode-version }} + # Precompute key: hashFiles re-runs on Post-cache and can exceed 120s on dirty trees. + - name: Compute Xcode compile cache key + id: xcode_cache_key + run: echo "key=$(bash .github/workflows/scripts/compute-xcode-ccache-key.sh e2e-ios)" >> "$GITHUB_OUTPUT" + # Detox is compiled during yarn install, using Xcode, set up cache first # https://github.com/hendrikmuhs/ccache-action/releases - uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 name: Xcode Compile Cache with: # Sticky content-hash key (append-timestamp: false). SPM-only matrix (no cocoapods leg); debug/release stay distinct. - # Narrow globs: Post-cache re-hash of packages/*/ios/** walks UnitTests/build and can exceed hashFiles 120s. - key: ${{ runner.os }}-e2e-${{ matrix.buildmode }}-ios-v6-xcode27-${{ hashFiles('yarn.lock', 'packages/*/*.podspec', 'packages/*/package.json', 'packages/*/ios/RNFB*/**', 'packages/*/ios/generated/**', 'packages/app/plugin/**', 'tests/ios/Podfile.lock', '!packages/*/ios/**/build/**') }} + key: ${{ runner.os }}-e2e-${{ matrix.buildmode }}-ios-v7-xcode27-${{ steps.xcode_cache_key.outputs.key }} save: "${{ github.ref == 'refs/heads/main' && matrix.iteration == 0 }}" append-timestamp: false create-symlink: true @@ -643,11 +647,15 @@ jobs: key: ${{ runner.os }}-ios-yarn-v1-${{ hashFiles('yarn.lock') }} restore-keys: ${{ runner.os }}-ios-yarn-v1 + - name: Compute Xcode compile cache key + id: xcode_cache_key + run: echo "key=$(bash .github/workflows/scripts/compute-xcode-ccache-key.sh e2e-ios)" >> "$GITHUB_OUTPUT" + - uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 name: Xcode Compile Cache with: # Sticky content-hash key (append-timestamp: false). SPM-only archive job. - key: ${{ runner.os }}-e2e-archive-ios-v4-xcode27-${{ hashFiles('yarn.lock', 'packages/*/*.podspec', 'packages/*/package.json', 'packages/*/ios/RNFB*/**', 'packages/*/ios/generated/**', 'packages/app/plugin/**', 'tests/ios/Podfile.lock', '!packages/*/ios/**/build/**') }} + key: ${{ runner.os }}-e2e-archive-ios-v5-xcode27-${{ steps.xcode_cache_key.outputs.key }} save: "${{ github.ref == 'refs/heads/main' }}" append-timestamp: false create-symlink: true diff --git a/.github/workflows/tests_e2e_other.yml b/.github/workflows/tests_e2e_other.yml index d8931fd42d..e6dfa59bdb 100644 --- a/.github/workflows/tests_e2e_other.yml +++ b/.github/workflows/tests_e2e_other.yml @@ -167,13 +167,17 @@ jobs: key: ${{ runner.os }}-macos-yarn-v1-${{ hashFiles('yarn.lock') }} restore-keys: ${{ runner.os }}-macos-yarn-v1 + # Precompute key: hashFiles re-runs on Post-cache and can exceed 120s on dirty trees. + - name: Compute Xcode compile cache key + id: xcode_cache_key + run: echo "key=$(bash .github/workflows/scripts/compute-xcode-ccache-key.sh e2e-macos)" >> "$GITHUB_OUTPUT" + # https://github.com/hendrikmuhs/ccache-action/releases - uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 name: Xcode Compile Cache with: # Sticky content-hash key (append-timestamp: false). Native sources live under packages/*/ios (no packages/*/macos tree). - # Same Post-cache hashFiles constraint as tests_e2e_ios.yml (native sources under packages/*/ios). - key: ${{ runner.os }}-e2e-macos-v4-xcode27-${{ hashFiles('yarn.lock', 'packages/*/*.podspec', 'packages/*/package.json', 'packages/*/ios/RNFB*/**', 'packages/*/ios/generated/**', 'packages/app/plugin/**', 'tests-macos/macos/Podfile.lock', '!packages/*/ios/**/build/**') }} + key: ${{ runner.os }}-e2e-macos-v5-xcode27-${{ steps.xcode_cache_key.outputs.key }} save: "${{ github.ref == 'refs/heads/main' && matrix.iteration == 0 }}" append-timestamp: false create-symlink: true