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

No cache saved on Windows? #55

Closed
SimonHeybrock opened this issue Mar 24, 2022 · 11 comments
Closed

No cache saved on Windows? #55

SimonHeybrock opened this issue Mar 24, 2022 · 11 comments

Comments

@SimonHeybrock
Copy link

Having trouble with ccache on Windows (thanks for adding support!). My cache is empty for now, so no hits are reported. But there does appear to be something in the cache (and my cmake found ccache): Cache size (GB): 0.09 / 0.50 (18.79 %). Yet, nothing is uploaded.

This is the output I get:

+ ccache -s -v
Summary:
  Cache directory:  D:\a\scipp\scipp\.ccache
  Primary config:   C:\Users\runneradmin/ccache/ccache.conf
  Secondary config: /usr/local/etc/ccache.conf
  Stats updated:    03/24/22 09:39:15
  Hits:                0 /  395 (0.00 %)
    Direct:            0 /  395 (0.00 %)
    Preprocessed:      0 /  395 (0.00 %)
  Misses:            395
    Direct:          395
    Preprocessed:    395
Primary storage:
  Hits:                0 /  790 (0.00 %)
  Misses:            790
  Cache size (GB):  0.09 / 0.50 (18.79 %)
  Files:             790
Not saving cache because no objects are cached.
@hendrikmuhs
Copy link
Owner

@jonashaag can you have a look?

@jonashaag
Copy link
Contributor

@SimonHeybrock can you please share a link to an action run?

@SimonHeybrock
Copy link
Author

@jonashaag
Copy link
Contributor

btw @SimonHeybrock you might want to try https://github.com/mamba-org/provision-with-micromamba with cache-env: true to remove that slow Conda env setup :)

@jonashaag
Copy link
Contributor

Found it, bad regex /Files:.+0/, I wanted to match Files: 0 but it also matches something like Files: 350 🤦

jonashaag added a commit to jonashaag/ccache-action that referenced this issue Mar 24, 2022
@jonashaag
Copy link
Contributor

Added a fix here #54

@hendrikmuhs
Copy link
Owner

@jonashaag #54 is still marked as draft. By accident or intentional? I like to either split out the fix or get #54 ready to go.

@alemuntoni
Copy link

Hello, I am still having this issue: Not saving cache because no objects are cached. on windows.
I just made a small repo example to reproduce it: https://github.com/alemuntoni/ccache-hello-world)

here the workflow file and here the workflow run.

You can see that I made also similar workflows for linux and macos, which work fine.

Am I doing something wrong?

@jonashaag
Copy link
Contributor

Did you check if some of the other windows related bug reports in this repo apply to your use case?

@hendrikmuhs
Copy link
Owner

The important info from your run:

  C:\ProgramData\Chocolatey\bin\ccache.exe -s
  cache directory                     C:\Users\runneradmin\AppData\Roaming/ccache
  primary config                      C:\Users\runneradmin\AppData\Roaming/ccache/ccache.conf
  secondary config (readonly)         R:/winlibs64_stage/inst_ccache-4.3/etc/ccache.conf
  cache hit (direct)                     0
  cache hit (preprocessed)               0
  cache miss                             0
  cache hit rate                      0.00 %
  cleanups performed                     0
  files in cache                         0
  cache size                           0.0 kB
  max cache size                       5.0 GB

Ccache isn't called, you should have at least 1 cache miss.

FWIW, a closed issue isn't the proper place to discuss your problem, IMO it is different to the one of the original thread opener. Either create a new issue or open a thread under discussions.

@alemuntoni
Copy link

Ok, I wrote here since it seemed to be the same problem (or similar, at least). I'll open a new issue!

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

No branches or pull requests

4 participants