-
Notifications
You must be signed in to change notification settings - Fork 58
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
GitHub Actions macOS jobs have different compiler mtime causing cache misses #146
Comments
This addresses issue where GitHub actions runners report different mtime for compiler causing incorrect cache misses
…darwin This addresses issue where GitHub actions runners report different mtime for compiler causing incorrect cache misses
…darwin This addresses issue where GitHub actions runners report different mtime for compiler causing incorrect cache misses
The mtime is volatile in macOS jobs, causing cache misses. As compiler binary is the same, use compiler's binary hash instead of its mtime. See hendrikmuhs/ccache-action#146 When upstream action is updated, this can be adapted
@janisozaur god bless you for figuring this out. |
Sorry for the late reply. This sounds to me like an issue of homebrew. For verification can someone with a mac try the following:
|
I'll say that @janisozaur's solution does work for me but in a hit-or-miss fashion; e.g., you can see here that all the mac builds had high hit rates (because |
Thanks @makslevental! Actually I was still in vacation mode, it is the compiler's Anyway, I think we should merge the fix. For later it would be nice if the setting can be overwritten in the action. |
I must sorely need a vacation because I fully understood the patch and still followed your vacation mode instructions like a 🤖. Lol |
When executing jobs on macOS, compiler's mtime is different on different workers (or even for individual jobs?), causing cache misses as it is one of elements for key calculation.
The compiler size and contents are actually the same, so ccache can still be effective in those cases, but requires setting
I have verified this to be correct with ccache debugging enabled. Additionally, I have verified setting the option mentioned above made ccache hit all the TUs.
Below is diff from two builds without changing sources (formatted to remove timestamps):
And the logs themselves (only from one run)
Audio.cpp.o.20230504_155944_795167.ccache-input-text.txt
Audio.cpp.o.20230504_155944_795167.ccache-log.txt
The text was updated successfully, but these errors were encountered: