66 - ' **'
77 paths :
88 - ' .github/workflows/e2e_ios.yml'
9+ - ' .github/actions/e2e-cache/**'
910 - ' .gitmodules'
1011 - ' package.json'
1112 - ' bun.lock'
2324 - master
2425 paths :
2526 - ' .github/workflows/e2e_ios.yml'
27+ - ' .github/actions/e2e-cache/**'
2628 - ' .gitmodules'
2729 - ' package.json'
2830 - ' bun.lock'
@@ -111,27 +113,25 @@ jobs:
111113 fi
112114
113115 - name : Cache Homebrew downloads
114- # bottle 按 URL 内容寻址,restore-keys 前缀命中即省下载(装/链接照常)
115- uses : actions/cache@v6
116+ # Bottle content addressing still controls reuse; only snapshot writes
117+ # are reduced to the successful master/core run's daily identity.
118+ uses : ./.github/actions/e2e-cache
116119 with :
117120 path : ~/Library/Caches/Homebrew
118- key : ${{ runner.os }}-brew-e2e-${{ github.sha }}
119- restore-keys : |
120- ${{ runner.os }}-brew-e2e-
121+ scope : brew-xcode-26.4
122+ write : ${{ matrix.suite == 'core' }}
121123
122124 - name : Install applesimutils and ccache
123125 run : brew trust wix/brew && HOMEBREW_NO_AUTO_UPDATE=1 brew install wix/brew/applesimutils ccache
124126
125127 - name : Cache ccache
126- # ccache 按(预处理后)内容寻址,不受 fresh checkout 的 mtime 影响——
127- # 这是 DerivedData 缓存在 -UseNewBuildSystem=NO 下做不到的。
128- # 陈旧条目不影响正确性,只影响命中率,所以 restore-keys 用前缀即可。
129- uses : actions/cache@v6
128+ # Old content-addressed entries affect hit rate, not build correctness.
129+ # PRs and the native matrix leg only restore; no per-commit duplicates.
130+ uses : ./.github/actions/e2e-cache
130131 with :
131132 path : ~/Library/Caches/ccache
132- key : ${{ runner.os }}-ccache-e2e-xcode-26.4-${{ github.sha }}
133- restore-keys : |
134- ${{ runner.os }}-ccache-e2e-xcode-26.4-
133+ scope : ccache-xcode-26.4
134+ write : ${{ matrix.suite == 'core' }}
135135
136136 - name : Install e2etest dependencies
137137 run : cd Example/e2etest && bun install --frozen-lockfile
@@ -152,13 +152,12 @@ jobs:
152152 run : cd react-native-update-cli && bun install --frozen-lockfile && bun run build
153153
154154 - name : Cache Metro transform cache
155- # 内容寻址(等价 ccache 之于 clang):陈旧条目只影响命中率不影响正确性
156- uses : actions/cache@v6
155+ # Metro validates its own content keys; stale snapshots only recompile.
156+ uses : ./.github/ actions/e2e- cache
157157 with :
158158 path : Example/e2etest/.metro-cache
159- key : ${{ runner.os }}-metro-e2e-${{ github.sha }}
160- restore-keys : |
161- ${{ runner.os }}-metro-e2e-
159+ scope : metro-xcode-26.4
160+ write : ${{ matrix.suite == 'core' }}
162161
163162 - name : Prepare local update artifacts
164163 env :
0 commit comments