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
仕事でGoで書いたWindows向けの小さなアプリをAppVeyorを使ってCIした話
Search
Daichi Hioki
March 27, 2019
Technology
0
230
仕事でGoで書いたWindows向けの小さなアプリをAppVeyorを使ってCIした話
第8回ゆるはち.it: CI/CDについてゆるく話す -
https://yuruhachi-it.connpass.com/event/123888/
での LT 資料です。
Daichi Hioki
March 27, 2019
Tweet
Share
More Decks by Daichi Hioki
See All by Daichi Hioki
Rustで学ぶTOTP
hioki_daichi
0
1.3k
Gopher道場#3を振り返る
hioki_daichi
0
2.5k
Rubyエンジニア多めの現場での Vue.js1系 on Rails
hioki_daichi
5
1.3k
Other Decks in Technology
See All in Technology
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
9.9k
Strands Agents × インタリーブ思考 で変わるAIエージェント設計 / Strands Agents x Interleaved Thinking AI Agents
takanorig
5
2.1k
AI時代のワークフロー設計〜Durable Functions / Step Functions / Strands Agents を添えて〜
yakumo
3
2.3k
Introduce marp-ai-slide-generator
itarutomy
0
130
Snowflake Industry Days 2025 Nowcast
takumimukaiyama
0
130
まだ間に合う! Agentic AI on AWSの現在地をやさしく一挙おさらい
minorun365
17
2.8k
LayerX QA Night#1
koyaman2
0
270
Bedrock AgentCore Evaluationsで学ぶLLM as a judge入門
shichijoyuhi
2
270
New Relic 1 年生の振り返りと Cloud Cost Intelligence について #NRUG
play_inc
0
240
_第4回__AIxIoTビジネス共創ラボ紹介資料_20251203.pdf
iotcomjpadmin
0
140
Bedrock AgentCore Memoryの新機能 (Episode) を試してみた / try Bedrock AgentCore Memory Episodic functionarity
hoshi7_n
2
1.9k
AIBuildersDay_track_A_iidaxs
iidaxs
4
1.4k
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
98
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Evolving SEO for Evolving Search Engines
ryanjones
0
77
Game over? The fight for quality and originality in the time of robots
wayneb77
1
67
A designer walks into a library…
pauljervisheath
210
24k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
82
Crafting Experiences
bethany
0
22
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
93
Become a Pro
speakerdeck
PRO
31
5.7k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
120
Transcript
仕事でGoで書いたWindows 向けの小さなアプリを AppVeyorを使ってCIした話
自己紹介 - 株式会社クリプラでクラウド電子カルテを開発している Rails エンジニア - https://clipla.jp/ - 最近は Go
で Windows 向けアプリを作成中 - こちらにまつわる CI のご紹介
AppVeyor とは - Windows 環境の CI ができるやつ - (Windows 以外も対応してるけど・・)
- 価格 - Public なリポジトリなら無料 - 2019年3月時点で Private なリポジトリ は $29/month
設定方法 - Web からでも YAML でも 設定可能 - Web の場合は→
- YAMLの場合は appveyor.yml で
設定方法 - Web で設定したものを YAML へ Export するこ とも可能
Build Worker Image - 現時点でのデフォルト: - Visual Studio 2015 -
ubuntu 等も選択可能 - ubuntu を Worker Image に 使った Getting started ページも ある - Getting started with AppVeyor for Linux | AppVeyor
Stack (※ 今回は使わず) - stack: go 1.11 のように指定すること で公式の用意した Go
を使える
Build Cache - 指定したディレクトリやファイルの内容をビルド間で保持できる 機能
AppVeyor でテストを行う例
appveyor.yml に変更があったら cache からの restore を skip する こちらは Windows
のコマンド > https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/if if [not] exist <FileName> <Command> [else <Expression>] 公式でまだ Go1.12 がサポートされていないためソースからインストール msiexec /i でインストール https://docs.microsoft.com/ja-jp/windows/desktop/Msi/command-line-options あらかじめ environment の箇所で環境変数 GOBIN を c:\gobin に設定しているため、$ go install した時に c:\gobin 以下にツールをインストールしてくれる どこでもよさそう。Go の Modules 導入以前は制限があったかも。 Go のモジュールシステムが過渡期なのでこのような指定が必要 詳細: https://github.com/golang/go/wiki/Modules
AppVeyor に GoReleaser を組み合わせることで tag を push した時に自動で GitHub Releases
に Publish する例
if %APPVEYOR_REPO_TAG% equ true <コマンド> で tag を push した時だけ実行したいコマンドを定義できる
deploy_script 内での goreleaser release の実行
GoReleaser の設定ファイルは .goreleaser.yaml - builds の goos と goarch で
指定した組み合わせをすべ て生成してくれる - 右の例では 6 通り
GoReleaser には環境変数 GITHUB_TOKEN が必要 - GoReleaser を使ってリリースするためには repo の scope
を 持った GitHub token を環境変数 GITHUB_TOKEN に設定 する必要がある
GitHub token の作成 - https://github.com/settings/tokens/new で作るだけ
AppVeyor で環境変数 GITHUB_TOKEN を指定する
あとは tag を push するだけ - tag を push するだけで
GitHub Releases にリリース が作成される
まとめ
- 話したこと - AppVeyor の概要: - 設定方法、Build Worker Image、Stack、Build Cache
- プロジェクトでの実例: - Go1.12 をソースからインストールして statik もインストールしてテスト - AppVeyor + GoReleaser: - AppVeyor と GoReleaser を組み合わせて、tag を push した時に自動で GitHub Releases に publish - その他 - 今回試していなかったけれど、コードが大きい場合は Azure Pipelines の方が良い かも? - https://azure.microsoft.com/ja-jp/services/devops/pipelines/ - Public なリポジトリなら無料で 10 個の並列ジョブ(時間制限なし)を実行可能ら しい