Now that we have the monorepo, we always have a checkout of gstreamer and we don't need to explicitly clone it again. cbuild in ci-templates will always clone the repository in /tmp/clone and we can use that to initialize the cache. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8994>
19 lines
519 B
Bash
19 lines
519 B
Bash
#! /bin/bash
|
|
|
|
set -eux
|
|
|
|
# Path where cbuild checks out the repo
|
|
cd /tmp/clone/
|
|
# get gstreamer and make all subprojects available
|
|
git submodule update --init --depth=1
|
|
meson subprojects download
|
|
./ci/scripts/handle-subprojects-cache.py --build --cache-dir /subprojects /tmp/clone/subprojects/
|
|
|
|
# Avoid the cache being owned by root
|
|
# and make sure its readable to anyone
|
|
chown containeruser:containeruser --recursive /subprojects/
|
|
chmod --recursive a+r /subprojects/
|
|
|
|
# Now remove the gstreamer clone
|
|
rm -rf /gstreamer
|