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
Flutter開発とGitHub Actions
Search
yorifuji
October 26, 2023
Programming
360
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Flutter開発とGitHub Actions
yorifuji
October 26, 2023
More Decks by yorifuji
See All by yorifuji
Codex の「自走力」を高める
yorifuji
0
1.6k
GitHub Actionsのカスタムアクションを公開する
yorifuji
0
340
GitHub Actionsのカスタムアクションを作成してMarketplaceで公開した話
yorifuji
0
230
iOSアプリ開発でGitHub Actionsのself-hosted runnerを使う
yorifuji
1
1.8k
Other Decks in Programming
See All in Programming
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
180
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
8
14k
初めてのKubernetes 本番運用でハマった話
oku053
0
130
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
2
910
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
360
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
9.3k
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
3k
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
500
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
4
1.7k
Built Our Own Background Agent at LayerX #aidevex_findy
layerx
PRO
8
3.3k
Lean は証明の正しさを確認するためだけのツールって思ってませんか?
inoueasei
1
110
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
190
Featured
See All Featured
How to Ace a Technical Interview
jacobian
281
24k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Faster Mobile Websites
deanohume
310
32k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
810
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
390
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
390
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.2k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
560
Transcript
Flutter։ൃͱGitHub Actions YORIFUJI MITSUNORI ORION SALON #31
ࣗݾհ • YORIFUJI MITSUNORI • @yorifuji on X/GitHub/Zenn • ۚ༥ܥελʔτΞοϓͷiOSΤϯδχΞ
CIαʔϏεઓࠃ࣌ʁ
GitHub Actions https://github.co.jp/features/actions
GitHub ActionsͰࣗಈԽ͍ͯ͠Δ࡞ۀ • Check(formatter/lint) • fl utter format • fl
utter analyze • Test • Unit/Widget/Integration Test • VRT(Visual Regression Test) • Build & Deploy • Staging(Firebase App Distribution) • Production(Google Play, App Store) • Bump up • pubspec.yml ͷ versionߋ৽&PR࡞ • Nightly build
FlutterͷCIڥͱͯ͠ GitHub ActionsΛ ࠾༻͢Δཧ༝Λߟ͑ͯΈͨ
ਪ͠ཁૉΛϦετΞοϓʂ GitHub Actionsͷ͓͢͢ΊϙΠϯτ • GitHubʹଐ͍ͯ͠ΔͷͰ͙͢ʹ͍࢝ΊΒΕΔ • GitHubͰൃੜ͢ΔΠϕϯτ͕ར༻Ͱ͖Δ • ύϒϦοΫϦϙδτϦແྉɺຖ݄Ұఆͷແྉ͋Γ •
αʔυύʔςΟʔͷΞΫγϣϯ͕๛ • ΧελϚΠζੑ͕ߴ͍ • ແྉϓϥϯͰ࠷େ20ฒྻ·Ͱδϣϒ͕࣮ߦͰ͖Δ • Self-hosted runner͕͑Δ • VSCode Extension͕ศར • υΩϡϝϯτ͕๛ɺຊޠ༁͋Γ Flutter։ൃͰͷ͓͢͢ΊϙΠϯτ • FlutterSDKͷΠϯετʔϧ͕؆୯ • ϫʔΫϑϩʔλʔήοτʹ߹ΘͤͯRunnerͷ͍ ͚͕Ͱ͖Δ • ։ൃڥʢXcodeͳͲʣෳόʔδϣϯ͕Πϯε τʔϧࡁΈ • Windows, Linux, macOSΛͬͯϏϧυͰ͖Δ • ෳͷJobΛฒྻʹಉ࣮࣌ߦͰ͖Δ • CheckAndroidͱiOSͷ build & deploy
Ұ͚ͭͩڍ͛Δͱͨ͠Β
ύϒϦοΫϦϙδτϦແྉɺຖ݄Ұఆͷແྉ͋Γ
GitHubͰൃੜ͢ΔΠϕϯτͱͷ࿈ܞ • ଞͷCIαʔϏεͰPUSHɾPRɾTagͳͲͷGitʹؔ͢ΔτϦΨʔΛαϙʔτ • GitHub ActionsͰGitHubͰൃੜ͢ΔΠϕϯτΛϫʔΫϑϩʔʢδϣϒʣ࣮ߦͷ τϦΨʔʹ͢Δ͜ͱ͕Ͱ͖Δ • ྫɿIssuePRʹ༰ʹ߹ΘͤͯLabelΛ͚ͭΔ •
GitHub ActionsςετϏϧυ͚ͩͰͳ͘։ൃϓϩηεશମͰར༻Ͱ͖Δ
GitHub-hosted runner • GitHub-hosted runnerGitHub͕ඪ४Ͱఏڙ͍ͯ͠ΔCIͷ࣮ߦڥʢVMʣ • Windows, Linux(ubuntu), macOS͔ΒબՄೳ •
macOSMonterey, Ventura͕ఏڙ͞Ε͍ͯΔ • GitHub͕ӡ༻ཧ͍ͯ͠ΔͨΊࣗͰϝϯςφϯεෆཁ • δϣϒͷ࣮ߦ୯ҐͰ·ͬ͞ΒͳΠϯελϯεׂ͕ΓͯΒΕΔ • ୯ҐͰ՝ۚ • macOS࠷͍҆Linuxͷ10ഒͷஈ͕͢ΔͷͰదࡐదॴͰ͍͚͢Δ
ࢀߟɿGitHub-hosted runnerͷιϑτΣΞͷߏ • CIڥʹΠϯετʔϧ͞Ε͍ͯΔιϑτͷҰཡͳͲGitHub্Ͱެ։͞Ε͍ͯΔ • https://github.com/actions/runner-images (2023.10.8࣌)
Self-hosted runner • ϓϥΠϕʔτϦϙδτϦͰGitHub-hosted runnerͰmacOSΛ͏ͱར༻͕࣌ؒ x10 ࢉͷͨΊແྉ ͷফඅ͕ૣ͍ • Self-hosted
runnerॴ༗͍ͯ͠ΔϚγϯͰGitHub ActionsͷϫʔΫϑϩʔ࣮ߦ͢ΔγεςϜ • ϝϦοτ • ϓϥΠϕʔτϦϙδτϦͰRunnerͷར༻࣌ؒʹର͢Δྉ͕ۚൃੜ͠ͳ͍ • σϝϦοτ • Ϛγϯͷཧɾӡ༻ίετશͯࣗෲʢOSπʔϧͷΞοϓσʔτɺ௨৴අ༻ͳͲʣ • GitHub-hostedͱҟͳΓඪ४ͰVMͷػೳ͕ఏڙ͞Ε͍ͯͳ͍ͷͰΰϛ͕ͬͨΓ͢Δ -
FlutterͷϏϧυڥͷηοτΞοϓ • GitHub͕ఏڙ͢ΔRunnerʹFlutter SDK͕Πϯετʔϧ͞Ε͍ͯͳ͍ • ςετϏϧυΛߦ͏ͨΊʹSDKͷΠϯετʔϧ͕ඞཁ • third-partyͷΞΫγϣϯ͕͋Δ • https://github.com/marketplace/actions/
fl utter-action • Git͔Βclone • XcodeAndroid SDKͳͲෳόʔδϣϯ͕ΠϯετʔϧࡁΈͰΓସ͑؆୯ • XcodeͳΒڥม DEVELOPER_DIR ͰΓସ͑Մೳ
ϫʔΫϑϩʔͷతͰRunnerΛΓସ͑Δ • ੩తղੳʢ fl utter analyzeʣςετɺϏϧυ&σϓϩΠͰར༻͢Δ έʔε • ੩తղੳςετ࠷͍҆LinuxͰ࣮ߦ •
ϏϧυAndroidWebͳΒLinuxɺiOSmacOS • ϫʔΫϑϩʔϏϧυλʔήοτʹ߹ΘͤͯRunnerΛ͍͚Δ͜ ͱͰඅ༻ΛίϯτϩʔϧͰ͖Δ
ϫʔΫϑϩʔͷ࠶ར༻ੑ͕ߴ͍ • GitHub ActionsͷϫʔΫϑϩʔͷఆٛyamlϑΝΠϧͳͷͰ࠶ར༻ੑ͕ߴ͍ • ৽͍͠ϓϩδΣΫτΛ։࢝ͨ͠ΒطଘͷϑΝΠϧΛίϐʔ͢Δ͚ͩCI/CDͷ ηοτΞοϓ͕ྃ͢Δ • GUIͷϫʔΫϑϩʔΤσΟλΛϙνϙν͠ͳͯ͘ྑ͍ʢҰҰʣ
ϫʔΫϑϩʔͷΧελϚΠζੑ͕ߴ͍ • CIδϣϒͷதͰJavaScriptΛͬͯॲཧΛهड़Ͱ͖Δ • https://github.com/actions/github-script • Job Summaries • ϫʔΫϑϩʔͷ࣮ߦ݁Ռͷը໘ʹMarkdownܗࣜͳͲͰग़ྗͰ͖Δ
reg-suitΛͬͨVRTʢVisual Regression Testʣ
ࢀߟɿreg-suitͷαϚϦʔΛJob Summariesʹग़ྗ - name: Generate Comment uses: actions/github-script@v6 with: script:
| const fs = require('fs'); ʢ్தলུʣ await core.summary .addHeading(`${icon} reg-suit has checked for visual changes`, 3) .addTable([ ["🔴 Changed", "🟡 New", "⚫ Deleted", "🔵 Passing"], [stats.changed, stats.newItems, stats.deleted, stats.passing] ]) .addHeading("📝 Log", 3) .addCodeBlock(log, "log") .write()
GitHub Actionsͷrunsʢ࣮ߦϩάʣͷϖʔδʹදࣔ͞Εͨ༰
ࠓޙͷվળΛظ͢ΔϙΠϯτ • ϑΝΠϧΞοϓϩʔμʔػೳ • iOSΞϓϦͷϏϧυͰ֤छূ໌ॻProvisioning Pro fi le͕ඞཁ • GitHub
ActionsϑΝΠϧΞοϓϩʔμʔ͕ఏڙ͞Ε͍ͯͳ͍ • ϑΝΠϧΛbase64ʹมͯ͠secretʹొ -> CIδϣϒͷதͰϑΝΠϧʹॻ ͖ग़͢࡞ۀ͕ඞཁ • BitriseͳͲϑΝΠϧΞοϓϩʔυػೳ͔ΒΞοϓϩʔυ͕Ͱ͖Δ • σόοάͯ͘͢͠͠΄͍͠
۩ମతͳϫʔΫϑϩʔͷྫͪ͜ΒͷهࣄΛࢀߟʹ🙏 https://zenn.dev/yorifuji
͋Γ͕ͱ͏͍͟͝·ͨ͠