mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-11-30 12:14:36 -05:00
The package workflows' publish steps ran easingthemes/ssh-deploy@main with the zmrepo SSH key in its environment, and imported the package signing key with crazy-max/ghaction-import-gpg@v7. A branch or tag is resolved when the workflow runs, so whoever could move it upstream could run code with those keys on our next push to master or release-1.38, and publish packages to the apt and rpm repositories. Pin each `uses:` to the commit its ref names today, with the ref as a comment so dependabot keeps updating them. ssh-deploy is pinned to v6.0.1, which main differs from only in release metadata. GitHub's own actions are pinned too. utils/check-pinned-actions.py and the CI Pinned Actions workflow fail when a workflow uses an action by anything but a full commit SHA. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
74 lines
2.9 KiB
YAML
74 lines
2.9 KiB
YAML
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@3d3c42e5aac5ba805825da76410c181273ba90b1 # 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 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)"
|