Add warnings and error on warning to configure and cmake tests.

This commit is contained in:
pmqs 2024-02-10 12:34:50 +00:00 committed by Mark Adler
parent fd5fe8b17e
commit d9243a0f06
2 changed files with 11 additions and 2 deletions

View File

@ -11,50 +11,59 @@ jobs:
- name: Ubuntu GCC
os: ubuntu-latest
compiler: gcc
cflags: -Werror -Wall -Wextra
# Test out of source builds
- name: Ubuntu GCC OSB
os: ubuntu-latest
compiler: gcc
cflags: -Werror -Wall -Wextra
build-dir: ../build
src-dir: ../zlib
- name: Ubuntu GCC -O3
os: ubuntu-latest
compiler: gcc
cflags: -O3
cflags: -O3 -Werror -Wall -Wextra
- name: Ubuntu Clang
os: ubuntu-latest
compiler: clang
cflags: -Werror -Wall -Wextra
- name: Ubuntu Clang Debug
os: ubuntu-latest
compiler: clang
cflags: -Werror -Wall -Wextra
build-config: Debug
- name: Windows MSVC Win32
os: windows-latest
compiler: cl
cflags: /WX /W3
cmake-args: -A Win32
- name: Windows MSVC Win64
os: windows-latest
compiler: cl
cflags: /WX /W3
cmake-args: -A x64
- name: Windows GCC
os: windows-latest
compiler: gcc
cflags: -Werror -Wall -Wextra
cmake-args: -G Ninja
- name: macOS Clang
os: macos-latest
compiler: clang
cflags: -Werror -Wall -Wextra
- name: macOS GCC
os: macos-latest
compiler: gcc-11
cflags: -Werror -Wall -Wextra
steps:
- name: Checkout repository

View File

@ -110,7 +110,7 @@ jobs:
${{ matrix.src-dir || '.' }}/configure ${{ matrix.configure-args }}
env:
CC: ${{ matrix.compiler }}
CFLAGS: ${{ matrix.cflags }}
CFLAGS: ${{ matrix.cflags }} -Werror
LDFLAGS: ${{ matrix.ldflags }}
CHOST: ${{ matrix.chost }}