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