From 11fd4cb80205184dcdc1f71fdf5ee97df63e6b66 Mon Sep 17 00:00:00 2001 From: nauta Date: Wed, 27 Sep 2023 11:24:01 +0800 Subject: [PATCH] enable build with ccache --- .github/workflows/build_base/action.yml | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/build_base/action.yml diff --git a/.github/workflows/build_base/action.yml b/.github/workflows/build_base/action.yml new file mode 100644 index 0000000000..d950e69162 --- /dev/null +++ b/.github/workflows/build_base/action.yml @@ -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