Commit 6ffc323f authored by Jordan Petridіs's avatar Jordan Petridіs 🌱 Committed by Jordan Petridіs
Browse files

gitlab/cerbero_setup.sh: refactor some tests to if/else statments

and replace the ccache check

Part-of: <!329>
parent 7d46f1ac
Pipeline #202023 failed with stages
in 24 minutes and 36 seconds
......@@ -11,9 +11,12 @@ cerbero_package_and_check() {
$CERBERO $CERBERO_ARGS package --offline ${CERBERO_PACKAGE_ARGS} -o "$(pwd)" gstreamer-1.0
# Run gst-inspect-1.0 for some basic checks. Can't do this for cross-(android|ios)-universal, of course.
[[ $CONFIG == *universal* ]] || $CERBERO $CERBERO_ARGS run $CERBERO_RUN_WRAPPER gst-inspect-1.0$CERBERO_RUN_SUFFIX --version
[[ $CONFIG == *universal* ]] || $CERBERO $CERBERO_ARGS run $CERBERO_RUN_WRAPPER gst-inspect-1.0$CERBERO_RUN_SUFFIX
test "x${HAVE_CCACHE}" = "xyes" && ccache -s || true # eat the return value from the failing test
if [[ $CONFIG != *universal* ]]; then
$CERBERO $CERBERO_ARGS run $CERBERO_RUN_WRAPPER gst-inspect-1.0$CERBERO_RUN_SUFFIX --version
$CERBERO $CERBERO_ARGS run $CERBERO_RUN_WRAPPER gst-inspect-1.0$CERBERO_RUN_SUFFIX
fi
show_ccache_sum
}
cerbero_before_script() {
......@@ -31,7 +34,8 @@ cerbero_before_script() {
}
cerbero_script() {
test "x${HAVE_CCACHE}" = "xyes" && ccache --show-stats
show_ccache_sum
$CERBERO $CERBERO_ARGS show-config
$CERBERO $CERBERO_ARGS fetch-bootstrap --build-tools-only
$CERBERO $CERBERO_ARGS fetch-package --deps gstreamer-1.0
......@@ -48,7 +52,8 @@ cerbero_script() {
}
cerbero_deps_script() {
test "x${HAVE_CCACHE}" = "xyes" && ccache --show-stats
show_ccache_sum
$CERBERO $CERBERO_ARGS show-config
$CERBERO $CERBERO_ARGS fetch-bootstrap --build-tools-only
$CERBERO $CERBERO_ARGS fetch-package --deps gstreamer-1.0
......@@ -57,14 +62,17 @@ cerbero_deps_script() {
gstreamer-1.0 gst-plugins-base-1.0 gst-plugins-good-1.0 \
gst-plugins-bad-1.0 gst-plugins-ugly-1.0 gst-rtsp-server-1.0 \
gst-libav-1.0 gst-devtools-1.0 gst-editing-services-1.0 libnice
test "x${CERBERO_OVERRIDDEN_DIST_DIR}" != "x" \
&& mkdir -p "${CERBERO_HOME}/dist/${ARCH}" \
&& rsync -aH "${CERBERO_OVERRIDDEN_DIST_DIR}/" "${CERBERO_HOME}/dist/${ARCH}"
$CERBERO $CERBERO_ARGS gen-cache --branch ${GST_UPSTREAM_BRANCH}
if [[ -n ${CERBERO_OVERRIDDEN_DIST_DIR} ]]; then
mkdir -p "${CERBERO_HOME}/dist/${ARCH}"
rsync -aH "${CERBERO_OVERRIDDEN_DIST_DIR}/" "${CERBERO_HOME}/dist/${ARCH}"
fi
if [[ -n ${CERBERO_PRIVATE_SSH_KEY} ]]; then
$CERBERO $CERBERO_ARGS gen-cache --branch "${GST_UPSTREAM_BRANCH}"
$CERBERO $CERBERO_ARGS upload-cache --branch "${GST_UPSTREAM_BRANCH}"
fi
test "x${CERBERO_PRIVATE_SSH_KEY}" = "x" \
|| $CERBERO $CERBERO_ARGS upload-cache --branch ${GST_UPSTREAM_BRANCH}
cerbero_package_and_check
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment