From 1aceb945e0d2faf9fbb3a9f89a7e4b7fca71f099 Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Thu, 19 Jan 2023 13:12:21 -0800 Subject: set CFLAGS in CI, including -Werror These only affect the Makefile tests (which only run on Linux) since -Werror currently fails on Windows and macOS. --- .github/workflows/ci.yml | 2 ++ c/Makefile.testing | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 399c042..f832263 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -178,6 +178,8 @@ jobs: c_tests: name: C Makefile tests runs-on: ubuntu-latest + env: + CFLAGS: "-Wall -Wextra -pedantic -Werror -Wsign-conversion" steps: - uses: actions/checkout@v3 diff --git a/c/Makefile.testing b/c/Makefile.testing index b540528..dba5da7 100644 --- a/c/Makefile.testing +++ b/c/Makefile.testing @@ -3,8 +3,8 @@ NAME=blake3 CC=gcc -CFLAGS=-O3 -Wall -Wextra -std=c11 -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIE -fvisibility=hidden -LDFLAGS=-pie -Wl,-z,relro,-z,now +CFLAGS+=-O3 -Wall -Wextra -std=c11 -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIE -fvisibility=hidden +LDFLAGS+=-pie -Wl,-z,relro,-z,now TARGETS= ASM_TARGETS= EXTRAFLAGS=-Wa,--noexecstack -- cgit v1.2.3