From 46b34aeb052ef9782af55050c46e4f94bf3f6128 Mon Sep 17 00:00:00 2001 From: wangyunlai <90242350+hnwyllmm1@users.noreply.github.com> Date: Tue, 18 Jul 2023 16:15:17 +0800 Subject: [PATCH] use ccache in centos --- .github/workflows/compile.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 08468268dd..c182938df7 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -71,6 +71,18 @@ jobs: path: deps/3rd enableCrossOsArchive: true + - name: cache-build + id: cache-build + uses: actions/cache@v3 + env: + cache-name: cache-build + with: + key: ${{ runner.os }}-${{ env.cache-name }}-el7.x86_64-${{ github.ref_name }} + path: ~/.ccache + enableCrossOsArchive: true + restore-keys: | + ${{ runner.os }}-${{ env.cache-name }}-el7.x86_64 + - name: Build init if: steps.cache-deps.outputs.cache-hit != 'true' run: bash build.sh init @@ -78,5 +90,8 @@ jobs: - name: Build project shell: bash run: | - bash build.sh debug - cd build_debug && make -j4 + rm -rf build_debug + deps/3rd/usr/local/oceanbase/devtools/bin/ccache -c + bash build.sh debug -DOB_USE_CCACHE=ON + cd build_debug && make -j4 && cd - + deps/3rd/usr/local/oceanbase/devtools/bin/ccache -s