Re: [PATCH 7/7] gitlab: force ccache to validate compiler version

2024-12-04 Thread Philippe Mathieu-Daudé

On 4/12/24 20:48, Daniel P. Berrangé wrote:

By default ccache checks the compiler 'mtime' to determine if it should
invalidate the cache. On FreeBSD the 'mtime' reflects when the compiler
package was installed, rather than when it was built. IOW, on throwaway
CI VMs, the 'mtime' changes on every single job and is thus useless.

It could validate the compiler binary content, but validating the
compiler version string is less CPU intensive.

Reviewed-by: Daniel P. Berrangé 
---
  .gitlab-ci.d/cirrus/build.yml | 1 +
  1 file changed, 1 insertion(+)


Reviewed-by: Philippe Mathieu-Daudé 




[PATCH 7/7] gitlab: force ccache to validate compiler version

2024-12-04 Thread Daniel P . Berrangé
By default ccache checks the compiler 'mtime' to determine if it should
invalidate the cache. On FreeBSD the 'mtime' reflects when the compiler
package was installed, rather than when it was built. IOW, on throwaway
CI VMs, the 'mtime' changes on every single job and is thus useless.

It could validate the compiler binary content, but validating the
compiler version string is less CPU intensive.

Reviewed-by: Daniel P. Berrangé 
---
 .gitlab-ci.d/cirrus/build.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci.d/cirrus/build.yml b/.gitlab-ci.d/cirrus/build.yml
index 5c86278bf8..8268e9e547 100644
--- a/.gitlab-ci.d/cirrus/build.yml
+++ b/.gitlab-ci.d/cirrus/build.yml
@@ -34,6 +34,7 @@ build_task:
 - export CCACHE_BASEDIR="$(pwd)"
 - export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
 - export CCACHE_MAXSIZE="1000M"
+- export CCACHE_COMPILERCHECK="string:$(clang -v 2>&1)"
 - ccache --zero-stats
 - ccache --show-stats
 - mkdir build
-- 
2.46.0