From 518c00c65a42cf80bea78fc87b0ad55196e58955 Mon Sep 17 00:00:00 2001 From: Christopher Davis Date: Wed, 3 Jul 2024 19:11:47 -0400 Subject: [PATCH 1/3] ci: Use llvm18 for scanbuild job --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d9b4a099b..8d8874e9f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -92,7 +92,7 @@ scanbuild: CONFIG_OPTS: '-Dprofile=Devel -Dunit_tests=enabled -Dgranite=enabled' script: - flatpak-builder --user --disable-rofiles-fuse --stop-at=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH} - - flatpak build flatpak_app bash -c "source /usr/lib/sdk/llvm16/enable.sh; meson --prefix=/app ${CONFIG_OPTS} _build; SCANBUILD=$(pwd)/.run-scan-build ninja -C _build scan-build" + - flatpak build flatpak_app bash -c "source /usr/lib/sdk/llvm18/enable.sh; meson --prefix=/app ${CONFIG_OPTS} _build; SCANBUILD=$(pwd)/.run-scan-build ninja -C _build scan-build" artifacts: when: on_failure paths: -- GitLab From 51bdc00aefa0b03e46f69e24b86e9855b1f96155 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Wed, 3 Jul 2024 18:48:30 -0500 Subject: [PATCH 2/3] ci: suppress dead code warnings from scan-build There is a strange false positive warning in generated code: [228/449] Compiling C object src/epiphany-search-provider.p/meson-generated_.._ephy-shell-search-provider-generated.c.o src/ephy-shell-search-provider-generated.c:2073:37: warning: Value stored to 'skeleton' during its initialization is never read [deadcode.DeadStores] 2073 | EphyShellSearchProvider2Skeleton *skeleton = EPHY_SHELL_SEARCH_PROVIDER2_SKELETON (_skeleton); | ^~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. But the variable is actually used, twice. We should find a better way to do this without suppressing the warning for the entire project, but this will do for now to unblock development. --- .run-scan-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.run-scan-build b/.run-scan-build index ea778b932..553db2793 100755 --- a/.run-scan-build +++ b/.run-scan-build @@ -2,4 +2,4 @@ set -e -scan-build -v --status-bugs -disable-checker unix.Malloc "$@" +scan-build -v --status-bugs -disable-checker unix.Malloc -disable-checker deadcode.DeadStores "$@" -- GitLab From 7e1821743b7589c533a5ec683a61a402386d3099 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Wed, 3 Jul 2024 18:49:50 -0500 Subject: [PATCH 3/3] ci: try modernizing build steps in scan-build job This should be equivalent and avoid this deprecation warning: WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8d8874e9f..90e0cab90 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -92,7 +92,7 @@ scanbuild: CONFIG_OPTS: '-Dprofile=Devel -Dunit_tests=enabled -Dgranite=enabled' script: - flatpak-builder --user --disable-rofiles-fuse --stop-at=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH} - - flatpak build flatpak_app bash -c "source /usr/lib/sdk/llvm18/enable.sh; meson --prefix=/app ${CONFIG_OPTS} _build; SCANBUILD=$(pwd)/.run-scan-build ninja -C _build scan-build" + - flatpak build flatpak_app bash -c "source /usr/lib/sdk/llvm18/enable.sh; meson setup --prefix=/app ${CONFIG_OPTS} _build; SCANBUILD=$(pwd)/.run-scan-build ninja -C _build scan-build" artifacts: when: on_failure paths: -- GitLab