summaryrefslogtreecommitdiff
path: root/.ci/woodpecker/20-sanitizer.yaml
blob: b3d9f6afb57e3cb91fb6d791df3b44aa4d08f9b6 (plain)
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
depends_on:
  - 00-check-version

matrix:
  IMAGE:
    - dstaesse/debian:o7s
    - dstaesse/ubuntu:o7s
  COMPILER:
    - clang
    - gcc

steps:
  - name: sanitizers
    image: ${IMAGE}
    pull: true
    when:
      - branch: be
        event: [push, pull_request]
      - event: manual
    commands:
      - apt-get update -y
      - apt-get install bash clang -y
      - apt-get install git protobuf-c-compiler cmake -y
      - apt-get install libgcrypt20-dev libssl-dev libfuse-dev dnsutils cmake-curses-gui -y
      - apt-get install libprotobuf-c-dev -y || true
      - |
        set -e

        for sanitizer in DebugASan DebugUSan DebugLSan; do
            echo "--- ${COMPILER} $sanitizer ---"
            mkdir build && cd build
            CC=${COMPILER} cmake .. \
                -DCMAKE_BUILD_TYPE=$sanitizer
            make -s -j2
            env CTEST_OUTPUT_ON_FAILURE=1 \
                make -s check
            cd .. && rm -rf build
        done