Skip to content

Commit

Permalink
Update some CI jobs
Browse files Browse the repository at this point in the history
* Move ThreadSanitizer job to the scheduled jobs (once a day): all out tests
  are intrinsically mono-thread and this job takes quite some time

* Two explicit jobs to test LTO and Gold linker, used by oss-fuzz
  • Loading branch information
IvanNardi committed Jan 7, 2025
1 parent c3d19be commit 4989f93
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 8 deletions.
50 changes: 42 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,48 @@ jobs:
git update-index --refresh || echo "::warning file=utils/update_every_lists.sh::Please re-run utils/update_every_lists.sh and commit any changes."
git diff-index --quiet HEAD -- || true
test-lto-gold:
# Options used by oss-fuzz: we only want to check that everything compile fine; no need to run the tests
name: LTO and Gold Linker (ubuntu-24.04): ${{ matrix.compiler }}
runs-on: ubuntu-24.04
env:
CC: ${{ matrix.compiler }}
CFLAGS: -Wextra -Werror -DNDPI_EXTENDED_SANITY_CHECKS
strategy:
fail-fast: true
matrix:
compiler: ["gcc-14", "clang-18"] # "Newest" gcc/clang easily available
ar: ["ar"]
ranlib: ["ranlib"]
msan: [""]
lto_gold_linker: [""]
include:
- compiler: "gcc-14"
ar: "ar"
ranlib: "ranlib"
- compiler: "clang-18"
ar: "llvm-ar-18"
ranlib: "llvm-ranlib-18"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Install Ubuntu Prerequisites
run: |
sudo apt-get update
sudo apt-get install autoconf automake debhelper libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev rrdtool librrd-dev parallel
- name: Configure nDPI
run: |
AR=${{ matrix.ar }} RANLIB=${{ matrix.ranlib }} ./autogen.sh --enable-option-checking=fatal --enable-debug-messages --with-sanitizer --with-lto-and-gold-linker
- name: Build nDPI
run: |
make -j $(nproc) all
make -C example ndpiSimpleIntegration
make -C rrdtool
- name: Print nDPI long help
run: |
cd ./example && ./ndpiReader -H
test:
name: ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.gcrypt }} ${{ matrix.compiler }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} ${{ matrix.msan }} ${{ matrix.nBPF }} ${{matrix.lto_gold_linker}} ${{matrix.global_context}}
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -126,14 +168,6 @@ jobs:
msan: "--with-sanitizer"
nBPF: ""
lto_gold_linker: "--with-lto-and-gold-linker"
- compiler: "cc"
os: ubuntu-latest
arch: "x86_64"
gcrypt: ""
pcre: "--with-pcre2"
maxminddb: "--with-maxminddb"
msan: "--with-thread-sanitizer"
nBPF: ""
- compiler: "cc"
os: ubuntu-latest
arch: "x86_64"
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/build_scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,28 @@ jobs:
name: ndpi-performance
path: ndpi-performance-upload
retention-days: 7

threadsanitizer:
name: Thread Sanitizer (ubuntu-latest)
runs-on: ubuntu-latest
env:
CFLAGS: -Wextra -Werror
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Ubuntu Prerequisites
run: |
sudo apt-get update
sudo apt-get install autoconf automake libtool pkg-config gettext flex bison libjson-c libpcap-dev rrdtool librrd-dev parallel
- name: Configure nDPI
run: |
./autogen.sh --enable-option-checking=fatal --with-thread-sanitizer
- name: Build nDPI
run: |
make -j $(nproc) all
make -C example ndpiSimpleIntegration
make -C rrdtool
- name: Tests
run: |
NDPI_FORCE_PARALLEL_UTESTS=1 NDPI_SKIP_PARALLEL_BAR=1 ./tests/do.sh

0 comments on commit 4989f93

Please sign in to comment.