diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 1138562d0a..ff0f909ce5 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -25,7 +25,19 @@ jobs: key: ${{ runner.os }}-build-${{ env.cache-name }}-el7.x86_64-${{ hashFiles('deps/init/oceanbase.el7.x86_64.deps') }} 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 @@ -33,8 +45,13 @@ jobs: - name: Build project shell: bash run: | - bash build.sh debug - cd build_debug && make -j4 + export CCACHE_COMPRESS=1 + export CCACHE_COMPRESSLEVEL=9 + bash 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 centos-x86_64: runs-on: ubuntu-20.04