Merge origin/ai_server into ai_server #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI Build Warnings | |
| # Builds with optimization enabled and -Werror to gate on compiler warnings. | |
| # | |
| # This job exists because GCC only emits an entire class of warnings from its | |
| # optimizer passes, so they are invisible in the -O0 Debug trees most local | |
| # development uses: -Wclobbered, -Wmaybe-uninitialized, -Wstringop-truncation, | |
| # -Wstringop-overflow, -Warray-bounds, -Wdangling-pointer, -Wuse-after-free. | |
| # The packaging workflows do build Release, but without -Werror, so these were | |
| # only ever printed as noise and first failed builds downstream. | |
| # | |
| # Pinned to a fixed runner image rather than ubuntu-latest: -Wclobbered in | |
| # particular is sensitive to compiler version and inlining decisions, so an | |
| # unannounced GCC bump should not redden CI on its own. Bump deliberately. | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| pull_request: | |
| branches: [ master ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-werror: | |
| name: Release build with -Werror (gcc) | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| submodules: recursive | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| build-essential cmake pkg-config gcc-multilib g++-multilib \ | |
| libavcodec-dev libavformat-dev libavutil-dev libavdevice-dev \ | |
| libswresample-dev libswscale-dev \ | |
| default-libmysqlclient-dev \ | |
| libbz2-dev libcurl4-openssl-dev libjpeg-dev libturbojpeg0-dev \ | |
| libpcre2-dev libpolkit-gobject-1-dev libssl-dev zlib1g-dev \ | |
| libv4l-dev libvlc-dev libvncserver-dev \ | |
| libmosquitto-dev libmosquittopp-dev \ | |
| gsoap libgsoap-dev | |
| # Runs before the build: it is compile-only and takes about a second, so a | |
| # SharedData ABI break is reported immediately rather than after the full | |
| # tree has built. The runners are all 64bit, so without this step nothing | |
| # in CI exercises the 32bit layout that zmc/zma/zms, Memory.pm and | |
| # Monitor.php all have to agree on. | |
| - name: Check SharedData 32bit/64bit ABI | |
| run: python3 utils/check-shareddata-abi.py | |
| - name: Configure | |
| # -Wno-error=cpp and -Wno-error=conditionally-supported keep third-party | |
| # code from failing the build: system mosquittopp.h carries a #warning, | |
| # and gsoap's own wsseapi.c plugin source does a function-pointer cast. | |
| # Neither is ZoneMinder code and neither is actionable here. Warnings in | |
| # our own sources remain hard errors. | |
| run: | | |
| cmake -S . -B build \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DENABLE_WERROR=ON \ | |
| -DBUILD_MAN=0 \ | |
| -DCMAKE_C_FLAGS="-Wno-error=cpp -Wno-error=conditionally-supported" \ | |
| -DCMAKE_CXX_FLAGS="-Wno-error=cpp -Wno-error=conditionally-supported" | |
| - name: Build | |
| run: cmake --build build -j"$(nproc)" |