Skip to content

Commit f6bf64e

Browse files
committed
Cache Detox build derived data in Bitrise CI
Add restore-cache and save-cache steps to cache the xcodebuild derived data directory (example/ios/build/) between CI runs. The cache key is based on Podfile.lock and app.json checksums, with a prefix fallback for partial cache matches. This enables incremental xcodebuild, which should significantly reduce the Detox build step time on cache hits. https://claude.ai/code/session_01LRLatsmhLdQQgrwnBtJUfr
1 parent 2c22627 commit f6bf64e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

bitrise.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ workflows:
3939
- cocoapods-install@3:
4040
inputs:
4141
- source_root_path: '$BITRISE_SOURCE_DIR/example/ios'
42+
- restore-cache@1:
43+
title: Restore Detox Build Cache
44+
inputs:
45+
- key: |-
46+
detox-build-{{ checksum "example/ios/Podfile.lock" }}-{{ checksum "example/app.json" }}
47+
detox-build-
4248
- script@1:
4349
inputs:
4450
- working_dir: example
@@ -63,6 +69,12 @@ workflows:
6369
log\nset -x\n \n# we are building a release device configuration\npnpm
6470
detox build --configuration ios.sim.release"
6571
title: Detox Build
72+
- save-cache@1:
73+
title: Save Detox Build Cache
74+
inputs:
75+
- key: detox-build-{{ checksum "example/ios/Podfile.lock" }}-{{ checksum "example/app.json" }}
76+
- paths: example/ios/build
77+
- is_key_unique: "true"
6678
- script@1:
6779
inputs:
6880
- working_dir: example

0 commit comments

Comments
 (0)