Skip to content

ci: nix action spends 13+ minutes uploading caches #1460

@demosdemon

Description

@demosdemon

The ffi-nix workflow has the following timing on the main branch:

  • 2s - Core GitHub action setup
  • 1s - git checkout
  • 9s - cache restore for nix-installer-action
  • 5s - cache restore for magic-nix-cache-action
  • 2m58s - restore nix environment
  • 2m6s - build and execute tests
  • 13m22s - cache upload for magic-nix-cache-action
  • 2s - cache upload for nix-installer-action

On a pull request with a fresh cache:

  • 2s - Core GitHub action setup
  • 1s - git checkout
  • 10s - cache restore for nix-installer-action
  • 5s - cache restore for magic-nix-cache-action
  • 5m11s - restore nix environment
  • 2m12s - build and execute tests
  • 13m51s - cache upload for magic-nix-cache-action
  • 1s - cache upload for nix-installer-action

The core steps of the ffi-nix workflow executes between 4 and 8 minutes; however, caching adds an overhead of nearly 14 minutes which is too much.

Recommendations

  • disable caching for pull requests and measure timing impact. if the job completes in less than 20 minutes without caching enabled, it is a win
  • disable caching altogether; only caching on main doesn't really provide us an value if uploading the cache still takes longer than downloading the items from non-cached sources.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions