GitHub Actions: build with -D_FORTIFY_SOURCE=2

This requires --buildtype=debugoptimized (or --buildtype=release, but
optimizations need to be enabled), and will allow us to keep the i3 build free
of warnings during development.

Distributions like Debian build with -D_FORTIFY_SOURCE=2.
This commit is contained in:
Michael Stapelberg 2023-01-02 10:15:43 +01:00 committed by Michael Stapelberg
parent 3e184daf29
commit d06e87eb8d

View File

@ -47,7 +47,7 @@ jobs:
echo "::endgroup::"
- name: build i3
run: |
docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${{ env.BASENAME }} /bin/sh -c 'rm -rf build; mkdir -p build && cd build && CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Werror -fno-common" meson .. -Ddocs=true -Dmans=true -Db_sanitize=address && ninja -v'
docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${{ env.BASENAME }} /bin/sh -c 'rm -rf build; mkdir -p build && cd build && CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Werror -fno-common -D_FORTIFY_SOURCE=2" meson .. -Ddocs=true -Dmans=true -Db_sanitize=address --buildtype=debugoptimized && ninja -v'
- name: check spelling
run: |
docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${{ env.BASENAME }} ./travis/check-spelling.pl