Skip to content

Commit db4d5b0

Browse files
committed
Cache mobile build deps
1 parent aa35965 commit db4d5b0

File tree

2 files changed

+160
-0
lines changed

2 files changed

+160
-0
lines changed

.github/workflows/mobile-bundle-analysis.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,38 @@ jobs:
2020
runs-on: macos-14
2121
steps:
2222
- uses: actions/checkout@v4
23+
- name: Cache Node Modules
24+
uses: actions/cache@v4
25+
with:
26+
path: |
27+
app/node_modules
28+
~/.cache/yarn
29+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
30+
restore-keys: |
31+
${{ runner.os }}-yarn-
32+
- name: Cache Ruby Bundler
33+
uses: actions/cache@v4
34+
with:
35+
path: app/vendor/bundle
36+
key: ${{ runner.os }}-gems-${{ hashFiles('app/Gemfile.lock') }}
37+
restore-keys: |
38+
${{ runner.os }}-gems-
39+
- name: Cache CocoaPods
40+
uses: actions/cache@v4
41+
with:
42+
path: app/ios/Pods
43+
key: ${{ runner.os }}-pods-${{ hashFiles('app/ios/Podfile.lock') }}
44+
restore-keys: |
45+
${{ runner.os }}-pods-
46+
- name: Cache Gradle
47+
uses: actions/cache@v4
48+
with:
49+
path: |
50+
~/.gradle/caches
51+
~/.gradle/wrapper
52+
key: ${{ runner.os }}-gradle-${{ hashFiles('app/android/**/gradle-wrapper.properties', 'app/android/**/gradle-wrapper.jar') }}
53+
restore-keys: |
54+
${{ runner.os }}-gradle-
2355
- name: Install Mobile Dependencies
2456
uses: ./.github/actions/mobile-setup
2557
with:
@@ -38,6 +70,38 @@ jobs:
3870
runs-on: macos-14
3971
steps:
4072
- uses: actions/checkout@v4
73+
- name: Cache Node Modules
74+
uses: actions/cache@v4
75+
with:
76+
path: |
77+
app/node_modules
78+
~/.cache/yarn
79+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
80+
restore-keys: |
81+
${{ runner.os }}-yarn-
82+
- name: Cache Ruby Bundler
83+
uses: actions/cache@v4
84+
with:
85+
path: app/vendor/bundle
86+
key: ${{ runner.os }}-gems-${{ hashFiles('app/Gemfile.lock') }}
87+
restore-keys: |
88+
${{ runner.os }}-gems-
89+
- name: Cache CocoaPods
90+
uses: actions/cache@v4
91+
with:
92+
path: app/ios/Pods
93+
key: ${{ runner.os }}-pods-${{ hashFiles('app/ios/Podfile.lock') }}
94+
restore-keys: |
95+
${{ runner.os }}-pods-
96+
- name: Cache Gradle
97+
uses: actions/cache@v4
98+
with:
99+
path: |
100+
~/.gradle/caches
101+
~/.gradle/wrapper
102+
key: ${{ runner.os }}-gradle-${{ hashFiles('app/android/**/gradle-wrapper.properties', 'app/android/**/gradle-wrapper.jar') }}
103+
restore-keys: |
104+
${{ runner.os }}-gradle-
41105
- name: Install Mobile Dependencies
42106
uses: ./.github/actions/mobile-setup
43107
with:

.github/workflows/mobile-ci.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,38 @@ jobs:
2020
runs-on: macos-14
2121
steps:
2222
- uses: actions/checkout@v4
23+
- name: Cache Node Modules
24+
uses: actions/cache@v4
25+
with:
26+
path: |
27+
app/node_modules
28+
~/.cache/yarn
29+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
30+
restore-keys: |
31+
${{ runner.os }}-yarn-
32+
- name: Cache Ruby Bundler
33+
uses: actions/cache@v4
34+
with:
35+
path: app/vendor/bundle
36+
key: ${{ runner.os }}-gems-${{ hashFiles('app/Gemfile.lock') }}
37+
restore-keys: |
38+
${{ runner.os }}-gems-
39+
- name: Cache CocoaPods
40+
uses: actions/cache@v4
41+
with:
42+
path: app/ios/Pods
43+
key: ${{ runner.os }}-pods-${{ hashFiles('app/ios/Podfile.lock') }}
44+
restore-keys: |
45+
${{ runner.os }}-pods-
46+
- name: Cache Gradle
47+
uses: actions/cache@v4
48+
with:
49+
path: |
50+
~/.gradle/caches
51+
~/.gradle/wrapper
52+
key: ${{ runner.os }}-gradle-${{ hashFiles('app/android/**/gradle-wrapper.properties', 'app/android/**/gradle-wrapper.jar') }}
53+
restore-keys: |
54+
${{ runner.os }}-gradle-
2355
- name: Install Dependencies
2456
uses: ./.github/actions/yarn-install
2557
- name: Build Dependencies
@@ -36,6 +68,38 @@ jobs:
3668
runs-on: macos-14
3769
steps:
3870
- uses: actions/checkout@v4
71+
- name: Cache Node Modules
72+
uses: actions/cache@v4
73+
with:
74+
path: |
75+
app/node_modules
76+
~/.cache/yarn
77+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
78+
restore-keys: |
79+
${{ runner.os }}-yarn-
80+
- name: Cache Ruby Bundler
81+
uses: actions/cache@v4
82+
with:
83+
path: app/vendor/bundle
84+
key: ${{ runner.os }}-gems-${{ hashFiles('app/Gemfile.lock') }}
85+
restore-keys: |
86+
${{ runner.os }}-gems-
87+
- name: Cache CocoaPods
88+
uses: actions/cache@v4
89+
with:
90+
path: app/ios/Pods
91+
key: ${{ runner.os }}-pods-${{ hashFiles('app/ios/Podfile.lock') }}
92+
restore-keys: |
93+
${{ runner.os }}-pods-
94+
- name: Cache Gradle
95+
uses: actions/cache@v4
96+
with:
97+
path: |
98+
~/.gradle/caches
99+
~/.gradle/wrapper
100+
key: ${{ runner.os }}-gradle-${{ hashFiles('app/android/**/gradle-wrapper.properties', 'app/android/**/gradle-wrapper.jar') }}
101+
restore-keys: |
102+
${{ runner.os }}-gradle-
39103
- name: Install Dependencies
40104
uses: ./.github/actions/yarn-install
41105

@@ -57,6 +121,38 @@ jobs:
57121
xcode-version: "16.2"
58122

59123
- uses: actions/checkout@v4
124+
- name: Cache Node Modules
125+
uses: actions/cache@v4
126+
with:
127+
path: |
128+
app/node_modules
129+
~/.cache/yarn
130+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
131+
restore-keys: |
132+
${{ runner.os }}-yarn-
133+
- name: Cache Ruby Bundler
134+
uses: actions/cache@v4
135+
with:
136+
path: app/vendor/bundle
137+
key: ${{ runner.os }}-gems-${{ hashFiles('app/Gemfile.lock') }}
138+
restore-keys: |
139+
${{ runner.os }}-gems-
140+
- name: Cache CocoaPods
141+
uses: actions/cache@v4
142+
with:
143+
path: app/ios/Pods
144+
key: ${{ runner.os }}-pods-${{ hashFiles('app/ios/Podfile.lock') }}
145+
restore-keys: |
146+
${{ runner.os }}-pods-
147+
- name: Cache Gradle
148+
uses: actions/cache@v4
149+
with:
150+
path: |
151+
~/.gradle/caches
152+
~/.gradle/wrapper
153+
key: ${{ runner.os }}-gradle-${{ hashFiles('app/android/**/gradle-wrapper.properties', 'app/android/**/gradle-wrapper.jar') }}
154+
restore-keys: |
155+
${{ runner.os }}-gradle-
60156
- name: Install Mobile Dependencies
61157
uses: ./.github/actions/mobile-setup
62158
with:

0 commit comments

Comments
 (0)