cache: putting different tar binary in $PATH before system tar breaks cache restore

No matter what I do, cache hits are not occurring on https://github.com/mixxxdj/vcpkg . For example: https://github.com/mixxxdj/vcpkg/actions/runs/544379263 Cache hits used to occur on this repo a week or two ago. I don’t know why this broke.

The workflow file is fine. I have verified by pushing the same commit to my fork then rerunning the job. A cache hit occurred as expected: https://github.com/Be-ing/vcpkg/runs/1848167161

Here is the cache step from the workflow file:

    - name: Set up cache
      uses: actions/cache@v2
      with:
        path: ${{ matrix.vcpkg_path }}/installed
        key: vcpkg-installed-${{ matrix.vcpkg_triplet }}-${{ github.ref }}-${{ github.run_number }}
        restore-keys: |
          vcpkg-installed-${{ matrix.vcpkg_triplet }}-${{ github.ref }}
          vcpkg-installed-${{ matrix.vcpkg_triplet }}

I cannot simply use a different repo because the production repo has access to secrets required for uploading the build artifact to a server. This is very frustrating because these builds take 4 hours!

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (5 by maintainers)

Commits related to this issue

Most upvoted comments

👍 Yeah, this is something I want to fix…basically…we should save the tar version during the restore step so changes to the PATH don’t impact this action.