1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- name: Build
- description: Build YDB
- inputs:
- sanitizer:
- required: false
- type: string
- ccache_remote_path:
- required: false
- description: "ccache remote storage definition"
- 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 *
- export CC=/usr/bin/clang-12
- export CC_FOR_BUILD=$CC
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_C_COMPILER_LAUNCHER=/usr/local/bin/ccache -DCMAKE_CXX_COMPILER_LAUNCHER=/usr/local/bin/ccache \
- -DCMAKE_TOOLCHAIN_FILE=../ydb/clang.toolchain \
- -DCMAKE_CXX_FLAGS="-fsanitize=${{ inputs.sanitizer }} -g -gsplit-dwarf -gz -fno-omit-frame-pointer -UNDEBUG" \
- -DCMAKE_C_FLAGS="-fsanitize=${{ inputs.sanitizer }} -g -gsplit-dwarf -gz -fno-omit-frame-pointer -UNDEBUG" \
- ../ydb
- - name: Configure
- shell: bash
- if: ${{!inputs.sanitizer}}
- run: |
- mkdir -p ../build
- cd ../build
- rm -rf *
- export CONAN_USER_HOME=`pwd`
- export CC=/usr/bin/clang-12
- export CC_FOR_BUILD=$CC
- # FIXME: set DCMAKE_CXX_FLAGS_RELWITHDEBINFO and DCMAKE_CXX_FLAGS bacause of global_flags.cmake flags override.
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_C_COMPILER_LAUNCHER=/usr/local/bin/ccache -DCMAKE_CXX_COMPILER_LAUNCHER=/usr/local/bin/ccache \
- -DCMAKE_TOOLCHAIN_FILE=../ydb/clang.toolchain \
- -DCMAKE_C_FLAGS="-O2 -UNDEBUG" \
- -DCMAKE_CXX_FLAGS="-O2 -UNDEBUG" \
- -DCMAKE_C_FLAGS_RELEASE="-O2 -UNDEBUG" \
- -DCMAKE_CXX_FLAGS_RELEASE="-O2 -UNDEBUG" \
- ../ydb
- - name: Build
- shell: bash
- run: |
- ccache -z
- export CCACHE_BASEDIR=`realpath ..`
- export CCACHE_REMOTE_STORAGE="${{inputs.ccache_remote_path}}"
- export CCACHE_SLOPPINESS=locale
- export CCACHE_MAXSIZE=50G
- cd ../build
- ninja
- ccache -s
- df -h
|