-
Notifications
You must be signed in to change notification settings - Fork 53
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
"Not saving cache because no objects are cached" on Windows workflow #112
Comments
Your cmake command looks correct though |
I think it would be good to have cmake example in the tests. If you figure out the problem feel free to submit a PR to test cmake :) |
I don't have the background to investigate and make fixes in the code unfortunately, but I did find what could be a possible cause. Without setting MSVC, the ccache action works (but of course, MSVC is not set). The action I use to set MSVC is ilammy/msvc-dev-cmd, which is the most used for this scenario. I see that ccache supports MSVC and should also this action, am I right? |
Could it be that cmake skips the compiler launcher for MSVC? |
Ccache recently gained Windows support so maybe your version doesn’t support it yet. |
It seems that the ccache version that default workflows use is 4.3 (which seems that does not support msvc). |
Update: |
I also encountered this issue, even with updating ccache to 4.7.1 I got "Not saving cache because no objects are cached" I used CMake 3.25.0-rc1 locally while the runner used 3.24.2 per the runner readme Maybe one of those differences is responsible, maybe try updating Ninja like you did with ccache? |
Thanks @TheLastRar!! |
I've updated ccache for windows to 4.7.2 and created a new release. Let me know if that helps. |
@hendrikmuhs it seems that it is not working :( |
Thanks @alemuntoni, it looks like your CI image has a conflicting ccache which is taken instead of the one provided by this action. When @jonashaag added ccache for windows, the version was 4.6 afair. From your logs: Chocolatey originates from the github image: https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md Unfortunately it is in the
You can try to fix your PATH. For this action it would be nice if we can use full qualified paths and detect and warn if such a conflict appears. Nice debugging! I wonder if we could somehow integrate your test project into this repo. |
Why providing a different version of ccache? Wouldn't be possible to use (and update with choco) the one that is already provided by the github image? Could be the action Feel free to use any of the code in my test action if it is useful to setup a proper test. I don't actually know how actions work internally, therefore I am not the most suitable person to make a PR :) |
I didn't know choco has its own and I don't know if it is meant to be used or if it is an internal tool for choco(does anyone know?). The decision to ship it with the github image is a decision of the github development team, they might change their mind. Not every project uses choco. So long story short, I don't think we should re-use it and apart from that we do not have control over the version. It seems the version isn't usable for us anyway. I therefore think that "fixing the Option 3 would be renaming the binary, but this has a lot of disadvantages, e.g. w.r.t. platform compatibility, so it isn't an option IMO. Note that I am not developing on windows at the moment, so I don't have the necessary setup to play with. At best I can take your demo-environment as playground. It would be better if someone with a stronger interest and more knowledge about tooling on windows has a look. I happily take and merge PR's. |
Needs some newer version of ccache and/or ninja, see hendrikmuhs/ccache-action#112
This problem also occurs, when ccache is called and works properly. This example has 269 cached objects, consuming 17.2 MiB, but the action doesn't archive them.
|
So what should we do if I want msvc+debug+ninja+ccache in window server 2022 in github workflow runner. I can compile in this way , bug at the end of CI, it tell me no objects are cached. |
Hopefully Github can upgrade their |
This issue still affects me when compiling with MSYS2 and MinGW. |
Hi all, so I stumbled onto this issue trying to get MSVC/CL working with this CCACHE action on
But for Debug builds, it refused to cache anything:
The cmake builds are identical other than specifying debug vs release. The job insures that both ccache and ninja are the latest, of the above run the versions are:
In case this is helpful, the debug configuration is as follows:
Any ideas or suggestions on what could be the problem? |
@Naros in my case the debug information format was making the compilation calls uncacheable. In recent cmake version you can try setting In slightly older version you would need:
|
Hi @pwiecz I tried both solutions and neither seemed to work for debug builds. |
@Naros I guess you'll have to try to determine why the compilations were uncacheable in your case by increasing verbosity and looking into ccache logs. Unfortunately, I cannot recall right now how exactly I was debugging my own case... :( |
I am getting the message
Not saving cache because no objects are cached.
on windows workflows.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?
--
As @hendrikmuhs pointed on my original question on #55, ccache isn't called on my workflow:
Could the issue be in my cmake call?
https://github.com/alemuntoni/ccache-hello-world/blob/e1f7a57576d028167218ae406ae0b04cbb881935/.github/workflows/Windows.yml#L23-L24
The text was updated successfully, but these errors were encountered: