Skip to content

Caching throws an error on windows GitHub Actions runners #7

@lopopolo

Description

@lopopolo

Hi! Thanks for this GitHub Action. I'd like to use it in a build matrix that tests on Windows, macOS, and Linux. Things work great on macOS and Linux, but Windows fails to create a cache artifact.

GNU tar throws the following error on Windows:

Post job cleanup.
Saving paths:
    C:\Users\runneradmin\.cargo\registry\index
    C:\Users\runneradmin\.cargo\registry\cache
    C:\Users\runneradmin\.cargo\git
    target
Using key "v0-rust-v2-build-1.49.0-x86_64-pc-windows-msvc-e1884a8e3c3e-bb9536f437cb47ed7a45".
C:\msys64\usr\bin\tar.exe --posix --use-compress-program "zstd -T0" -cf cache.tzst -P -C D:/a/artichoke/artichoke --files-from manifest.txt --force-local
/usr/bin/tar: C\:\\Users\runneradmin\\.cargo\registry\\index: Cannot stat: No such file or directory
/usr/bin/tar: C\:\\Users\runneradmin\\.cargo\registry\\cache: Cannot stat: No such file or directory
/usr/bin/tar: Exiting with failure status due to previous errors
Warning:  Tar failed with error: The process 'C:\msys64\usr\bin\tar.exe' failed with exit code 2

Example run: https://github.com/artichoke/artichoke/runs/1666497488?check_suite_focus=true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions