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

GitHub Actions macOS jobs have different compiler mtime causing cache misses #146

Closed
janisozaur opened this issue May 5, 2023 · 5 comments

Comments

@janisozaur
Copy link
Contributor

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

compiler_check=content

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):

--- /Users/runner/work/OpenRCT2/OpenRCT2/bin/CMakeFiles/libopenrct2.dir/src/openrct2/audio/Audio.cpp.o.20230504_165306_358636.ccache-input-text
+++ /Users/runner/work/OpenRCT2/OpenRCT2/bin/CMakeFiles/libopenrct2.dir/src/openrct2/audio/Audio.cpp.o.20230504_155944_795167.ccache-input-text
@@ -4,7 +4,7 @@
 ii
 ### cc_mtime
 1358200
-1683219023536017184
+1683215729223801769
 ### cc_name
 c++
 ### LANG
--- /tmp/Audio.cpp.o.20230504_155944_795167.ccache-log	2023-05-05 09:44:03.322904770 +0200
+++ /tmp/Audio.cpp.o.20230504_165306_358636.ccache-log	2023-05-05 09:43:29.504179419 +0200
@@ -11,7 +11,7 @@
 Config: (default) compression_level = 0
 Config: (default) cpp_extension = 
 Config: (environment) debug = true
-Config: (environment) debug_dir = /Users/runner/work/OpenRCT2/OpenRCT2/ccache-debug-1-x64
+Config: (environment) debug_dir = /Users/runner/work/OpenRCT2/OpenRCT2/ccache-debug-2-x64
 Config: (default) depend_mode = false
 Config: (default) direct_mode = true
 Config: (default) disable = false
@@ -45,7 +45,7 @@
 Config: (default) temporary_dir = /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/tmp
 Config: (default) umask = 
 Command line: /usr/local/bin/ccache /usr/local/opt/ccache/libexec/c++ -DDOCDIR="/usr/share/doc/openrct2" -DOPENGL_NO_LINK -D__ENABLE_DISCORD__ -Dlibopenrct2_EXPORTS -I/Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/../thirdparty/duktape -I/Users/runner/work/OpenRCT2/OpenRCT2/libopenrct2 -isystem /Users/runner/work/OpenRCT2/OpenRCT2/lib/macos/include -isystem /Users/runner/work/OpenRCT2/OpenRCT2/lib/macos/lib/pkgconfig/../../include -isystem /Users/runner/work/OpenRCT2/OpenRCT2/lib/macos/lib/pkgconfig/../../include/libpng16 -isystem /Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/../thirdparty -fstrict-overflow -fstrict-aliasing -Werror -Wundef -Wmissing-declarations -Winit-self -Wall -Wextra -Wshadow -Wno-unknown-pragmas -Wno-missing-braces -Wno-comment -Wnonnull -Wno-unused-parameter -Wno-attributes -DDEBUG=0 -Wno-error=objc-method-access -O3 -DNDEBUG -std=gnu++17 -arch x86_64 -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -mmacosx-version-min=10.14 -fPIC -Wsuggest-override -Wnon-virtual-dtor -Wmissing-variable-declarations -Wmissing-field-initializers -Wunreachable-code-break -Wrange-loop-analysis -Wtautological-unsigned-zero-compare -Wold-style-cast -Wredundant-decls -Wnull-dereference -Wignored-qualifiers -Wstrict-overflow=1 -DENABLE_SCRIPTING -MD -MT CMakeFiles/libopenrct2.dir/src/openrct2/audio/Audio.cpp.o -MF CMakeFiles/libopenrct2.dir/src/openrct2/audio/Audio.cpp.o.d -o CMakeFiles/libopenrct2.dir/src/openrct2/audio/Audio.cpp.o -c /Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/audio/Audio.cpp
-Hostname: Mac-1683215512087.local
+Hostname: Mac-1683218974148.local
 Working directory: /Users/runner/work/OpenRCT2/OpenRCT2/bin
 Compiler: /usr/local/opt/ccache/libexec/c++
 Compiler type: other
@@ -56,10 +56,10 @@
 Inode cache file loaded: /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/tmp/inode-cache-64.v2
 Inode cache miss: /Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/audio/Audio.cpp
 Inode cache insert: /Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/audio/Audio.cpp
-Manifest key: 3672cnshjru37kso0fmbetubh62ah8r06
-No 3672cnshjru37kso0fmbetubh62ah8r06 in local storage
+Manifest key: e7e3gj5r41b2dg62suincf2763m13i1fi
+No e7e3gj5r41b2dg62suincf2763m13i1fi in local storage
 Running preprocessor
-Executing /usr/local/opt/ccache/libexec/c++ -fstrict-overflow -fstrict-aliasing -Wundef -Wmissing-declarations -Winit-self -Wall -Wextra -Wshadow -Wno-unknown-pragmas -Wno-missing-braces -Wno-comment -Wnonnull -Wno-unused-parameter -Wno-attributes -Wno-error=objc-method-access -O3 -std=gnu++17 -mmacosx-version-min=10.14 -fPIC -Wsuggest-override -Wnon-virtual-dtor -Wmissing-variable-declarations -Wmissing-field-initializers -Wunreachable-code-break -Wrange-loop-analysis -Wtautological-unsigned-zero-compare -Wold-style-cast -Wredundant-decls -Wnull-dereference -Wignored-qualifiers -Wstrict-overflow=1 -DDOCDIR="/usr/share/doc/openrct2" -DOPENGL_NO_LINK -D__ENABLE_DISCORD__ -Dlibopenrct2_EXPORTS -I/Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/../thirdparty/duktape -I/Users/runner/work/OpenRCT2/OpenRCT2/libopenrct2 -isystem /Users/runner/work/OpenRCT2/OpenRCT2/lib/macos/include -isystem /Users/runner/work/OpenRCT2/OpenRCT2/lib/macos/lib/pkgconfig/../../include -isystem /Users/runner/work/OpenRCT2/OpenRCT2/lib/macos/lib/pkgconfig/../../include/libpng16 -isystem /Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/../thirdparty -DDEBUG=0 -DNDEBUG -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -DENABLE_SCRIPTING -arch x86_64 -E -o /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/tmp/cpp_stdout.tmp.K2UcDZ.ii /Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/audio/Audio.cpp
+Executing /usr/local/opt/ccache/libexec/c++ -fstrict-overflow -fstrict-aliasing -Wundef -Wmissing-declarations -Winit-self -Wall -Wextra -Wshadow -Wno-unknown-pragmas -Wno-missing-braces -Wno-comment -Wnonnull -Wno-unused-parameter -Wno-attributes -Wno-error=objc-method-access -O3 -std=gnu++17 -mmacosx-version-min=10.14 -fPIC -Wsuggest-override -Wnon-virtual-dtor -Wmissing-variable-declarations -Wmissing-field-initializers -Wunreachable-code-break -Wrange-loop-analysis -Wtautological-unsigned-zero-compare -Wold-style-cast -Wredundant-decls -Wnull-dereference -Wignored-qualifiers -Wstrict-overflow=1 -DDOCDIR="/usr/share/doc/openrct2" -DOPENGL_NO_LINK -D__ENABLE_DISCORD__ -Dlibopenrct2_EXPORTS -I/Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/../thirdparty/duktape -I/Users/runner/work/OpenRCT2/OpenRCT2/libopenrct2 -isystem /Users/runner/work/OpenRCT2/OpenRCT2/lib/macos/include -isystem /Users/runner/work/OpenRCT2/OpenRCT2/lib/macos/lib/pkgconfig/../../include -isystem /Users/runner/work/OpenRCT2/OpenRCT2/lib/macos/lib/pkgconfig/../../include/libpng16 -isystem /Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/../thirdparty -DDEBUG=0 -DNDEBUG -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -DENABLE_SCRIPTING -arch x86_64 -E -o /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/tmp/cpp_stdout.tmp.OCtnhP.ii /Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/audio/Audio.cpp
 Inode cache hit: /Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/audio/audio.h
 Inode cache hit: /Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/Identifiers.h
 Inode cache hit: /Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/common.h
@@ -603,46 +603,46 @@
 Inode cache hit: /Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/audio/AudioChannel.h
 Inode cache hit: /Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/audio/AudioContext.h
 Got result key from preprocessor with -arch x86_64
-Result key: 587f85tskge212c97lkvpq9350df0jacs
-No 587f85tskge212c97lkvpq9350df0jacs in local storage
+Result key: 645dh8t6qb42429iptb7sdenak12684eu
+No 645dh8t6qb42429iptb7sdenak12684eu in local storage
 Running real compiler
 Executing /usr/local/opt/ccache/libexec/c++ -fstrict-overflow -fstrict-aliasing -Wundef -Wmissing-declarations -Winit-self -Wall -Wextra -Wshadow -Wno-unknown-pragmas -Wno-missing-braces -Wno-comment -Wnonnull -Wno-unused-parameter -Wno-attributes -Wno-error=objc-method-access -O3 -std=gnu++17 -mmacosx-version-min=10.14 -fPIC -Wsuggest-override -Wnon-virtual-dtor -Wmissing-variable-declarations -Wmissing-field-initializers -Wunreachable-code-break -Wrange-loop-analysis -Wtautological-unsigned-zero-compare -Wold-style-cast -Wredundant-decls -Wnull-dereference -Wignored-qualifiers -Wstrict-overflow=1 -Werror -DDOCDIR="/usr/share/doc/openrct2" -DOPENGL_NO_LINK -D__ENABLE_DISCORD__ -Dlibopenrct2_EXPORTS -I/Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/../thirdparty/duktape -I/Users/runner/work/OpenRCT2/OpenRCT2/libopenrct2 -isystem /Users/runner/work/OpenRCT2/OpenRCT2/lib/macos/include -isystem /Users/runner/work/OpenRCT2/OpenRCT2/lib/macos/lib/pkgconfig/../../include -isystem /Users/runner/work/OpenRCT2/OpenRCT2/lib/macos/lib/pkgconfig/../../include/libpng16 -isystem /Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/../thirdparty -DDEBUG=0 -DNDEBUG -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -DENABLE_SCRIPTING -c -arch x86_64 -MD -MT CMakeFiles/libopenrct2.dir/src/openrct2/audio/Audio.cpp.o -MF CMakeFiles/libopenrct2.dir/src/openrct2/audio/Audio.cpp.o.d -o CMakeFiles/libopenrct2.dir/src/openrct2/audio/Audio.cpp.o /Users/runner/work/OpenRCT2/OpenRCT2/src/openrct2/audio/Audio.cpp
 Base dir not set, skip using relative paths
 Using default compression level 1
 Storing embedded entry #0 .o (28272 bytes) from CMakeFiles/libopenrct2.dir/src/openrct2/audio/Audio.cpp.o
 Storing embedded entry #1 .d (78050 bytes) from CMakeFiles/libopenrct2.dir/src/openrct2/audio/Audio.cpp.o.d
-Acquiring /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_58.lock
-Acquired /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_58.lock
-Creating /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_58.alive
-Stored 587f85tskge212c97lkvpq9350df0jacs in local storage (/Users/runner/work/OpenRCT2/OpenRCT2/.ccache/5/8/7f85tskge212c97lkvpq9350df0jacsR)
-Acquiring /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/5/stats.lock
-Acquired /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/5/stats.lock
-Creating /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/5/stats.alive
-Releasing /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/5/stats.lock
-Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/5/stats.alive
-Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/5/stats.lock
-Released /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/5/stats.lock
-Releasing /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_58.lock
-Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_58.alive
-Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_58.lock
-Released /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_58.lock
-Added result key to manifest 3672cnshjru37kso0fmbetubh62ah8r06
+Acquiring /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_64.lock
+Acquired /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_64.lock
+Creating /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_64.alive
+Stored 645dh8t6qb42429iptb7sdenak12684eu in local storage (/Users/runner/work/OpenRCT2/OpenRCT2/.ccache/6/4/5dh8t6qb42429iptb7sdenak12684euR)
+Acquiring /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/6/stats.lock
+Acquired /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/6/stats.lock
+Creating /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/6/stats.alive
+Releasing /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/6/stats.lock
+Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/6/stats.alive
+Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/6/stats.lock
+Released /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/6/stats.lock
+Releasing /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_64.lock
+Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_64.alive
+Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_64.lock
+Released /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_64.lock
+Added result key to manifest e7e3gj5r41b2dg62suincf2763m13i1fi
 Using default compression level 1
-Acquiring /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_36.lock
-Acquired /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_36.lock
-Creating /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_36.alive
-Stored 3672cnshjru37kso0fmbetubh62ah8r06 in local storage (/Users/runner/work/OpenRCT2/OpenRCT2/.ccache/3/6/72cnshjru37kso0fmbetubh62ah8r06M)
-Acquiring /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/3/stats.lock
-Acquired /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/3/stats.lock
-Creating /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/3/stats.alive
-Releasing /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/3/stats.lock
-Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/3/stats.alive
-Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/3/stats.lock
-Released /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/3/stats.lock
-Releasing /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_36.lock
-Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_36.alive
-Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_36.lock
-Released /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_36.lock
+Acquiring /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_e7.lock
+Acquired /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_e7.lock
+Creating /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_e7.alive
+Stored e7e3gj5r41b2dg62suincf2763m13i1fi in local storage (/Users/runner/work/OpenRCT2/OpenRCT2/.ccache/e/7/e3gj5r41b2dg62suincf2763m13i1fiM)
+Acquiring /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/e/stats.lock
+Acquired /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/e/stats.lock
+Creating /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/e/stats.alive
+Releasing /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/e/stats.lock
+Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/e/stats.alive
+Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/e/stats.lock
+Released /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/e/stats.lock
+Releasing /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_e7.lock
+Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_e7.alive
+Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_e7.lock
+Released /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/subdir_e7.lock
 Result: cache_miss
 Result: direct_cache_miss
 Result: local_storage_miss
@@ -651,17 +651,17 @@
 Result: local_storage_write
 Result: local_storage_write
 Result: preprocessed_cache_miss
-Acquiring /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/e/9/stats.lock
-Acquired /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/e/9/stats.lock
-Creating /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/e/9/stats.alive
-Releasing /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/e/9/stats.lock
-Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/e/9/stats.alive
-Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/e/9/stats.lock
-Released /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/e/9/stats.lock
+Acquiring /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/1/d/stats.lock
+Acquired /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/1/d/stats.lock
+Creating /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/1/d/stats.alive
+Releasing /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/1/d/stats.lock
+Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/1/d/stats.alive
+Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/1/d/stats.lock
+Released /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/1/d/stats.lock
 Trying to acquire /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/auto_cleanup.lock
 Acquired /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/auto_cleanup.lock
 Creating /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/auto_cleanup.alive
-No automatic cleanup needed (size 36.4 MB, files 1498, max size 500.0 MB)
+No automatic cleanup needed (size 67.7 MB, files 2734, max size 500.0 MB)
 Releasing /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/auto_cleanup.lock
 Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/auto_cleanup.alive
 Unlink /Users/runner/work/OpenRCT2/OpenRCT2/.ccache/lock/auto_cleanup.lock

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

janisozaur added a commit to janisozaur/ccache-action that referenced this issue May 5, 2023
This addresses issue where GitHub actions runners report different mtime for compiler causing incorrect cache misses
janisozaur added a commit to janisozaur/ccache-action that referenced this issue May 5, 2023
…darwin

This addresses issue where GitHub actions runners report different mtime for compiler causing incorrect cache misses
janisozaur added a commit to janisozaur/ccache-action that referenced this issue May 5, 2023
…darwin

This addresses issue where GitHub actions runners report different mtime for compiler causing incorrect cache misses
janisozaur added a commit to OpenRCT2/OpenRCT2 that referenced this issue May 6, 2023
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
@makslevental
Copy link

@janisozaur god bless you for figuring this out.

@hendrikmuhs
Copy link
Owner

Sorry for the late reply.

This sounds to me like an issue of homebrew. For verification can someone with a mac try the following:

  • install ccache using homebrew
  • check the mtime of the installed ccache binary (ls -l)
  • uninstall ccache and install it again
  • check if the mtime has changed

@makslevental
Copy link

makslevental commented Sep 7, 2023

@hendrikmuhs

(base) mlevental@maksims-MacBook-Pro mlir-python-utils-main % ls -lL $(which ccache)
-rwxr-xr-x  1 mlevental  admin  1264576 Aug 29 14:41 /opt/homebrew/bin/ccache
(base) mlevental@maksims-MacBook-Pro mlir-python-utils-main % brew uninstall ccache
Uninstalling /opt/homebrew/Cellar/ccache/4.8.3... (78 files, 1.3MB)
(base) mlevental@maksims-MacBook-Pro mlir-python-utils-main % brew cleanup --prune=1 -s   
<LOTS OF THINGS REMOVED>
==> This operation has freed approximately 1.5GB of disk space.
(base) mlevental@maksims-MacBook-Pro mlir-python-utils-main % brew install ccache      
==> Downloading https://formulae.brew.sh/api/formula.jws.json
##O=- #     #                                                                                                                                                                                                   
==> Downloading https://ghcr.io/v2/homebrew/core/ccache/manifests/4.8.3
(base) mlevental@maksims-MacBook-Pro mlir-python-utils-main % ls -lL $(which ccache)   
-rwxr-xr-x  1 mlevental  admin  1264576 Aug 29 14:41 /opt/homebrew/bin/ccache

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 cibuildwheel took ~30 minutes instead of 3 hours) but in a following run, with the same initial conditions, some of the mac jobs didn't hit and some did. Note, I'm not expecting you to dig into my CI, just stating anecdote. And I'm not a ccache expert so maybe there's something else subtly changing betweens my builds but my linux runners consistently hit (with appropriate initial conditions).

@hendrikmuhs
Copy link
Owner

Thanks @makslevental!

Actually I was still in vacation mode, it is the compiler's mtime that for some reason mismatches, not the one from the ccache binary.

Anyway, I think we should merge the fix. For later it would be nice if the setting can be overwritten in the action.

@makslevental
Copy link

Thanks @makslevental!

Actually I was still in vacation mode, it is the compiler's mtime that for some reason mismatches, not the one from the ccache binary.

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

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

3 participants