diff options
-rw-r--r-- | .github/workflows/build-openwrt.yml | 2 | ||||
-rw-r--r-- | .github/workflows/build.yml | 10 | ||||
-rw-r--r-- | .gitlab-ci.yml | 10 |
3 files changed, 17 insertions, 5 deletions
diff --git a/.github/workflows/build-openwrt.yml b/.github/workflows/build-openwrt.yml index c60b3d7b8..baeaf24ed 100644 --- a/.github/workflows/build-openwrt.yml +++ b/.github/workflows/build-openwrt.yml @@ -51,7 +51,7 @@ jobs: target: x86-64 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c746dc15f..107f6a761 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,15 +29,19 @@ jobs: include: - compiler: "default-cc" os: "ubuntu-latest" + sanitizer: "-DENABLE_SANITIZER=ON" - compiler: "clang-12" os: "ubuntu-latest" + sanitizer: "-DENABLE_SANITIZER_THREAD=ON" - compiler: "gcc-10" os: "ubuntu-latest" + sanitizer: "-DENABLE_SANITIZER=ON" - compiler: "gcc-7" - os: "ubuntu-latest" + os: "ubuntu-18.04" + sanitizer: "-DENABLE_SANITIZER=ON" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Install Ubuntu Prerequisites @@ -62,7 +66,7 @@ jobs: - name: Configure nDPId run: | mkdir build && cd build - cmake .. -DENABLE_SYSTEMD=ON -DENABLE_COVERAGE=ON -DBUILD_EXAMPLES=ON -DBUILD_NDPI=ON -DENABLE_SANITIZER=ON ${{ matrix.ndpid_zlib }} ${{ matrix.ndpid_gcrypt }} + cmake .. -DENABLE_SYSTEMD=ON -DENABLE_COVERAGE=ON -DBUILD_EXAMPLES=ON -DBUILD_NDPI=ON ${{ matrix.sanitizer }} ${{ matrix.ndpid_zlib }} ${{ matrix.ndpid_gcrypt }} - name: Build nDPId run: | make -C build all VERBOSE=1 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e2e8fc44..f16d2389d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ before_script: - > apt-get install -y -qq \ coreutils sudo \ - build-essential make cmake binutils gcc autoconf automake \ + build-essential make cmake binutils gcc clang autoconf automake \ libtool pkg-config git \ libpcap-dev libgpg-error-dev libjson-c-dev zlib1g-dev \ netcat-openbsd python3 python3-jsonschema tree lcov iproute2 @@ -24,6 +24,14 @@ build_and_test: - PY_VAL=$(cat dependencies/nDPIsrvd.py | sed -n 's/^NETWORK_BUFFER_MAX_SIZE = \([0-9]\+\).*$/\1/gp') - test ${C_VAL} = ${PY_VAL} # static linked build + - mkdir build-clang-tsan + - cd build-clang-tsan + - env CMAKE_C_FLAGS='-Werror' CMAKE_C_COMPILER='clang' cmake .. -DBUILD_EXAMPLES=OFF -DBUILD_NDPI=ON -DENABLE_SANITIZER_THREAD=ON -DENABLE_ZLIB=ON + - make libnDPI + - tree libnDPI + - make install VERBOSE=1 DESTDIR="$(realpath ./_install)" + - ../test/run_tests.sh ../libnDPI ./_install/usr/local/bin/nDPId-test + - cd .. - mkdir build-cmake-submodule - cd build-cmake-submodule - env CMAKE_C_FLAGS='-Werror' cmake .. -DENABLE_SYSTEMD=ON -DENABLE_COVERAGE=ON -DBUILD_EXAMPLES=ON -DBUILD_NDPI=ON -DENABLE_SANITIZER=ON -DENABLE_ZLIB=ON |