Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
AbemaTV iOSチームにおける継続的ナントカについて
Search
toshi0383
July 26, 2017
Programming
6
2.7k
AbemaTV iOSチームにおける継続的ナントカについて
iOS Test Night #5 での発表資料です!
toshi0383
July 26, 2017
Tweet
Share
More Decks by toshi0383
See All by toshi0383
CoreDataはじめました
toshi0383
0
100
Swiftコードバトル必勝法
toshi0383
1
220
Sheets API使ってみた
toshi0383
2
270
visionOSについてGlobeeが取り組んでいること
toshi0383
0
450
agile20150512-150512055145-lva1-app6892.pdf
toshi0383
0
140
たのしいAirPlay
toshi0383
1
670
Profiling using Signpost
toshi0383
2
880
AVPlayer周りの設計tips
toshi0383
6
820
cmdshelf::from("Swift")
toshi0383
3
840
Other Decks in Programming
See All in Programming
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.5k
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
480
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
940
nekko cloudにおけるProxmox VE利用事例
irumaru
3
430
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
470
php-conference-japan-2024
tasuku43
0
320
103 Early Hints
sugi_0000
1
230
良いユニットテストを書こう
mototakatsu
8
2.7k
Zoneless Testing
rainerhahnekamp
0
120
快速入門可觀測性
blueswen
0
370
Beyond ORM
77web
7
920
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
290
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
A Philosophy of Restraint
colly
203
16k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
Building Applications with DynamoDB
mza
91
6.1k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Faster Mobile Websites
deanohume
305
30k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Gamification - CAS2011
davidbonilla
80
5.1k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Transcript
AbemaTV iOSνʔϜʹ͓͚Δܧ ଓతφϯτΧʹ͍ͭͯ iOS Test Night #5 Jul 26, 2017
Toshihiro Suzuki © Toshihiro Suzuki 2017 1
whoami — ླ ढ़༟ (@toshi0383) — iOS/tvOS Dev at AbemaTV
— αόή, F1, ΠϯυΧϨʔ — ৽ถύύ (͏͙͢3ϲ݄) © Toshihiro Suzuki 2017 2
tools and apps © Toshihiro Suzuki 2017 3
ࠓ CIٴͼ։ൃڥͷվળΛ௨ͯ͠ಘͨ ݟΛ͓͑͠·͢ © Toshihiro Suzuki 2017 4
ݱࡏͷঢ়گ © Toshihiro Suzuki 2017 5
Swi! 8ສߦۙ͘ͷίʔυϕʔε ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Swift
975 15178 10243 77378 © Toshihiro Suzuki 2017 6
1944 ςετέʔε Executed 1944 tests, with 0 failures (0 unexpected)
in 16.075 (17.243) seconds © Toshihiro Suzuki 2017 7
DebugϏϧυ࠷ه — 58ඵ (20177݄ࠒ) - ࣗͷiMac © Toshihiro Suzuki 2017
8
CIςετ࣮ߦ࠷ه — 251ඵ (20174݄ࠒ) - Jenkins on Mac Pro —
613ඵ (20177݄ࠒ) - Bitrise Elite VM © Toshihiro Suzuki 2017 9
CI΄΅ৗʹάϦʔϯ — ςετέʔεͷमਖ਼ΕҎ֎΄΅ࣦഊͳ͠ — PRฏۉ10ఔ(ഽײ֮)ͰϚʔδՄೳͳঢ়ଶʹ — ·͋·͋৺Α͍εϐʔυײ © Toshihiro Suzuki
2017 10
ࢥ͍ฦͤ © Toshihiro Suzuki 2017 11
20173݄ʹAbemaTVʹjoin © Toshihiro Suzuki 2017 12
࣌νʔϜ๊͕͍͑ͯͨ — ֤ࣗखݩͰͷϏϧυ͕10Ҏ্͔͔Δ => UIඍमਖ਼ͷΠς Ϩʔγϣϯ.. — Jenkinsͷςετ͕͍ͷͱෆ҆ఆͰͳ͔ͳ͔ϚʔδͰ͖ͳ ͍ =>
ۙ͘ແବʹ͢Δέʔε — Jenkins͕͍ΔMac͕ෆػݏ? => ڥͷϝϯςφϯε࡞ۀ ͰҰ௵͢ਓ͕ଓग़ʢओʹࢲʣ © Toshihiro Suzuki 2017 13
ରࡦͱͯͬͨ͜͠ͱ — ςετͷ҆ఆԽͱߴԽ — CarthageҠߦ — BitriseҠߦ © Toshihiro Suzuki
2017 14
ରࡦͱͯͬͨ͜͠ͱ — ςετͷ҆ఆԽͱߴԽ <- — CarthageҠߦ — BitriseҠߦ © Toshihiro
Suzuki 2017 15
ςετ҆ఆԽͱߴԽ ՝ — δϣϒͷ࣮ߦʹ20~40 — ςετ͕ෆ҆ఆͳ͍ͤͰ͜ΕͷϦτϥΠ͕Կճଓ͘ — JenkinsͰฒྻ࣮ߦͰ͖ͣɺϏϧυͪͰେौ!" ͜͏͍͏ͷΛͳΜͱ͔͔ͨͬͨ͠ ©
Toshihiro Suzuki 2017 16
ςετ҆ఆԽͱߴԽ ରࡦ — ඇಉظͷ݁ՌΛ͍ͪ͗ͯͨ͘͢ͷΛमਖ਼ (10ඵ => 1ඵ) — ίϯύΠϧͷߴԽ (͕͔͔࣌ؒͬͯΔͱ͜Ζ͚ͩܕਪΛ
ΊΔ) — 10ճʹ1ճͰࣦഊ͢ΔࢠϙΠο! (։ൃεϐʔυ > Χό Ϩοδ) — ϏϧυͱςετͦΕͧΕʹλΠϜΞτΛઃఆ (5ͱ3) © Toshihiro Suzuki 2017 17
ରࡦͱͯͬͨ͜͠ͱ — ςετͷ҆ఆԽͱߴԽ — CarthageҠߦ <- — BitriseҠߦ © Toshihiro
Suzuki 2017 18
ͳͥCarthageͳͷ͔ʁ — ݱঢ়ଘࡏ͢ΔϥΠϒϥϦཧπʔϧͷதͰҰ൪ߴԽ͠ ͍͢. — Ϗϧυͨ͠όΠφϦdSYMͳͲΛίϛοτͯ͠ӡ༻͢Δ͜ ͱͰɺCIͰΫϩʔϯ͢Δ͚ͩͰࡁΉ. — ϥΠϒϥϦͷϏϧυ͕͍ͷΛͳΜͱ͔͔ͨͬͨ͠ (RxSwift
1ɺProfobufؔ࿈ 2) © Toshihiro Suzuki 2017 19
CarthageҠߦͷϋϚΓͲ͜Ζ — ϥΠϒϥϦଆ͕CarthageରԠ͍ͯ͠ͳ͍ — ϥΠϒϥϦଆͷίʔυʹdebuggerͯΒΕͳ͍ — Info.plistෆ߹ — bcsymbolmapͬͯͳʹ —
ݹ͍bcsymbolmap͕ͬͯ͠·͏ — dSYMͰ͔͗͢ © Toshihiro Suzuki 2017 20
ϥΠϒϥϦଆ͕CarthageରԠ͍ͯ͠ͳ͍ — forkͯ͠ؤுͬͨ. — PRϚʔδͯ͘͠ΕΔέʔε͋Δ͕ɺݹ͍όʔδϣϯ͍ ͍ͨ߹ͳͲͲ͏ͯ͠forkΛϝϯς͍ͯ͘͠ඞཁ͋Γ. © Toshihiro Suzuki 2017
21
ϥΠϒϥϦଆͷίʔυʹdebuggerͯΒΕͳ͍ CarthageΛͬͨϑϨΩγϒϧͳ։ൃڥͷߏங http://qiita.com/toshi0383/items/e932a2fb2f1469bf95eb © Toshihiro Suzuki 2017 22
Info.plistෆ߹ ϥΠϒϥϦͷInfo.plist͕ݪҼͰૺ۰ͨ͠iTunesConnectΞο ϓϩʔυΤϥʔ http://qiita.com/toshi0383/items/6418e70b5c33e2de0d13 CFBundleVersionCFBundleShortVersionStringͷ ValidationʹҾ͔͔ͬΔ. ϥΠϒϥϦଆͰͪΌΜͱઃఆͯ͘͠Ε͍ͯΔඞཁ͕͋Δ. © Toshihiro Suzuki
2017 23
bcsymbolmapͬͯͳʹ — Carthage/Build/iOS ҎԼʹੜ͞ΕΔ. — bitcode͕༗ޮͳ߹ɺdSYMͱͷඥ͚ʹΘΕΔΒ͍͠. — ͱΓ͋͑ͣίϛοτ͠ͱ͚ok. © Toshihiro
Suzuki 2017 24
ݹ͍bcsymbolmap͕ͬͯ͠·͏ — carthage update ಛʹݹ͍bcsymbolmapΛআͯ͘͠Ε ͨΓ͠ͳ͍. — Ϟδϡʔϧ໊Ͱgrepͯ͠আ͢ΔࡶͳεΫϦϓτΛॻ͍ͨ Γͯ͠ӡ༻ͰΧόʔ. ©
Toshihiro Suzuki 2017 25
dSYMͰ͔͗͢ — GitHubͷϑΝΠϧαΠζ੍ݶ(50MB/1ϑΝΠϧ)ʹҾ͔͔ͬ Δέʔε͋Γ. — ݱঢ়Git LFSͰӡ༻. © Toshihiro Suzuki
2017 26
ରࡦͱͯͬͨ͜͠ͱ — ςετͷ҆ఆԽͱߴԽ — CarthageҠߦ — BitriseҠߦ <- © Toshihiro
Suzuki 2017 27
Bitriseͱ — ׂͱ࠷ۙग़͖ͯͨCIαʔϏε(SaaS) — AndroidXamarinʹରԠ — Linux VM͋Δ © Toshihiro
Suzuki 2017 28
ͳͥBitriseʹͨ͠ͷ͔ʁ — Ϗϧυ͕҆ఆͨ͠ͱͯ͠ɺͱʹ͔͘Jenkins৬ਓ͕ඞཁͳ ঢ়ଶΛ͔ͨͬͨ͠. — ݕূͷ݁ՌɺBitriseͷElite MachineͳΒΪϦΪϦεϖοΫ ͕ؒʹ߹ͬͨ. © Toshihiro
Suzuki 2017 29
Bitrise Elite MachineͷεϖοΫ Hardware: Hardware Overview: Model Name: Apple device
Model Identifier: VMware7,1 Processor Speed: 2.58 GHz Number of Processors: 2 Total Number of Cores: 2 L2 Cache (per Processor): 256 KB L3 Cache (per Processor): 30 MB Memory: 8 GB Boot ROM Version: VMW71.00V.0.B64.1506250318 SMC Version (system): 2.8f0 Serial Number (system): VMCpWilpP27U Hardware UUID: 420B563C-BB9B-3762-1FEF-AA73189D7017 ·͋·͋ϋΠεϖοΫͬΆ͍. © Toshihiro Suzuki 2017 30
Bitrise Elite Plan — ·͋·͋ϋΠεϖοΫͳVMΛಉ࣌ʹ3x~ฒྻ࣮ߦՄೳ — ฒྻ1ͭ͋ͨΓ$100͕ͩɺx3͕࠷ϥΠϯͳͷͰ $300~/ mo ͳʹҙ.
© Toshihiro Suzuki 2017 31
ͪͳΈʹ.. JenkinsΛ͍ଓ͚Δબࢶ͋Γ͑ ͳ͘ͳ͔ͬͨ © Toshihiro Suzuki 2017 32
JenkinsͰฒྻγϛϡϨʔλڥ — Macͷϓϩηεͷ্ݶղ์ (pxctestͷυΩϡϝϯτࢀর) — pxctestͰSimulator.appىಈͤͣʹ࣮ߦ͢Δ͜ͱͰϓϩ ηεͷઅ — ςετͷδϣϒͱЌͷδϣϒͰγϛϡϨʔλΛ͚ͯࢦ ఆ
࣮ࡍ·͋·͋Α͔ͬͨ. JenkinsΛ͍͜ͳͤͬͱߴͳ ͜ͱͰ͖Δͣ. © Toshihiro Suzuki 2017 33
BitriseҠߦͷצॴ — Makefileͷઃఆྫ (Bitriseͱؔͳ͍͚Ͳ) — bitrise.yml © Toshihiro Suzuki 2017
34
Makefileͷઃఆྫ SHOW_BUILD_SETTINGS=$(XCODEBUILD) $(ENV_VARS) $(OPTIONS) $(DESTINATION) \ -configuration $(CONFIGURATION) \ -showBuildSettings
BUILD_FOR_TESTING=$(XCODEBUILD) $(ENV_VARS) $(OPTIONS) $(DESTINATION) \ -configuration Test \ build-for-testing TEST_WITHOUT_BUILDING=$(XCODEBUILD) $(ENV_VARS) $(OPTIONS) $(DESTINATION) \ -configuration Test \ test-without-building fastlane scan ͱൺͨར - ࣮ߦ͕͍. - -showBuildSettings ͷग़ྗΛൺֱ͢Δ͜ͱͰϏϧυઃఆͷ ςετ͕Ͱ͖ΔɺͳͲ. © Toshihiro Suzuki 2017 35
bitrise.yml: workflow ϙΠϯτ - circle.ymltravis.ymlͱҧ͍ɺίϛοτ͠ͳ͍. - δϣϒΛworkflowͱͯ͠ઃఆ͢Δ. - workflowstepͷू·Γ. -
slackͷ௨؆୯ʹ࣮Ͱ͖Δ © Toshihiro Suzuki 2017 36
bitrise.yml: trigger map ϙΠϯτ - Trigger MapͰࡉ͔͘workflowΛࢦఆͰ͖Δ. © Toshihiro Suzuki
2017 37
Bitriseͷࡉ͔͍ใʹ͍ͭͯiOSDCͷCfPʹԠืͨ͠ͷͰ ͜͜ͰׂѪ ؾʹͳΔਓͥͻ֦ࢄͷ΄Ͳ! https://iosdc.jp/2017/node/1469 © Toshihiro Suzuki 2017 38
ࠓͨ͜͠ͱ — ςετͷ҆ఆԽͱߴԽ — CarthageҠߦ — BitriseҠߦ © Toshihiro Suzuki
2017 39
End © Toshihiro Suzuki 2017 40
Toshihiro Suzuki Feel free to reach out! Twitter: @toshi0383 GitHub:
@toshi0383 Qiita: @toshi0383 Email:
[email protected]
© Toshihiro Suzuki 2017 41