From 7cf51f71ef64114a61810a0e341b400cc8a15222 Mon Sep 17 00:00:00 2001 From: Ahmed Hesham Date: Thu, 11 Jul 2024 18:58:00 +0100 Subject: [PATCH] Use sccache on all CI platforms 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 23e1e9a3b7..b519d68388 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} \