All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: linux-ext4@vger.kernel.org
Subject: [PATCH 1/4] ci.yml: ensure -Werror really gets used in all cases
Date: Sat, 28 Jan 2023 14:46:48 -0800	[thread overview]
Message-ID: <20230128224651.59593-2-ebiggers@kernel.org> (raw)
In-Reply-To: <20230128224651.59593-1-ebiggers@kernel.org>

From: Eric Biggers <ebiggers@google.com>

-Werror wasn't actually being used when building the libraries, as the
libraries use CFLAGS_STLIB instead of CFLAGS.

Use CFLAGS_WARN, which gets included in both.

Note: -Werror can't just be passed to 'configure' like the other flags
are, as it interferes with some of the configure checks.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 .github/workflows/ci.yml | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 29482178d..97b15bfbb 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -10,7 +10,7 @@ jobs:
     steps:
     - uses: actions/checkout@v2
     - run: ./configure CC=gcc CFLAGS="$DEF_CFLAGS"
-    - run: make -j8 check V=1 CFLAGS="$DEF_CFLAGS -Werror"
+    - run: make -j8 check V=1 CFLAGS_WARN="-Werror"
     - run: make -j8 install V=1 DESTDIR=$PWD/installdir
     - run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir
 
@@ -24,7 +24,7 @@ jobs:
         sudo apt-get update
         sudo apt-get install -y clang
     - run: ./configure CC=clang CFLAGS="$DEF_CFLAGS"
-    - run: make -j8 check V=1 CFLAGS="$DEF_CFLAGS -Werror"
+    - run: make -j8 check V=1 CFLAGS_WARN="-Werror"
     - run: make -j8 install V=1 DESTDIR=$PWD/installdir
     - run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir
 
@@ -38,7 +38,7 @@ jobs:
         sudo apt-get update
         sudo apt-get install -y gcc-multilib
     - run: ./configure CC=gcc CFLAGS="$DEF_CFLAGS -m32" LDFLAGS="-m32"
-    - run: make -j8 check V=1 CFLAGS="$DEF_CFLAGS -m32 -Werror"
+    - run: make -j8 check V=1 CFLAGS_WARN="-Werror"
     - run: make -j8 install V=1 DESTDIR=$PWD/installdir
     - run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir
 
@@ -53,7 +53,7 @@ jobs:
         sudo apt-get install -y clang
     - run: echo "ASAN_CFLAGS=$DEF_CFLAGS -fsanitize=address -fno-sanitize-recover=address" >> $GITHUB_ENV
     - run: ./configure CC=clang CFLAGS="$ASAN_CFLAGS" LDFLAGS="$ASAN_CFLAGS"
-    - run: make -j8 check V=1 CFLAGS="$ASAN_CFLAGS -Werror"
+    - run: make -j8 check V=1 CFLAGS_WARN="-Werror"
 
   ubsan-build-and-test:
     name: Build and test with UBSAN enabled
@@ -66,7 +66,7 @@ jobs:
         sudo apt-get install -y clang
     - run: echo "UBSAN_CFLAGS=$DEF_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" >> $GITHUB_ENV
     - run: ./configure CC=clang CFLAGS="$UBSAN_CFLAGS" LDFLAGS="$UBSAN_CFLAGS"
-    - run: make -j8 check V=1 CFLAGS="$UBSAN_CFLAGS -Werror"
+    - run: make -j8 check V=1 CFLAGS_WARN="-Werror"
 
   macos-build-and-test:
     name: Build and test on macOS
@@ -76,7 +76,7 @@ jobs:
     - run: ./configure CFLAGS="$DEF_CFLAGS"
       # -Wno-error=deprecated-declarations is needed to suppress known warnings
       # due to e2fsprogs' use of sbrk(0) and daemon().
-    - run: make -j8 check V=1 CFLAGS="$DEF_CFLAGS -Werror -Wno-error=deprecated-declarations"
+    - run: make -j8 check V=1 CFLAGS_WARN="-Werror -Wno-error=deprecated-declarations"
     - run: make -j8 install DESTDIR=$PWD/installdir
     - run: make -j8 uninstall DESTDIR=$PWD/installdir
 
@@ -104,13 +104,13 @@ jobs:
     # dependencies: all libraries except libss.  The build system doesn't want
     # to build just those parts, though, so do it one step at a time...
     - run: ./configure CFLAGS="$DEF_CFLAGS"
-    - run: make -j8 subs V=1 CFLAGS="$DEF_CFLAGS -Werror"
-    - run: make -j8 -C lib/et/ all V=1 CFLAGS="$DEF_CFLAGS -Werror"
-    - run: make -j8 -C lib/uuid/ all V=1 CFLAGS="$DEF_CFLAGS -Werror"
-    - run: make -j8 -C lib/blkid/ all V=1 CFLAGS="$DEF_CFLAGS -Werror"
-    - run: make -j8 -C lib/ext2fs/ all V=1 CFLAGS="$DEF_CFLAGS -Werror"
-    - run: make -j8 -C lib/support/ all V=1 CFLAGS="$DEF_CFLAGS -Werror"
-    - run: make -j8 -C lib/e2p/ all V=1 CFLAGS="$DEF_CFLAGS -Werror"
-    - run: make -j8 -C misc/ mke2fs V=1 CFLAGS="$DEF_CFLAGS -Werror"
+    - run: make -j8 subs V=1 CFLAGS_WARN="-Werror"
+    - run: make -j8 -C lib/et/ all V=1 CFLAGS_WARN="-Werror"
+    - run: make -j8 -C lib/uuid/ all V=1 CFLAGS_WARN="-Werror"
+    - run: make -j8 -C lib/blkid/ all V=1 CFLAGS_WARN="-Werror"
+    - run: make -j8 -C lib/ext2fs/ all V=1 CFLAGS_WARN="-Werror"
+    - run: make -j8 -C lib/support/ all V=1 CFLAGS_WARN="-Werror"
+    - run: make -j8 -C lib/e2p/ all V=1 CFLAGS_WARN="-Werror"
+    - run: make -j8 -C misc/ mke2fs V=1 CFLAGS_WARN="-Werror"
     - run: touch image.ext4
     - run: misc/mke2fs.exe -T ext4 image.ext4 128M

base-commit: 0352d353adbe6c5d6f1937e12c66e599b8657d72
-- 
2.39.1


  reply	other threads:[~2023-01-28 22:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-28 22:46 [PATCH 0/4] e2fsprogs: a few more warning fixes Eric Biggers
2023-01-28 22:46 ` Eric Biggers [this message]
2023-01-30  5:07   ` [PATCH 1/4] ci.yml: ensure -Werror really gets used in all cases Theodore Ts'o
2023-01-28 22:46 ` [PATCH 2/4] debugfs: fix a -Wformat warning in dump_journal() Eric Biggers
2023-01-30  5:08   ` Theodore Ts'o
2023-01-28 22:46 ` [PATCH 3/4] lib/ext2fs: don't warn about lack of getmntent on Windows Eric Biggers
2023-01-30  5:08   ` Theodore Ts'o
2023-01-28 22:46 ` [PATCH 4/4] lib/uuid: remove unneeded Windows UUID workaround Eric Biggers
2023-01-30  5:09   ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230128224651.59593-2-ebiggers@kernel.org \
    --to=ebiggers@kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.