From f25ff03b656745fb6205a170bbffabb463042426 Mon Sep 17 00:00:00 2001 From: Ross Bencina Date: Tue, 28 Mar 2023 11:18:19 +1100 Subject: [PATCH 1/3] example usage of setting -Werror in CI script. choose one option, either (1) configure step, or (2) make step. See discussion at https://stackoverflow.com/questions/32792692/cflags-in-configure-script --- .github/workflows/autotools.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index 4d6fb6cb9..be316febf 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -15,6 +15,6 @@ jobs: steps: - uses: actions/checkout@v2 - name: configure - run: ./configure + run: ./configure CFLAGS=-Werror - name: make - run: make + run: make CFLAGS=-Werror From bc22717b4315676bbb72ec46da69b7e92b3e8a99 Mon Sep 17 00:00:00 2001 From: Ross Bencina Date: Thu, 30 Mar 2023 17:43:53 +1100 Subject: [PATCH 2/3] don't set CFLAGS for the make step, seems to override rather than add to existing CFLAGS, which breaks everything. --- .github/workflows/autotools.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index be316febf..c0891e797 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -17,4 +17,4 @@ jobs: - name: configure run: ./configure CFLAGS=-Werror - name: make - run: make CFLAGS=-Werror + run: make From b81d7b180f7b758e332bb2152b8814414af26f37 Mon Sep 17 00:00:00 2001 From: Ross Bencina Date: Thu, 30 Mar 2023 17:51:33 +1100 Subject: [PATCH 3/3] set CFLAGS and CXXFLAGS using environment vars as in #636 --- .github/workflows/autotools.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index c0891e797..ec585f77a 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -11,10 +11,13 @@ jobs: runs-on: ubuntu-latest name: Ubuntu + env: + CFLAGS: "-Werror" + CXXFLAGS: "-Werror" steps: - uses: actions/checkout@v2 - name: configure - run: ./configure CFLAGS=-Werror + run: ./configure - name: make run: make