aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2020-09-27 16:09:23 +0200
committerCristian Adam <cristian.adam@qt.io>2020-09-27 20:05:07 +0000
commit1e8f19e2741ff43878054f6a2036e841cfabf494 (patch)
treeaa56443590f36a1ff0dae5910f110fc297fbc21f /.github
parent63dc880b9fb572700e7e248712b35d731cdddc01 (diff)
GitHub Actions: Add ability to clear ccache
By specifying "ccache: clear" or "ccache: clean" in the commit message, the workflow will issue a ccache --clear command before building. Change-Id: I9e45ebcd8dc4b05cef9d6d7ea70bef67602d1223 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build_cmake.yml8
1 files changed, 8 insertions, 0 deletions
diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml
index 138f9779bd..202c71a50d 100644
--- a/.github/workflows/build_cmake.yml
+++ b/.github/workflows/build_cmake.yml
@@ -363,6 +363,14 @@ jobs:
set(ENV{CCACHE_MAXSIZE} "1200M")
endif()
+ execute_process(
+ COMMAND git log --format=%B -n 1 ${{ github.event.after }}
+ OUTPUT_VARIABLE git_commit_msg
+ )
+ if (${git_commit_msg} MATCHES "ccache:[ ]*clea[r|n]")
+ execute_process(COMMAND ccache --clear COMMAND_ECHO STDOUT)
+ endif()
+
execute_process(COMMAND ccache -p)
execute_process(COMMAND ccache -z)