Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
GitHub Actionsが他のCIサービスと比較してできることできないこと
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kenta Kase
October 16, 2019
Programming
1.8k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GitHub Actionsが他のCIサービスと比較してできることできないこと
GitHub Actions Meetup Tokyo β
https://gaugt.connpass.com/event/147220/
Kenta Kase
October 16, 2019
More Decks by Kenta Kase
See All by Kenta Kase
GitHub Actionsオタクによるセルフホストランナーのアーキテクチャ解説
kesin11
0
430
GitHubの新機能とGHESのリリースノートの対応をまとめ続けている話
kesin11
0
220
CircleCIでLayer Cachingを使わずにdocker buildを高速化する
kesin11
3
2.3k
CI/CDのボトルネックを把握できていますか?BigQueryでビルド情報ダッシュボードを構築した話
kesin11
7
11k
TypeScriptから使いやすいFirestore-simpleを紹介します(2020年版)
kesin11
3
2.3k
iOSアプリのリジェクトリスクを早期に発見するための取り組み
kesin11
4
18k
BitriseでFastlane/Gradleプラグインの統合テスト
kesin11
0
3.5k
Firebase Test Labの紹介
kesin11
4
1.7k
Cloud Functions × BigQuery
kesin11
5
2.5k
Other Decks in Programming
See All in Programming
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
870
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
220
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
510
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
5.1k
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
230
オーケストレーション記述言語 Katari
yukikurage
0
220
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
1.9k
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
1.8k
AI-Powered Domain-Driven Design
ziobrando
0
380
Kotlinの15年とServer-Side Kotlin
n_takehata
1
190
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
130
Web3Dライブラリを作ってVue Custom Rendererの仕組みを理解しよう / lets learn vue custom renderer by making 3d library
drumath2237
1
120
Featured
See All Featured
Everyday Curiosity
cassininazir
0
390
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
510
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Unsuck your backbone
ammeep
672
58k
What's in a price? How to price your products and services
michaelherold
247
13k
The Cost Of JavaScript in 2023
addyosmani
56
10k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
660
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Six Lessons from altMBA
skipperchong
29
4.6k
Discover your Explorer Soul
emna__ayadi
2
1.3k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Transcript
GitHub Actionsが他のCIサービスと⽐較してできることできないこと GitHub Actions Meetup Tokyo β (10/16) @Kesin11
⾃⼰紹介 @Kesin11 (GitHub/Twitter) DeNA SWETグループ 開発効率向上を⽬的として、テストやCI/CDの調査・事業 部サポートなど (おそらく普通よりは)CIマニアの気がある わりと早期に運良くyaml版を使えるようになっていたので記 事を書いていました
新GitHub ActionsはCIに使えるか 2 2
はじめに この発表はCI/CDの中級者を対象に考えています 他のCIサービスは⼀通り触ったことがある前提 CircleCI, TravisCI, Google Cloud Build もし間違ったことを⾔っていたらTwitterや懇親会のときに教 えてもらえると嬉しいです
GitHub Actionsはまだβなので正式リリース時には状況が変 わってる可能性が⾼いです 3 3
ビルドキャッシュとアーティファクト
GitHub Actionsの現在 ビルドキャッシュ: 不可能 node_modules(npm), vendor(bundler)など 依存モジュールは毎回ダウンロード&ビルドやりなおし アーティファクト保存: 可能 ビルドしたバイナリなどをダウンロードできるようにする
5 5
6 6
CircleCIの機能との対応表 CircleCI GitHub Actions save_cache - restore_cache - store_artifact actions/upload-artifact
persist_to_workspace actions/upload-artifact attach_workspace actions/download-artifact 7 7
キャッシュの種類について 前のworkflow実⾏から引き継げるか、今のworkflow内だけ かが⼤きな違い GitHub Actionsでは 前のworkflowのキャッシュやアーティファクトは使えない アーティファクトとして回収すれば同じworkflow実⾏内で あればjob間でやりとりできる 8 8
ビルドキャッシュが使えないことは問題か? ビルドに時間がかからないライブラリ系なら問題なさそう jobが多くても並列数で殴ればトータル時間は変わらない 依存モジュールが多い、ネイティブビルドが多い場合はネッ クになる iOS、Androidアプリなどは厳しそう 9 9
マトリックスビルド
マトリックスビルド CIとしてのGitHub Actionsの⽬⽟ 今までTravisCIがOSS界隈のデファクトであった⼤きな理由 のはず 11 11
TravisCI 12 12
GitHub Actions 13 13
TravisCIとの違い ⾔語バージョンを選択するデファクトなツールが使えない rvm, nvmなど actions/setup-xxxx js/tsでそれぞれの⾔語ごとに実装されている nodeの場合はバイナリをダウンロード、PATH通して、 undocumentなキャッシュ領域に保存していた 14 14
問題点 バージョン指定の選択が独⾃実装 latestとかstableとかltsのようなエイリアスが使えない ⾞輪の再発明では? とはいえ、⼤抵の場合はそんなに問題ではなさそう setup-xxxxが存在していない⾔語はバージョン切り替えられ なさそう 15 15
実⾏環境について
VMとコンテナ 今どきのCIサービスはVMとコンテナが混在している CircleCI 基本はコンテナ。 machine: true やmacの場合はVM TravisCI 基本はVM Cloud
Build 全部コンテナ(ちょっと特殊) GitHub Actions 基本はVM。Linuxの場合は設定次第でコンテナにもできる 17 17
stepごとの実⾏環境 CIサービスによってはjob単位ではなくて、step単位で実⾏環境を変えられる CircleCI 基本的にはできない。remote dockerを有効化すれば docker runで実質可能? Cloud Build 元々step毎に必ずコンテナを指定させるスタイル
GitHub Actions 併⽤されるのが基本 18 18
GitHub Actionsの実⾏環境 jobs: job: runs-on: ubuntu-latest steps: # VM 上で実⾏される
- run: env # VM かコンテナかは外部のaction の種類に依存する - uses: actions/checkout@v1 # コンテナ上で実⾏される # with.args で任意のコマンドを実⾏できる - uses: docker://node:10 with: args: echo "foo bar"
「基本コンテナ上で実⾏」に切り替える job.container.imageで使うコンテナを指定 つまり挙動として基本コンテナのCircleCIに近くなる jobs: job: runs-on: ubuntu-latest container: image: "node:12"
steps: # コンテナ上で実⾏される - run: node --version
マトリックスビルドとコンテナ
お気づきでしょうか? 22 22
マトリックスビルド + containerとした場合にどうなる? 23 23
試してみた jobs: job: strategy: matrix: container: ["ruby:2.4", "ruby:2.5", "ruby:2.6"] runs-on:
ubuntu-latest container: image: ${{ matrix.container }} steps: - uses: actions/checkout@v1 - name: "ruby version" run: ruby --version
25 25
マトリックスビルド + container github.com/Kesin11/danger-textlint/pull/16 マトリックスで指定したイメージ上でテストが実⾏でき る!! actions/setup-xxxxに頼る必要がない 多分他のCIで同じことができるものはないので唯⼀無⼆ 各⾔語の公式イメージ上で実⾏できる安⼼感 OSS⽤途としては最⾼では
ただしLinux上での実⾏に限る 26 26
その他細かいこと1 Slack通知 サポート無し。⾃⼒でやる push, pull-req以外のwebhookトリガー 可能。GitHub Actionsならでは 新たなpushで溜まったキューのキャンセル CircleCIだとAuto-cancel redundant
builds ない。正式版になって課⾦されるようになると困るかも rerunがworkflow単位 TravisCIのようにマトリックスの⼀部だけrerunできない 27 27
その他細かいこと2 Docker in Docker CircleCIのような特殊なことをせずとも可能 job.container.imageで docker を指定して、 docker build
などはそのまま動く docker buildのキャッシュ CircleCIのlayer cache、Cloud BuildのKanikoのような 便利な仕組みはない 同じくβのGitHub Package Resistoryと --cache-from を組み合わせるぐらい? 28 28
まとめ ビルドキャッシュは無い(少なくとも今は) マトリックスビルドは便利 マトリックスビルド + containerは唯⼀無⼆ まだβなので、より便利になると信じている ⾊々実験した記録のリポジトリ github.com/Kesin11/github_actions_matrix_js_sandbox 29
29 Slide created by Marp(marp.app) Slide created by Marp(marp.app)