aboutsummaryrefslogtreecommitdiffstats
path: root/.github/actions/build/action.yml
blob: 07c609a7ae39b9e3ce1e3e931d49ba3b8bed60a5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 }} -fno-omit-frame-pointer" \
        -DCMAKE_C_FLAGS="-fsanitize=${{ inputs.sanitizer }} -fno-omit-frame-pointer" \
        -DCMAKE_ENABLE_EXPORTS=true \
        ../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_ENABLE_EXPORTS=true \
        ../ydb
  - name: Build
    shell: bash
    run: |
      ccache -z
      cd ../build
      ninja
      ccache -s