From 02f596b4e89c919807776111e2d55a43fb21e7f6 Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Fri, 19 Sep 2025 02:29:26 +0200 Subject: [PATCH] ci: Limit use of Ccache option to enforce second preprocessor call Feature was removed in Ccache 4.12, which is provided by Homebrew by default since 2025-10-19. --- .github/scripts/utils.zsh/setup_ccache | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/scripts/utils.zsh/setup_ccache b/.github/scripts/utils.zsh/setup_ccache index 34f220ad9..bf758ce65 100644 --- a/.github/scripts/utils.zsh/setup_ccache +++ b/.github/scripts/utils.zsh/setup_ccache @@ -1,9 +1,13 @@ -autoload -Uz log_debug log_warning +autoload -Uz is-at-least log_debug log_warning if (( ${+commands[ccache]} )) { log_debug "Found ccache at ${commands[ccache]}" - ccache --set-config=run_second_cpp=true + local ccache_version=$(ccache --version | head -1 | cut -d ' ' -f 3) + if ! is-at-least 4.12 ${ccache_version}; then + ccache --set-config=run_second_cpp=true + fi + ccache --set-config=direct_mode=true ccache --set-config=inode_cache=true ccache --set-config=compiler_check=content