enable build with ccache

This commit is contained in:
nauta 2023-09-27 11:24:01 +08:00 committed by GitHub
parent 8f6d380ccd
commit 11fd4cb802
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

31
.github/workflows/build_base/action.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: "Build base"
inputs:
save_cache:
description: 'whether to save ccache to github action cache'
required: true
os:
description: 'which runner os to run this build action'
required: true
runs:
using: "composite"
steps:
- name: Build init
shell: bash
run: |
bash build.sh init
echo "$GITHUB_WORKSPACE/deps/3rd/usr/local/oceanbase/devtools/bin" >> $GITHUB_PATH
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
max-size: 10G
save: ${{inputs.save_cache}}
key: ${{inputs.os}}
- name: Build project
shell: bash
run: |
bash build.sh debug -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cd build_debug && make -j4