forked from qt-creator/qt-creator
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>
This commit is contained in:
8
.github/workflows/build_cmake.yml
vendored
8
.github/workflows/build_cmake.yml
vendored
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user