CI: Do not use silent rules

Instead use make(1) env MAKEFLAGS set to `-w -O`.

With silent rules we don't see compile commands and only see a error
messages. This is beautiful when there is no errors but harder to
understand the cause when there are errors.

For example, after adding `-Wno-error=unused-but-set-variable`
I still see the error:

  CXX      genesys/libgenesys_la-device.lo
genesys/genesys.cpp:843:19: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
  843 |     for (unsigned i = 0;; ++i) {
      |                   ^

But why? Hard to tell since we don't see compile command line.

With `-w -O` we see each compilation job grouped in the log.

This will help to debug build issues in CI, where reproduction is
costly/harder for a casual contributor. Compilation command is just
above the error. Find errors in log by searching for `error:` or
`warning:` strings.
merge-requests/855/head
Alex Belkin 2023-11-26 14:58:41 +03:00
rodzic 39bf02524f
commit 7ccbb3d1a1
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -5,7 +5,7 @@
variables:
REGISTRY_HUB: "registry.gitlab.com/sane-project/ci-envs"
CONFIGURE_MINI: "--enable-silent-rules"
CONFIGURE_MINI: ""
CONFIGURE_FULL: "--with-usb --with-usb-record-replay --with-avahi --enable-pnm-backend --with-libcurl --with-poppler-glib"
stages:
@ -39,7 +39,7 @@ make-dist:
- cd build
- tar xzf ../sane-backends-*.tar.gz --strip-components=1
- (set -x; ./configure $CONFIGURE_OPTS)
- eval "(set -x; make -j2 -k $MAKE_FLAGS)"
- eval "(set -x; make -w -O -j2 -k $MAKE_FLAGS)"
debian-11-mini:
image: $REGISTRY_HUB:debian-bullseye-mini