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
110
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
830
cmdshelf::from("Swift")
toshi0383
3
840
Other Decks in Programming
See All in Programming
nekko cloudにおけるProxmox VE利用事例
irumaru
3
480
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
250
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
670
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
590
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
800
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
370
fs2-io を試してたらバグを見つけて直した話
chencmd
0
260
採用事例の少ないSvelteを選んだ理由と それを正解にするためにやっていること
oekazuma
2
1.1k
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
890
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
890
Spatial Rendering for Apple Vision Pro
warrenm
0
250
CloudflareStack でRAGに入門
asahiiwm
0
130
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Thoughts on Productivity
jonyablonski
68
4.4k
Embracing the Ebb and Flow
colly
84
4.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
It's Worth the Effort
3n
183
28k
Docker and Python
trallard
43
3.2k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
470
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
171
50k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
GraphQLとの向き合い方2022年版
quramy
44
13k
Designing for humans not robots
tammielis
250
25k
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