ci: Make sure to always update subprojects
authorXavier Claessens <xavier.claessens@collabora.com>
Fri, 27 May 2022 13:37:41 +0000 (09:37 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 27 May 2022 14:33:53 +0000 (14:33 +0000)
The command was not run in Windows jobs, better keep subprojects
handling in a single script.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2509>

.gitlab-ci.yml
ci/scripts/handle-subprojects-cache.py

index b8b5342..07ea686 100644 (file)
@@ -210,8 +210,6 @@ gst indent:
 #
 .build_template: &build
   - ci/scripts/handle-subprojects-cache.py subprojects/
-  # Update subprojects to respect `.wrap` content
-  - meson subprojects update --reset
   - echo $MESON_ARGS
   - meson build/ $MESON_ARGS
   - ninja -C build/
index 9e37221..7e126e5 100755 (executable)
@@ -8,6 +8,7 @@ import shutil
 import os
 import sys
 import argparse
+import subprocess
 
 DEST = "/subprojects"
 PARSER = argparse.ArgumentParser()
@@ -69,6 +70,7 @@ def copy_cache(options):
 
             print("Copying from %s -> %s" % (cache_dir, project_path))
             shutil.copytree(cache_dir, project_path)
+    subprocess.check_call(['meson', 'subprojects', 'update', '--reset'])
 
 
 if __name__ == "__main__":