mirror of
https://github.com/optim-enterprises-bv/nDPId.git
synced 2025-10-30 01:42:22 +00:00
Updated Github/Gitlab CI
* instrument Clang's thread sanitizer for tests Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
2
.github/workflows/build-openwrt.yml
vendored
2
.github/workflows/build-openwrt.yml
vendored
@@ -51,7 +51,7 @@ jobs:
|
|||||||
target: x86-64
|
target: x86-64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
|||||||
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@@ -29,15 +29,19 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- compiler: "default-cc"
|
- compiler: "default-cc"
|
||||||
os: "ubuntu-latest"
|
os: "ubuntu-latest"
|
||||||
|
sanitizer: "-DENABLE_SANITIZER=ON"
|
||||||
- compiler: "clang-12"
|
- compiler: "clang-12"
|
||||||
os: "ubuntu-latest"
|
os: "ubuntu-latest"
|
||||||
|
sanitizer: "-DENABLE_SANITIZER_THREAD=ON"
|
||||||
- compiler: "gcc-10"
|
- compiler: "gcc-10"
|
||||||
os: "ubuntu-latest"
|
os: "ubuntu-latest"
|
||||||
|
sanitizer: "-DENABLE_SANITIZER=ON"
|
||||||
- compiler: "gcc-7"
|
- compiler: "gcc-7"
|
||||||
os: "ubuntu-latest"
|
os: "ubuntu-18.04"
|
||||||
|
sanitizer: "-DENABLE_SANITIZER=ON"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||||
- name: Install Ubuntu Prerequisites
|
- name: Install Ubuntu Prerequisites
|
||||||
@@ -62,7 +66,7 @@ jobs:
|
|||||||
- name: Configure nDPId
|
- name: Configure nDPId
|
||||||
run: |
|
run: |
|
||||||
mkdir build && cd build
|
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
|
- name: Build nDPId
|
||||||
run: |
|
run: |
|
||||||
make -C build all VERBOSE=1
|
make -C build all VERBOSE=1
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ before_script:
|
|||||||
- >
|
- >
|
||||||
apt-get install -y -qq \
|
apt-get install -y -qq \
|
||||||
coreutils sudo \
|
coreutils sudo \
|
||||||
build-essential make cmake binutils gcc autoconf automake \
|
build-essential make cmake binutils gcc clang autoconf automake \
|
||||||
libtool pkg-config git \
|
libtool pkg-config git \
|
||||||
libpcap-dev libgpg-error-dev libjson-c-dev zlib1g-dev \
|
libpcap-dev libgpg-error-dev libjson-c-dev zlib1g-dev \
|
||||||
netcat-openbsd python3 python3-jsonschema tree lcov iproute2
|
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')
|
- PY_VAL=$(cat dependencies/nDPIsrvd.py | sed -n 's/^NETWORK_BUFFER_MAX_SIZE = \([0-9]\+\).*$/\1/gp')
|
||||||
- test ${C_VAL} = ${PY_VAL}
|
- test ${C_VAL} = ${PY_VAL}
|
||||||
# static linked build
|
# 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
|
- mkdir build-cmake-submodule
|
||||||
- cd 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
|
- env CMAKE_C_FLAGS='-Werror' cmake .. -DENABLE_SYSTEMD=ON -DENABLE_COVERAGE=ON -DBUILD_EXAMPLES=ON -DBUILD_NDPI=ON -DENABLE_SANITIZER=ON -DENABLE_ZLIB=ON
|
||||||
|
|||||||
Reference in New Issue
Block a user