aboutsummaryrefslogtreecommitdiffstats
path: root/.github/actions/build/action.yml
diff options
context:
space:
mode:
authorAlexander Smirnov <alexv-smirnov@yandex-team.ru>2023-05-31 19:05:05 +0200
committerAlexander Smirnov <alexv-smirnov@yandex-team.ru>2023-05-31 19:05:05 +0200
commit10ba5cc0c3d130ce4b33d307d265b937dd572c39 (patch)
treef5de7deac53b0989332e9e8571d75c8916239f3f /.github/actions/build/action.yml
parent1db08b73476ce8a181ff6163ec91305fe7a8cc56 (diff)
downloadydb-10ba5cc0c3d130ce4b33d307d265b937dd572c39.tar.gz
bring workflows from main
Diffstat (limited to '.github/actions/build/action.yml')
-rw-r--r--.github/actions/build/action.yml46
1 files changed, 46 insertions, 0 deletions
diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml
new file mode 100644
index 0000000000..6b754d2b7a
--- /dev/null
+++ b/.github/actions/build/action.yml
@@ -0,0 +1,46 @@
+name: Build
+description: Build YDB
+inputs:
+ sanitizer:
+ required: false
+ type: string
+
+runs:
+ using: "composite"
+ steps:
+ - name: Configure for sanitizer
+ shell: bash
+ if: inputs.sanitizer
+ 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_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
+ -DCMAKE_TOOLCHAIN_FILE=../ydb/clang.toolchain \
+ -DCMAKE_CXX_FLAGS="-fsanitize=${{ inputs.sanitizer }} -g -fno-omit-frame-pointer" \
+ -DCMAKE_C_FLAGS="-fsanitize=${{ inputs.sanitizer }} -g -fno-omit-frame-pointer" \
+ -DCMAKE_EXE_LINKER_FLAGS="-rdynamic" \
+ ../ydb
+ - name: Configure
+ shell: bash
+ if: ${{!inputs.sanitizer}}
+ run: |
+ mkdir -p ../build
+ cd ../build
+ rm -rf *
+ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
+ -DCMAKE_TOOLCHAIN_FILE=../ydb/clang.toolchain \
+ -DCMAKE_CXX_FLAGS="-g" \
+ -DCMAKE_C_FLAGS="-g" \
+ -DCMAKE_EXE_LINKER_FLAGS="-rdynamic" \
+ ../ydb
+ - name: Build
+ shell: bash
+ run: |
+ ccache -z
+ cd ../build
+ ninja
+ ccache -s