Skip to content

perf: Noto CJKフォントをactions/cacheでキャッシュ - #9

Merged
sgash708 merged 1 commit into
mainfrom
perf/font-cache
Aug 9, 2026
Merged

perf: Noto CJKフォントをactions/cacheでキャッシュ#9
sgash708 merged 1 commit into
mainfrom
perf/font-cache

Conversation

@sgash708

@sgash708 sgash708 commented Aug 9, 2026

Copy link
Copy Markdown
Owner

概要

「速さで戦う」施策の続き。fonts-noto-cjk(約61MB)のapt installがCI内で最も重い部分だったため、actions/cacheでキャッシュする。

実装

  • /usr/share/fonts/opentype/noto, /var/cache/fontconfig はroot所有だが、actions/cache復元時に書き込めるよう事前に所有権をrunnerユーザーへ渡す方式で実装
  • cache hit時はapt-get自体を完全にスキップ

実機検証(chromagic-demoでブランチ直接参照)

  • run1(キャッシュ作成): Cache saved with key: chromagic-noto-cjk-Linux — 権限エラーなし
  • run2(キャッシュ利用): Cache restored from key: chromagic-noto-cjk-Linux — 権限エラーなし、run success
  • chromagicステップ全体: フォントキャッシュなし版の30秒 → 23秒 まで短縮
  • 未キャッシュ状態(初回)の31〜42秒と比べ、大幅に短縮

動作確認

  • actionlint OK (exit 0)
  • YAML構文チェック OK
  • chromagic-demoで実機2回実行、権限エラーなし・VRT成功を確認済み

🤖 Generated with Claude Code

fonts-noto-cjkは約61MBあり apt install の大半を占める。/usr/share/fonts,
/var/cache/fontconfig はroot所有なのでactions/cacheが復元できるよう
事前に所有権をrunnerユーザーへ渡す方式で実装。まずchromagic-demoで
ブランチ直接参照して権限エラーが出ないか検証してからマージする。
@sgash708
sgash708 merged commit 1be778c into main Aug 9, 2026
2 checks passed
@sgash708
sgash708 deleted the perf/font-cache branch August 9, 2026 02:32
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.2.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant