aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/sanitizer.yml
blob: f7c37be399c38add72c30b99b96ec06387520f9b (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
name: sanitize
on:
  push:
    paths-ignore: ["docs/**", "**.adoc", "**.md"]
  pull_request:
    paths-ignore: ["docs/**", "**.adoc", "**.md"]
jobs:
  sanitize:
    env:
      CC: clang
      CXX: clang++
      CTEST_OUTPUT_ON_FAILURE: 1
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        sanitizer: [address, undefined, thread]
        os: [ubuntu-latest]

    steps:
      - uses: actions/checkout@v1

      - name: Install mbedTLS
        run: sudo apt-get install libmbedtls-dev

      - name: Install ninja
        run: sudo apt-get install ninja-build

      - name: Configure
        run: |
          mkdir build
          cd build
          cmake -G Ninja -DNNG_SANITIZER=${{ matrix.sanitizer }} -DCMAKE_BUILD_TYPE=Debug -DNNG_ENABLE_TLS=ON -DNNG_TOOLS=OFF ..
      - name: Build
        run: |
          cd build
          ninja
      - name: Test
        run: |
          cd build
          ninja test