ci: Check for missing dependencies in meson builds
authorTomas Vondra <tomas.vondra@postgresql.org>
Wed, 9 Apr 2025 17:34:27 +0000 (19:34 +0200)
committerTomas Vondra <tomas.vondra@postgresql.org>
Wed, 9 Apr 2025 20:01:58 +0000 (22:01 +0200)
Extends the Linux and Windows meson builds with a check for missing
dependencies by running

    ninja -t missingdeps

after the build. This highlights unindended dependencies.

Reviewed-by: Andres Freund <andres@anarazel.de>
https://postgr.es/m/CALdSSPi5fj0a7UG7Fmw2cUD1uWuckU_e8dJ+6x-bJEokcSXzqA@mail.gmail.com

.cirrus.tasks.yml

index 98f3455eb720b4b06bde62be234f8053e2ed6c60..92057006c9309aea9a9e57bdab50f137dedee46c 100644 (file)
@@ -528,8 +528,17 @@ task:
             build-32
         EOF
 
-      build_script: su postgres -c 'ninja -C build -j${BUILD_JOBS} ${MBUILD_TARGET}'
-      build_32_script: su postgres -c 'ninja -C build-32 -j${BUILD_JOBS} ${MBUILD_TARGET}'
+      build_script: |
+        su postgres <<-EOF
+          ninja -C build -j${BUILD_JOBS} ${MBUILD_TARGET}
+          ninja -C build -t missingdeps
+        EOF
+
+      build_32_script: |
+        su postgres <<-EOF
+          ninja -C build-32 -j${BUILD_JOBS} ${MBUILD_TARGET}
+          ninja -C build -t missingdeps
+        EOF
 
       upload_caches: ccache
 
@@ -729,6 +738,7 @@ task:
   build_script: |
     vcvarsall x64
     ninja -C build %MBUILD_TARGET%
+    ninja -C build -t missingdeps
 
   check_world_script: |
     vcvarsall x64