Fix ccache in CI (#2492)

sccache emits a warning message after every build that it has failed to
save a build cache. Additionally the stats are all zeroes, no cache hits
(or misses). The "Caches" tab under "Actions" does not have any cached
build artifacts which confirms that nothing is being saved.

Fix by passing the correct launcher options directly to CMake instead of
wrapping them in `CMAKE_CACHE_OPTIONS`.

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
This commit is contained in:
Ahmed Hesham 2025-08-19 17:37:37 +01:00 committed by GitHub
parent 555b7cd383
commit 9acbb24064
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -162,7 +162,8 @@ jobs:
fi
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DCMAKE_CACHE_OPTIONS="-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache" \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-DCL_INCLUDE_DIR='${{ github.workspace }}'/OpenCL-Headers \
-DSPIRV_INCLUDE_DIR='${{ github.workspace }}'/SPIRV-Headers \
-DCL_LIB_DIR='${{ github.workspace }}'/OpenCL-ICD-Loader/build \