awalsh128 / cache-apt-pkgs-action

Cache APT packages in GitHub Actions
Other
205 stars 35 forks source link

tar: Cowardly refusing to create an empty archive #108

Open hsanzg opened 1 year ago

hsanzg commented 1 year ago

Hello!

I recently set up a workflow to install and cache some APT packages before testing my project. Unfortunately once I introduced the cache-apt-pkgs-action step, the action fails with the following message:

tar: Cowardly refusing to create an empty archive
Try 'tar --help' or 'tar --usage' for more information.
Error: Process completed with exit code 123.

This occurs during the package caching step.

This seems like a duplicate of #76, but I'm using the v1 tag of the action which supposedly includes the fix. Did I miss something?

sn-o-w commented 1 year ago

@hsanzg Can you try sn-o-w/cache-apt-pkgs-action@master in your workflow to see if there is any difference? 🤔

I think I have found what could be wrong, but I'm not 100% sure if working correctly.

hsanzg commented 1 year ago

Sorry for the late reply :stuck_out_tongue: Unfortunately the fork didn't work either; here's the change and here's the build log. Thanks for the help!

awalsh128 commented 9 months ago

Hi @sn-o-w, could you take a look at @hsanzg and see if you can help? Would appreciate it.

@hsanzg do you still have the build log? Looks like it expired.

hsanzg commented 8 months ago

Sure! I've triggered a rebuild using sn-o-w's fork; the logs are available at https://github.com/hsanzg/diag-scals/actions/runs/8217644520/job/22473569925 (archive). I don't think they will be that useful, however, because the only error indication is the rather cryptic message tar: Cowardly refusing to create an empty archive.

sn-o-w commented 8 months ago

Sure! I've triggered a rebuild using sn-o-w's fork; the logs are available at https://github.com/hsanzg/diag-scals/actions/runs/8217644520/job/22473569925 (archive). I don't think they will be that useful, however, because the only error indication is the rather cryptic message tar: Cowardly refusing to create an empty archive.

Try again, but use awalsh128/cache-apt-pkgs-action@master

I'll just delete my repo, anyway.

hsanzg commented 8 months ago

That did the trick! Thank you for your help :)

hsanzg commented 8 months ago

Sad to say that this was a false positive: I'm still getting the tar error message for packages intel-oneapi-mkl and intel-oneapi-mkl-devel (whereas it works fine for e.g. doxygen). While the initial build passes (log archive), subsequent builds that use files supposedly cached by this action fail (log archive) because some of these files cannot be found; in particular, the Intel MKL environment setup script outputs the message "WARNING: No env scripts found: No "env/vars.sh" scripts to process." (Note that this message does not show up on the successful, no-package-cache build.)