summaryrefslogtreecommitdiff
path: root/.ci/woodpecker/01-build.yaml
blob: f8109c94477eb67acab98d61798132cac2213735 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
matrix:
  IMAGE:
    - dstaesse/debian:o7s
    - dstaesse/ubuntu:o7s
  FLAGS:
    - ''
    - -m32
  COMPILER:
    - clang
    - gcc
  BUILD_TYPE:
    - Debug
    - Release
  DISABLE_FUSE:
    - TRUE
    - FALSE
  DISABLE_OPENSSL:
    - TRUE
    - FALSE
  DISABLE_LIBGCRYPT:
    - TRUE
    - FALSE
  SANITIZER:
    - DebugASan
    - DebugUSan
    - DebugLSan

steps:
  - name: build
    image: ${IMAGE}
    pull: true
    when:
      branch: [testing, be]
      event: [push, pull_request]
    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
      - mkdir build
      - cd build
      - CC=${COMPILER} cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DDISABLE_FUSE=${DISABLE_FUSE} \
          -DDISABLE_OPENSSL=${DISABLE_OPENSSL} -DDISABLE_LIBGCRYPT=${DISABLE_LIBGCRYPT}
      - make CFLAGS="${FLAGS}" -s -j2
      - env CTEST_OUTPUT_ON_FAILURE=1 make CFLAGS="${FLAGS}" -s check
      - cd ..
      - rm -rf build

  - name: sanitizers
    image: ${IMAGE}
    pull: true
    when:
      branch: [testing, be]
      event: [push, pull_request]
    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
      - mkdir build
      - cd build
      - CC=${COMPILER} cmake .. -DCMAKE_BUILD_TYPE=${SANITIZER} -DDISABLE_FUSE=${DISABLE_FUSE} \
          -DDISABLE_OPENSSL=${DISABLE_OPENSSL} -DDISABLE_LIBGCRYPT=${DISABLE_LIBGCRYPT} \
      - make -s -j2
      - env CTEST_OUTPUT_ON_FAILURE=1 make -s check
      - cd ..
      - rm -rf build

  - name: build (manual)
    image: ${IMAGE}
    pull: true
    when:
      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
      - mkdir build
      - cd build
      - CC=${COMPILER} cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DDISABLE_FUSE=${DISABLE_FUSE} \
          -DDISABLE_OPENSSL=${DISABLE_OPENSSL} -DDISABLE_LIBGCRYPT=${DISABLE_LIBGCRYPT}
      - make CFLAGS="${FLAGS}" -s -j2
      - env CTEST_OUTPUT_ON_FAILURE=1 make CFLAGS="${FLAGS}" -s check
      - cd ..
      - rm -rf build

  - name: sanitizers (manual)
    image: ${IMAGE}
    pull: true
    when:
      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
      - mkdir build
      - cd build
      - CC=${COMPILER} cmake .. -DCMAKE_BUILD_TYPE=${SANITIZER} -DDISABLE_FUSE=${DISABLE_FUSE} \
          -DDISABLE_OPENSSL=${DISABLE_OPENSSL} -DDISABLE_LIBGCRYPT=${DISABLE_LIBGCRYPT} \
      - make -s -j2
      - env CTEST_OUTPUT_ON_FAILURE=1 make -s check
      - cd ..
      - rm -rf build