@@ -116,13 +116,45 @@ jobs:
116
116
max_attempts : 3
117
117
command : yarn tests:ios:pod:install
118
118
119
+ - uses : actions/cache@v2
120
+ name : Buildcache Cache
121
+ id : buildcache-cache
122
+ with :
123
+ path : ~/.buildcache
124
+ key : ${{ runner.os }}-v1
125
+
126
+ - name : Fetch buildcache
127
+ uses : nick-invision/retry@v2
128
+ with :
129
+ timeout_minutes : 10
130
+ retry_wait_seconds : 60
131
+ max_attempts : 3
132
+ command : cd $HOME && curl -s https://api.github.com/repos/mbitsnbites/buildcache/releases/latest | grep -o "https://.*macos\.zip" | xargs curl -fsLJO
133
+
134
+ - name : Install buildcache
135
+ run : |
136
+ pwd
137
+ cd $HOME
138
+ ls -la
139
+ unzip buildcache-macos.zip
140
+ ln -s $HOME/buildcache/bin/buildcache $HOME/buildcache/bin/clang
141
+ ln -s $HOME/buildcache/bin/buildcache $HOME/buildcache/bin/clang++
142
+ echo "BUILDCACHE_MAX_CACHE_SIZE=525288000" >> $GITHUB_ENV
143
+ echo "BUILDCACHE_DEBUG=2" >> $GITHUB_ENV
144
+ echo "BUILDCACHE_LOG_FILE=$HOME/buildcache.log" >> $GITHUB_ENV
145
+ echo $HOME/buildcache/bin >> $GITHUB_PATH
146
+
119
147
- name : Build iOS App
120
148
run : |
149
+ $HOME/buildcache/bin/buildcache -c
150
+ $HOME/buildcache/bin/buildcache -s
151
+ which clang
121
152
export SKIP_BUNDLING=1
122
153
export RCT_NO_LAUNCH_PACKAGER=1
123
154
cd tests
124
155
set -o pipefail
125
156
./node_modules/.bin/detox build --configuration ios.sim.debug
157
+ $HOME/buildcache/bin/buildcache -s
126
158
shell : bash
127
159
128
160
- name : Install applesimutils
@@ -157,6 +189,13 @@ jobs:
157
189
cd tests
158
190
./node_modules/.bin/nyc ./node_modules/.bin/detox test --debug-synchronization 200 --configuration ios.sim.debug --cleanup
159
191
192
+ - name : Upload Buildcache Log
193
+ uses : actions/upload-artifact@v2
194
+ if : always()
195
+ with :
196
+ name : buildcache_log
197
+ path : $BUILDCACHE_LOG_FILE
198
+
160
199
- name : Compress Simulator Log
161
200
if : always()
162
201
run : gzip -9 simulator.log
@@ -165,7 +204,7 @@ jobs:
165
204
uses : actions/upload-artifact@v2
166
205
if : always()
167
206
with :
168
- name : simulator_logs
207
+ name : simulator_log
169
208
path : simulator.log.gz
170
209
171
210
- name : Submit Coverage
0 commit comments