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

ci: update Nix installation and caching #308

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

YusukeShimizu
Copy link
Contributor

@YusukeShimizu YusukeShimizu commented Sep 6, 2024

Introduces caching of the Nix store using nix-community/cache-nix-action to avoide rate limit errors and speed up subsequent CI runs.

The GitHub API rate limit was exceeded, resulting in a CI process that used to take about 30 minutes being shortened to about 5 minutes.

@YusukeShimizu YusukeShimizu force-pushed the ci-workflow-updates branch 4 times, most recently from 185863e to 3894af7 Compare September 6, 2024 08:06
Replaces the cachix/install-nix-action with the more
up-to-date nixbuild/nix-quick-install-action.
Additionally, it introduces caching of the
Nix store using nix-community/cache-nix-action
to avoide rate limit errors and speed up subsequent CI runs.

Configured cache restoration and garbage collection.
Added necessary Nix configuration to flake.nix for caching.
@YusukeShimizu YusukeShimizu marked this pull request as ready for review September 7, 2024 02:32
@grubles
Copy link
Collaborator

grubles commented Sep 9, 2024

Logs from https://github.com/ElementsProject/peerswap/actions/runs/10747587757/job/29810210862?pr=308:

Restoring a cache with the key "nix-Linux-5c8a7f8e191cbd7ffb1f785488ebdd34241da7e08b04c84a5ad22ad6cc307a5d".
Logs produced while restoring a cache.
  Received 197132288 of 2553320403 (7.7%), 187.8 MBs/sec
  Received 415236096 of 2553320403 (16.3%), 197.9 MBs/sec
  Received 629145600 of 2553320403 (24.6%), 199.9 MBs/sec
  Received 859832320 of 2553320403 (33.7%), 204.9 MBs/sec
  Received 1073741824 of 2553320403 (42.1%), 204.8 MBs/sec
  Received 1304428544 of 2553320403 (51.1%), 207.3 MBs/sec
  Received 1522532352 of 2553320403 (59.6%), 207.4 MBs/sec
  Received 1686110208 of 2553320403 (66.0%), 200.9 MBs/sec
  Received 1795162112 of 2553320403 (70.3%), 190.2 MBs/sec
  Received 2004877312 of 2553320403 (78.5%), 191.1 MBs/sec
  Received 2227175424 of 2553320403 (87.2%), 193.0 MBs/sec
  Received 2399141888 of 2553320403 (94.0%), 190.6 MBs/sec
  Received 2550136832 of 2553320403 (99.9%), 187.0 MBs/sec
  Cache Size: ~2435 MB (2553320403 B)
  /usr/bin/tar -xf /home/runner/work/_temp/0f2a4ef6-700c-40e6-ac1d-f0fc829cfa31/cache.tzst -P -C /home/runner/work/peerswap/peerswap --exclude-from /home/runner/work/_temp/d831f157-879f-4c6d-a90b-0024ebb763c1/nix-store-paths --use-compress-program unzstd
  Received 2553320403 of 2553320403 (100.0%), 173.9 MBs/sec
  Cache restored successfully

Looks good to me. ACK e304f66.

@grubles grubles merged commit 698e88f into ElementsProject:master Sep 9, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants