aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2020-01-13 11:25:29 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2020-01-13 10:30:32 +0000
commit77e21cd5b69a6cafe3366bb9e98f85dd8ae215bb (patch)
tree86fc559e3a9f78b8aa47923cf9df425a77b126b2 /.github
parent9686e91bd549f5d071e32ce387b69fdd3ad60171 (diff)
CMake Build: Enable ccache for Visual C++ for GitHub Actions
Change-Id: I75aa3ada96ab575a3a2db0afc6788267aedfa6d6 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build_cmake.yml19
1 files changed, 6 insertions, 13 deletions
diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml
index 1a7d352cdf..ed1f5c73ff 100644
--- a/.github/workflows/build_cmake.yml
+++ b/.github/workflows/build_cmake.yml
@@ -236,18 +236,6 @@ jobs:
endforeach()
endif()
- if ($ENV{CC} STREQUAL "cl")
- set(build_speedup
- -D BUILD_WITH_PCH=ON
- )
- else()
- set(build_speedup
- -D CMAKE_C_COMPILER_LAUNCHER=ccache
- -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
- -D BUILD_WITH_PCH=OFF
- )
- endif()
-
set(path_separator ":")
if ("${{ runner.os }}" STREQUAL "Windows")
set(path_separator ";")
@@ -265,7 +253,9 @@ jobs:
-G Ninja
-D CMAKE_MAKE_PROGRAM=ninja
-D CMAKE_FIND_PACKAGE_PREFER_CONFIG=TRUE
- ${build_speedup}
+ -D CMAKE_C_COMPILER_LAUNCHER=ccache
+ -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
+ -D BUILD_WITH_PCH=OFF
RESULT_VARIABLE result
)
if (NOT result EQUAL 0)
@@ -300,6 +290,9 @@ jobs:
set(ENV{CCACHE_COMPRESS} "true")
set(ENV{CCACHE_COMPRESSLEVEL} "6")
set(ENV{CCACHE_MAXSIZE} "400M")
+ if ("${{ matrix.config.cxx }}" STREQUAL "cl")
+ set(ENV{CCACHE_MAXSIZE} "600M")
+ endif()
execute_process(COMMAND ccache -p)
execute_process(COMMAND ccache -z)