Skip to content

Commit 89a898c

Browse files
committed
Change caching logic for rs-core jobs
1 parent 1f24fe7 commit 89a898c

3 files changed

Lines changed: 15 additions & 9 deletions

File tree

.gitlab-ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ stages:
1616
- publish
1717
- deploy
1818
- test
19+
variables:
20+
CARGO_HOME: ${CI_PROJECT_DIR}/.cargo
21+
CARGO_TARGET_DIR: ${CI_PROJECT_DIR}/target
1922
default:
2023
tags:
2124
- dind_fast

.gitlab/ci/build_rn_sdk.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,19 @@ rn-android-build:
2424
cache:
2525
- key:
2626
files:
27+
- packages/rs-core/Cargo.lock
28+
prefix: rs-core-cargo-deps
29+
paths:
30+
- .cargo/registry/index
31+
- .cargo/registry/cache
32+
- .cargo/git/db
33+
- key:
34+
files:
35+
- packages/rs-core/Cargo.lock
2736
- pnpm-lock.yaml
28-
prefix: ubrn-target
37+
prefix: rs-core-target-${CI_JOB_NAME}
2938
paths:
30-
- node_modules/.pnpm/uniffi-bindgen-react-native@*/node_modules/uniffi-bindgen-react-native/target
39+
- target
3140
script:
3241
- cd packages/react-native
3342
- |

.gitlab/ci/build_rs_core.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
- .gitlab/ci/build_rs_core.yml
1616
variables:
1717
RUST_CORE_PATH: packages/rs-core
18-
CARGO_HOME: ${CI_PROJECT_DIR}/.cargo
1918
cache:
2019
- key:
2120
files:
@@ -76,15 +75,10 @@ rs-core-uniffi-web-build:
7675
- key:
7776
files:
7877
- packages/rs-core/Cargo.lock
78+
- pnpm-lock.yaml
7979
prefix: rs-core-target-${CI_JOB_NAME}
8080
paths:
8181
- target
82-
- key:
83-
files:
84-
- pnpm-lock.yaml
85-
prefix: ubrn-target
86-
paths:
87-
- node_modules/.pnpm/uniffi-bindgen-react-native@*/node_modules/uniffi-bindgen-react-native/target
8882
script:
8983
- cd packages/rs-core-uniffi-web
9084
- |

0 commit comments

Comments
 (0)