From 7ccbb3d1a19e114936eb41fd2ccf5decc71c4fc3 Mon Sep 17 00:00:00 2001 From: Alex Belkin Date: Sun, 26 Nov 2023 14:58:41 +0300 Subject: [PATCH] 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. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dddffc7a2..82974ce12 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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