[enhancement](workflow) Use ccache to speed the BE UT (Clang) up (#11339)

This commit is contained in:
Adonis Ling
2022-07-29 21:19:26 +08:00
committed by GitHub
parent a46f94320d
commit 5215d95064
5 changed files with 14 additions and 1 deletions

View File

@ -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

3
.gitmodules vendored
View File

@ -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

View File

@ -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}" \

View File

@ -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}" \