Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2023-07-06 - 新しく出てきた GitHub Actions のお陰で Nix のキャッシュ効かせるのが楽になった #226

Closed
kachick opened this issue Jul 6, 2023 · 0 comments

Comments

@kachick
Copy link
Owner

kachick commented Jul 6, 2023

Extracted from #221

CIでうまい事 Cachix とかいう外部のキャッシュサービスと連携でもさせないと毎回ビルドするのでCI/CDが大変重くなる。自分はまだうまい事連携出来てない

これまでは https://github.com/cachix/install-nix-action + https://github.com/cachix/cachix-action という組み合わせがデファクトだったという理解
この cachix とやらへ上がってると引っ張ってくるだけなので早いけど、無いものは自分で外部サービスにシークレット発行して設定して連携させないと毎度ビルドからやることになる。
かといって nix store を 全部 GitHub Actions にキャッシュするのは巨大になりがちだし、そもそも大半はキャッシュで済む筈だったりするとインポートしてエクスポートしてで同等以上の時間を食ったりする kachick/nixpkgs-url#5
価値が有るときですらその部分の処理で workflow の YAML が埋め尽くされて嫌だったんだけど、丁度いい感じにビルドの必要なものだけ GitHub 上にキャッシュしてくれるやつが出てきてとても便利
prefix とか無いので actions のリストが謎のキャッシュ名で埋まるのはちょっと嫌なんだけど、今のところメリットが大きくてデメリットが霞む

https://discourse.nixos.org/t/the-magic-nix-cache-a-github-action-for-speeding-up-your-nix-workflows/29665
https://github.com/DeterminateSystems/magic-nix-cache-action
https://github.com/DeterminateSystems/magic-nix-cache

kachick/eqq#120 (comment)

@kachick kachick closed this as completed Jul 6, 2023
@kachick kachick changed the title 2023-07-06 - 新しく出てきた Nix の GitHub Actions のお陰でキャッシュ効かせるのが楽になった 2023-07-06 - 新しく出てきた GitHub Actions のお陰で Nix のキャッシュ効かせるのが楽になった Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant