diff options
author | alexv-smirnov <alex@ydb.tech> | 2023-03-27 20:20:29 +0300 |
---|---|---|
committer | alexv-smirnov <alex@ydb.tech> | 2023-03-27 20:20:29 +0300 |
commit | f860a9ef931567eca872c633fa67bd1aeec464a7 (patch) | |
tree | 760d506859448e19f4355d2be5cda8ed5b7e8fa1 /.github/actions/build | |
parent | c29d86b84f443c9e4e3263a4b1271161b9c99523 (diff) | |
download | ydb-f860a9ef931567eca872c633fa67bd1aeec464a7.tar.gz |
on-demand build
Diffstat (limited to '.github/actions/build')
-rw-r--r-- | .github/actions/build/action.yml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml new file mode 100644 index 0000000000..58d3353deb --- /dev/null +++ b/.github/actions/build/action.yml @@ -0,0 +1,38 @@ +name: Build +description: Build YDB +inputs: + sanitizer: + required: false + type: string + +runs: + using: "composite" + steps: + - name: Configure for sanitizer + shell: bash + if: startsWith(inputs.sanitizer,'sanitize=') + run: | + mkdir -p ../build + patch -p1 < ydb/deploy/patches/0001-sanitizer-build.patch + cd ../build + rm -rf * + cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DCMAKE_TOOLCHAIN_FILE=../ydb/clang.toolchain \ + -DCMAKE_CXX_FLAGS="-f${{ inputs.sanitizer }} -fno-omit-frame-pointer" \ + -DCMAKE_C_FLAGS="-f${{ inputs.sanitizer }} -fno-omit-frame-pointer" \ + ../ydb + - name: Configure + shell: bash + if: false == startsWith(inputs.sanitizer,'sanitize=') + run: | + mkdir -p ../build + cd ../build + rm -rf * + cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_TOOLCHAIN_FILE=../ydb/clang.toolchain ../ydb + - name: Build + shell: bash + run: | + ccache -z + cd ../build + ninja + ccache -s |