Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
Optimize Flutter Workflow on Bitrise
Hiroki Matsue
March 26, 2019
Technology
3
630
Optimize Flutter Workflow on Bitrise
Flutter Meetup Tokyo #8"でのLT資料です。
https://flutter-jp.connpass.com/event/121387/
Hiroki Matsue
March 26, 2019
Tweet
Share
More Decks by Hiroki Matsue
See All by Hiroki Matsue
matsue
2
330
matsue
5
510
matsue
2
530
matsue
2
1k
matsue
4
7.9k
matsue
0
2.9k
matsue
1
430
matsue
2
1.4k
matsue
0
550
Other Decks in Technology
See All in Technology
hayatan
0
180
ocise
1
1.8k
mamix1116
3
400
oracle4engineer
0
3.6k
twada
PRO
6
2k
buildersbox
0
190
iwashi86
53
23k
yunoda
0
120
you
0
280
kawaguti
2
410
andysumi
0
160
yamamuteki
2
630
Featured
See All Featured
mojombo
358
62k
lara
15
2.7k
lara
590
61k
chriscoyier
779
240k
revolveconf
200
9.7k
philhawksworth
190
17k
imathis
479
150k
moore
125
21k
jasonvnalue
81
8.1k
bkeepers
321
53k
lara
172
9.6k
marktimemedia
7
390
Transcript
Optimize Flutter Workflow on Bitrise Hiroki Matsue (@macs_6) Mar 26th,
2019 Flutter Meetup Tokyo #8
This talk is about CI steps time reduction
Target Listeners
Who know this
Faster CI makes devs happier
Reulst on my project Timeout => 9 minutes Just few
minutes, but Free plan is not so bad ¯\(π)/¯
Flutter CI steps 1. Install Flutter 2. Execute "flutter analyze"
3. Execute "flutter test" 4. Execute "flutter build" (Android and iOS both)
(Each results were measured with my personal project)
Try "Flutter Install" step optimization
TL;DR: Just wait new Hybrid stack https://discuss.bitrise.io/t/making-flutter-builds-faster/3976/8
What if we cache Flutter? • flutter installation: 137sec 㱺
2sec (-135sec) • cache-pull: 11sec 㱺 27sec (+16sec) • cache-push: 92sec 㱺 209sec (+117sec) Only remote storage was changed, no time reduction
Try "flutter build" step optimization
TL;DR: Cache following items • ios/Pods/ • $HOME/Library/Developer/Xcode/DerivedData
Pods caching result • flutter build ios: 172sec 㱺 99sec
(-73sec) • cache-pull: 9sec => 11sec (+2sec) • cache-push: 58sec 㱺 72sec (+14sec) Very effective !
DerivedData caching result • flutter build ios: 140sec 㱺 54sec
(-86sec) • cache-pull: 15sec => 15sec (+0sec) • cache-push: 85sec 㱺 141sec (+56sec)
Non effective items on my project • build/ • ios/Flutter/
• ios/.symlinks/ • $HOME/.gradle/ • android/.gradle/ cache-push tooks too long time for .gradle on my project.
References • "60% faster builds: force Xcode to use caching
on Bitrise!" https://medium.com/@bitrise/60-faster-builds-force-xcode- to-use-caching-on-bitrise-af8979ca39a6 • "Cache Gradle dependencies on Bitrise" https:// medium.com/bitrise/cache-gradle-dependencies-on- bitrise-cf19a2580d07
Faster "flutter analyze" and "flutter test"? Sorry, I have no
idea now ¯\(π)/¯
Other ideas • Put dependencies to the repo • Use
build scheduling for long workflows • Pay for Bitrise • Concurrent build for ios and apk
Summary Caching following items, and using new Flutter Hybrid stacks
will be efficient. • ios/Pods/ • $HOME/Library/Developer/Xcode/DerivedData
Thanks