CI: enable gcc static analyzer

This commit is contained in:
Consolatis 2024-04-08 17:32:16 +02:00
parent c9de358075
commit b959e23d6d
3 changed files with 16 additions and 0 deletions

View file

@ -155,6 +155,17 @@ jobs:
meson compile -C build-gcc-release
' | $TARGET
- name: Build with gcc - static analyzer
run: |
echo '
cd "$GITHUB_WORKSPACE"
export CC=gcc
meson setup build-gcc-static_analyzer -Dxwayland=enabled \
-Dstatic_analyzer=enabled --werror
meson compile -C build-gcc-static_analyzer
' | $TARGET
# Runtime tests, these run on Debian and Void only (the later due to libmusl being used)
- name: Build with clang - release
run: |

View file

@ -87,6 +87,10 @@ else
endif
conf_data.set10('HAVE_RSVG', have_rsvg)
if get_option('static_analyzer').enabled()
add_project_arguments(['-fanalyzer'], language: 'c')
endif
msgfmt = find_program('msgfmt', required: get_option('nls'))
if msgfmt.found()
source_root = meson.current_source_dir()

View file

@ -2,3 +2,4 @@ option('man-pages', type: 'feature', value: 'auto', description: 'Generate and i
option('xwayland', type: 'feature', value: 'auto', description: 'Enable support for X11 applications')
option('svg', type: 'feature', value: 'enabled', description: 'Enable svg window buttons')
option('nls', type: 'feature', value: 'auto', description: 'Enable native language support')
option('static_analyzer', type: 'feature', value: 'disabled', description: 'Run gcc static analyzer')