summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2021-11-20 14:00:56 +0100
committerCristian Adam <cristian.adam@qt.io>2021-11-21 11:08:17 +0000
commitd177a20bb8be882a76dde816a46853dbea202ec7 (patch)
tree860610aac72bba142598d16d8acbf9d0ba46f9a7 /.github
parent1a6e6825e6e253c096260ac3e1882c50dd153eaf (diff)
downloadqt-creator-d177a20bb8be882a76dde816a46853dbea202ec7.tar.gz
GitHub Actions: Separate ccache cache based on ide major version
This way master, which now is version 7 won't interfere with 6.0 branch which will have version 6. When branches share the same cache the ccache hit rate is now ~40%, which is too low. Reduce the ccache size so that the 5GB would host multiple branch versions. Change-Id: If29c917fb47f4e1fdab4b4257af8b0625f6f219e Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build_cmake.yml23
1 files changed, 15 insertions, 8 deletions
diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml
index 1e03f53e27..6d2ff5c545 100644
--- a/.github/workflows/build_cmake.yml
+++ b/.github/workflows/build_cmake.yml
@@ -364,13 +364,20 @@ jobs:
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
+ file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}" github_workspace)
+ include(${github_workspace}/cmake/QtCreatorIDEBranding.cmake)
+ string(REPLACE "." ";" IDE_VERSION_LIST ${IDE_VERSION_DISPLAY})
+ list(GET IDE_VERSION_LIST 0 IDE_VERSION_MAJOR)
+ message("::set-output name=ide_major_version::${IDE_VERSION_MAJOR}")
+
+
- name: ccache cache files
uses: actions/cache@v1.1.0
with:
path: .ccache
- key: ${{ matrix.config.name }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
+ key: ${{ matrix.config.name }}-ccache-${{ steps.ccache_cache_timestamp.outputs.ide_major_version }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
- ${{ matrix.config.name }}-ccache-
+ ${{ matrix.config.name }}-ccache-${{ steps.ccache_cache_timestamp.outputs.ide_major_version }}
- name: Install system libs
shell: cmake -P {0}
@@ -415,10 +422,10 @@ jobs:
set(ENV{CCACHE_DIR} "${ccache_basedir}/.ccache")
set(ENV{CCACHE_SLOPPINESS} "pch_defines,time_macros")
set(ENV{CCACHE_COMPRESS} "true")
- set(ENV{CCACHE_COMPRESSLEVEL} "6")
- set(ENV{CCACHE_MAXSIZE} "800M")
+ set(ENV{CCACHE_COMPRESSLEVEL} "9")
+ set(ENV{CCACHE_MAXSIZE} "400M")
if ("${{ matrix.config.cxx }}" STREQUAL "cl")
- set(ENV{CCACHE_MAXSIZE} "1200M")
+ set(ENV{CCACHE_MAXSIZE} "600M")
endif()
execute_process(
@@ -491,10 +498,10 @@ jobs:
set(ENV{CCACHE_DIR} "${ccache_basedir}/.ccache")
set(ENV{CCACHE_SLOPPINESS} "pch_defines,time_macros")
set(ENV{CCACHE_COMPRESS} "true")
- set(ENV{CCACHE_COMPRESSLEVEL} "6")
- set(ENV{CCACHE_MAXSIZE} "800M")
+ set(ENV{CCACHE_COMPRESSLEVEL} "9")
+ set(ENV{CCACHE_MAXSIZE} "400M")
if ("${{ matrix.config.cxx }}" STREQUAL "cl")
- set(ENV{CCACHE_MAXSIZE} "1200M")
+ set(ENV{CCACHE_MAXSIZE} "600M")
endif()
execute_process(COMMAND ccache -s)