julia-actions / cache

A shortcut action to cache Julia artifacts, packages, and registries.
MIT License
38 stars 9 forks source link

Extend the action to packages and registry #2

Closed giordano closed 2 years ago

giordano commented 2 years ago

In some cases it may be beneficial to cache also packages (.julia/packages) and/or the registry (.julia/registries), not just artifacts. For example I cache the registry in Measurements.jl, and today I enabled caching of packages in CI for the General registry. Note that this would affect also the name of the repository/action.

Maybe we can have options to enable cachin of artifacts, packages and registy, with artifacts being the only one enabled by default?

rikhuijzer commented 2 years ago

Thanks for providing some extra details. Clear now. I'll add it to #1.

rikhuijzer commented 2 years ago

In the PR you advise against always caching the registry, especially on Windows. What would be your advice? If it is only Windows, then maybe we can enable all caching by default and disable caching the registry for Windows by default?

Or would you advice having inputs as follows:

inputs:
  cache-artifacts:
    description: 'Whether to cache artifacts'
    default: 'true'
  cache-packages:
    description: 'Whether to cache packages'
    default: 'true'
  cache-registry:
    description: 'Whether to cache the registry'
    default: 'false'
SaschaMann commented 2 years ago

Note that this would affect also the name of the repository/action.

According to a GH code search, Rik is the only one using it so far, so I think we can still rename it to julia-actions/cache or so.