Skip to content

Caches for macos-15-intel and macOS-latest collide #1035

@Bisaloo

Description

@Bisaloo

When trying to run checks on both Intel and Apple Silicon macOS, I get errors because packages are not compiled on the correct architecture.

This seems to come from the fact that a single cache named macOS Sequoia 15.7.2-R version 4.6.0 (ge:17; iid:2fdf6c18-697a-4ba7-b8ef-11c0d92f1327)-1-82bdd66141639e34448b2ca5cf0fc62c31a89eed9ec9a0fdd6754d4a329dbffc is created and used in both workflows.

Indeed, there doesn't seem to be anything that differentiate these two runners in the cache key defined by r-lib/actions/setup-r-dependencies:

key: ${{ format('{0}-{1}-{2}-{3}', steps.install.outputs.os-version, steps.install.outputs.r-version, inputs.cache-version, hashFiles(format('{0}/.github/pkg.lock', inputs.working-directory ))) }}

Would it be possible to let users add a custom extra value to include in the key for example?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions