mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 16:21:17 +00:00
gitlab/cerbero_setup.sh: refactor some tests to if/else statments
and replace the ccache check Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/329>
This commit is contained in:
parent
7d46f1ac5e
commit
6ffc323ff5
1 changed files with 19 additions and 11 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue