use build ccache

This commit is contained in:
wangyunlai
2023-07-18 14:57:52 +08:00
committed by GitHub
parent 63ec91d4c4
commit 78480c882a

View File

@ -25,7 +25,19 @@ jobs:
key: ${{ runner.os }}-build-${{ env.cache-name }}-el7.x86_64-${{ hashFiles('deps/init/oceanbase.el7.x86_64.deps') }} key: ${{ runner.os }}-build-${{ env.cache-name }}-el7.x86_64-${{ hashFiles('deps/init/oceanbase.el7.x86_64.deps') }}
path: deps/3rd path: deps/3rd
enableCrossOsArchive: true 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 - name: Build init
if: steps.cache-deps.outputs.cache-hit != 'true' if: steps.cache-deps.outputs.cache-hit != 'true'
run: bash build.sh init run: bash build.sh init
@ -33,8 +45,13 @@ jobs:
- name: Build project - name: Build project
shell: bash shell: bash
run: | run: |
bash build.sh debug export CCACHE_COMPRESS=1
cd build_debug && make -j4 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: centos-x86_64:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04