Nishant Bansal
Nishant Bansal

Reputation: 21

Why isn’t my cross-OS cache shared when using enableCrossOsArchive: true in GitHub Actions?

I'm attempting to share a cache between workflows running on macOS-14 and Ubuntu-22.04 using GitHub Actions. According to the GitHub Actions cache documentation, setting enableCrossOsArchive to true should allow the cache to be used across different operating systems. However, I'm finding that each OS creates its own separate cache.

My workflow snippet looks like this:

      - name: Cache GRASS Sample Dataset
        id: cached-data
        uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
        with:
          path: sample-data/nc_spm_full_v2alpha2.tar.gz
          key: nc_spm_full_v2alpha2.tar.gz
          enableCrossOsArchive: true

My questions are:

  1. Are there any additional conditions or configurations required to share caches across different OSes using enableCrossOsArchive?
  2. Could there be any known issues or limitations that might cause the cache to be separated per OS despite this setting?
  3. Has anyone successfully used cross-OS caching with this setup, and if so, what did you do differently?
  4. Is the caching method implemented differently on macOS and Ubuntu, which might be causing this issue?

Any insights or guidance would be greatly appreciated!

Upvotes: 0

Views: 38

Answers (0)

Related Questions