Commit 2d227ef
committed
ci: put ccache in front of the Hermes build
Hermes dominates the iOS build. In run 31691647982 the build step took
18m58s, of which '[RN] [1] Build Hermesc' was 3m40s and '[RN] [2] Build
Hermes' 13m35s — 17m15s, or 91%. It is not hidden concurrency either: no
CompileC task appears during that window, and all 54 of them land in the
final 66 seconds. Hermes serialises the build.
Ccache never saw any of it. C_COMPILER_LAUNCHER is an Xcode build setting,
while Hermes is built by CMake from a script phase, so the two never meet —
ccache logged 549 calls for that whole job, of which only 68 were cacheable.
React Native hard-codes the CMake flags in build-hermes-xcode.sh with no
hook for extra arguments, but it does not sanitise the environment, and
CMake reads CMAKE_TOOLCHAIN_FILE from there (verified locally: the toolchain
is applied and the launcher reaches the compile rule). So point it at a
generated toolchain file that sets CMAKE_C/CXX_COMPILER_LAUNCHER, which
needs no patching of React Native.
'[1] Build Hermesc' is out of reach: it runs its CMake under `env -i` with
only PATH and SDKROOT, so it keeps costing its 3m40s.
Also raises the ccache ceiling to 6G, since Hermes is much larger than
anything cached so far.1 parent 0b3df68 commit 2d227ef
1 file changed
Lines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
230 | 231 | | |
231 | 232 | | |
232 | 233 | | |
| |||
238 | 239 | | |
239 | 240 | | |
240 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
241 | 251 | | |
242 | 252 | | |
243 | 253 | | |
244 | 254 | | |
245 | 255 | | |
246 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
247 | 262 | | |
248 | 263 | | |
249 | 264 | | |
| |||
0 commit comments