Build system: minor fixes about flag compilation and example dependencies (#3038)

- always use `-Wextra` compilation flag; it was already used in CI
- always compile `ndpiSimpleIntegration` when building examples
- don't mess with optimization flags: `CFLAGS` default value is "-g -O2"
  and the user can change it

Try to test -O1,2,3,s flags in CI.

Fix some warnings.
This commit is contained in:
Ivan Nardi 2025-11-21 14:51:29 +00:00 committed by GitHub
parent 4096d758bb
commit 19ee4f6c33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 30 additions and 23 deletions

View file

@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-22.04 # TODO: some issues with masan/clang/ubuntu-24.04
env:
CC: clang
CFLAGS: -Wextra -Werror -DNDPI_EXTENDED_SANITY_CHECKS
CFLAGS: -Werror -DNDPI_EXTENDED_SANITY_CHECKS
# Idea to have significant faster tests while pushing/merging: test all pcaps only on schedule runs; otherwise tests only the pcaps updated/added recently
NDPI_TEST_ONLY_RECENTLY_UPDATED_PCAPS: ${{ (github.event_name == 'schedule') && '0' || '1' }}
steps: