Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tar issues on Windows and macOS #24

Closed
agilgur5 opened this issue Mar 19, 2020 · 4 comments · Fixed by #37
Closed

tar issues on Windows and macOS #24

agilgur5 opened this issue Mar 19, 2020 · 4 comments · Fixed by #37
Labels

Comments

@agilgur5
Copy link
Contributor

agilgur5 commented Mar 19, 2020

Hey, thanks for making this to simplify the cache config for GitHub Actions!

I'm trying to add this to TSDX to try to speed up our CI in jaredpalmer/tsdx#625, but we run a test matrix including Windows and macOS, and we're getting tar usage errors there that make caching not possible on those platforms 😕

On Windows, getting: tar.exe: Option --force-local is not supported
Run link: https://github.com/jaredpalmer/tsdx/pull/625/checks?check_run_id=518042349

On macOS, getting: tar: could not chdir to '/Users/runner/.cache/yarn'
Run link: https://github.com/jaredpalmer/tsdx/pull/625/checks?check_run_id=518042358

@robhogan
Copy link

The default yarn cache directory on mac is ~/Library/Caches/Yarn/v6 where I guess the v6 is subject to change as yarn changes its cache format.

The more robust way of getting the cache directory would be capturing the yarn cache dir command IMO

@agilgur5
Copy link
Contributor Author

agilgur5 commented Mar 25, 2020

The Windows issue seems to be coming upstream, from @bahmutov's fork/PR here: cypress-io/github-actions-cache#1 .
And that's a fork itself of actions/cache, which is a good bit farther ahead and seems to have changed its tar handling since: https://github.com/actions/cache/blob/eb78578266b7cec649ab65b6f1534bd6040c838b/src/tar.ts

@jbutko
Copy link
Contributor

jbutko commented Jun 10, 2020

Guys I am having similar issues connected to tar package. We are running self hosted github runner on centos system and getting following error on npm-install step:

...
Done in 137.40s.
saving NPM modules
saving cache path /github/home/.cache/yarn
primary key yarn-linux-x64-b75325c5e3d5913e300f71336d0d028301415e1b3b7900753bdd32ac9e33aec675889d086fe584667a18c5cf2f9cde593e31d3a8956f2337aa7fb2b421f46c06
/bin/tar -cz -f /__w/_temp/f9a72186-8d80-49c3-a133-e7237405b2b8/cache.tgz -C /github/home/.cache/yarn .
/bin/tar: /github/home/.cache/yarn: Cannot open: No such file or directory
/bin/tar: Error is not recoverable: exiting now
##[warning]The process '/bin/tar' failed with exit code 2
all done, exiting

Anybody can help with this? Or @bahmutov ?
Edit: we are using cypress/included:4.8.0 as base container.

@github-actions
Copy link

🎉 This issue has been resolved in version 1.4.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants