Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

ci: add cachix-action#319

Merged
mhanberg merged 5 commits intoelixir-tools:mainfrom
akirak:cachix-action
Nov 2, 2023
Merged

ci: add cachix-action#319
mhanberg merged 5 commits intoelixir-tools:mainfrom
akirak:cachix-action

Conversation

@akirak
Copy link
Copy Markdown
Contributor

@akirak akirak commented Nov 1, 2023

This PR is a follow up to #312 and is intended to:

  • Save time on CI
  • Make the binaries immediately available to Nix users

by pushing newly built Nix assets to your cachix account.

As extra steps, you will have to:

steps:
- uses: actions/checkout@v2
- uses: nixbuild/nix-quick-install-action@v26
- uses: cachix/cachix-action@v12
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should probably happen in the release workflow, so that it only caches new releases

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so that nix users are only getting stable releases, not a canary/nightly build, and I think this would also cache binaries for pull requests? I guess i'm not entirely sure how the cache works

Copy link
Copy Markdown
Contributor Author

@akirak akirak Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cachix offers a decent amount of storage space for free (10 GiB at present), but if you want that level of control, it may be a good idea to use magit-nix-cache-action for CI.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate on how this saves us CI time? we are using setup-beam for the elixir/erlang installation and already cache mix dependencies

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would save time on nix-build CI job I added in the previous PR. It's unnecessary if you don't intend to provide Nix packages from the flake. You are not using Nix to build the release assets, so the action would never accelerate your main workflow. Fro Nix, the action caches the Nix store, which saves time spent on rebuilding rebar3 with the latest Erlang every time.

@mhanberg mhanberg changed the title Add cachix-action ci: add cachix-action Nov 2, 2023
@mhanberg mhanberg force-pushed the cachix-action branch 2 times, most recently from e01aed9 to 47a5547 Compare November 2, 2023 03:05
@mhanberg mhanberg enabled auto-merge (squash) November 2, 2023 03:31
@mhanberg mhanberg disabled auto-merge November 2, 2023 03:33
@mhanberg mhanberg merged commit 3e0e14f into elixir-tools:main Nov 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants