From 070052c890c83053c5243e32b5bec8b84b04344d Mon Sep 17 00:00:00 2001 From: Ahmed Hesham <117350656+ahesham-arm@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:54:24 +0100 Subject: [PATCH] Use sccache on all CI platforms (#2014) MSVC on Windows was previously omitted from the list of CI platforms that use sccache. Unify the CMAKE_CACHE_OPTIONS used for all CI platforms. In the case of a 100% cache hit, this cuts down the average checks time from 8 minutes to 4 minutes, example: https://github.com/ahesham-arm/OpenCL-CTS/actions/runs/9896449792 --- presubmit.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/presubmit.sh b/presubmit.sh index 23e1e9a3b..b519d6838 100755 --- a/presubmit.sh +++ b/presubmit.sh @@ -87,14 +87,12 @@ mkdir build cd build if [[ ${RUNNER_OS} == "Windows" ]]; then CMAKE_OPENCL_LIBRARIES_OPTION="OpenCL" - CMAKE_CACHE_OPTIONS="" else CMAKE_OPENCL_LIBRARIES_OPTION="-lOpenCL -lpthread" - CMAKE_CACHE_OPTIONS="-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache" fi cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE="${BUILD_CONFIG}" \ - ${CMAKE_CACHE_OPTIONS} \ + -DCMAKE_CACHE_OPTIONS="-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache" \ -DCL_INCLUDE_DIR=${TOP}/OpenCL-Headers \ -DCL_LIB_DIR=${TOP}/OpenCL-ICD-Loader/build \ -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} \