diff --git a/.github/actions/ccache-action b/.github/actions/ccache-action new file mode 160000 index 0000000000..bd43b7f5fb --- /dev/null +++ b/.github/actions/ccache-action @@ -0,0 +1 @@ +Subproject commit bd43b7f5fb36d5f97ef5c6cc818a2055b04f610a diff --git a/.github/workflows/be-ut-clang.yml b/.github/workflows/be-ut-clang.yml index ca2e111e16..4e52acc516 100644 --- a/.github/workflows/be-ut-clang.yml +++ b/.github/workflows/be-ut-clang.yml @@ -35,6 +35,12 @@ jobs: persist-credentials: false submodules: recursive + - name: Ccache ${{ github.ref }} + uses: ./.github/actions/ccache-action + with: + key: ${{ github.ref }} (BE UT Clang) + max-size: "1G" + - name: Paths filter uses: ./.github/actions/paths-filter id: filter @@ -64,7 +70,7 @@ jobs: sudo apt update sudo apt upgrade --yes - sudo DEBIAN_FRONTEND=noninteractive apt install --yes tzdata ccache byacc + sudo DEBIAN_FRONTEND=noninteractive apt install --yes tzdata byacc # set timezone sudo ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime diff --git a/.gitmodules b/.gitmodules index 85b4ea692b..142ebff986 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule ".github/actions/action-pr-title"] path = .github/actions/action-pr-title url = https://github.com/deepakputhraya/action-pr-title.git +[submodule ".github/actions/ccache-action"] + path = .github/actions/ccache-action + url = https://github.com/hendrikmuhs/ccache-action diff --git a/build.sh b/build.sh index 43c1043da6..61cae76324 100755 --- a/build.sh +++ b/build.sh @@ -285,6 +285,8 @@ if [ ${BUILD_BE} -eq 1 ] ; then fi MAKE_PROGRAM="$(which "${BUILD_SYSTEM}")" echo "-- Make program: ${MAKE_PROGRAM}" + echo "-- Use ccache: ${CMAKE_USE_CCACHE}" + mkdir -p ${CMAKE_BUILD_DIR} cd ${CMAKE_BUILD_DIR} ${CMAKE_CMD} -G "${GENERATOR}" \ diff --git a/run-be-ut.sh b/run-be-ut.sh index 9c6457db9a..f0ce2f7035 100755 --- a/run-be-ut.sh +++ b/run-be-ut.sh @@ -124,6 +124,7 @@ fi MAKE_PROGRAM="$(which "${BUILD_SYSTEM}")" echo "-- Make program: ${MAKE_PROGRAM}" +echo "-- Use ccache: ${CMAKE_USE_CCACHE}" cd ${CMAKE_BUILD_DIR} ${CMAKE_CMD} -G "${GENERATOR}" \