Skip to content

Commit

Permalink
Use sccache on all CI platforms (KhronosGroup#2014)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ahesham-arm authored Jul 16, 2024
1 parent 39fa6e6 commit 070052c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions presubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down

0 comments on commit 070052c

Please sign in to comment.