mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 12:51:16 +00:00
ci/scripts: Specify arguments by args rather than env vars
This dehardcodes the builddir the scripts use, and allows us to pass it as a cli argument. It also allows us to pass the test stuite string as an arg for test.sh This makes the scripts a bit more usable for local development as well. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7114>
This commit is contained in:
parent
cc1d978d7f
commit
a80fef34a2
4 changed files with 41 additions and 18 deletions
|
@ -333,7 +333,7 @@ commitlint:
|
|||
# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3197
|
||||
GI_SCANNER_DISABLE_CACHE: "1"
|
||||
script:
|
||||
- $CI_PROJECT_DIR/ci/scripts/build.sh
|
||||
- $CI_PROJECT_DIR/ci/scripts/build.sh build/
|
||||
- ./gst-env.py gst-inspect-1.0 --version
|
||||
- ./gst-env.py gst-inspect-1.0
|
||||
after_script:
|
||||
|
@ -359,7 +359,7 @@ commitlint:
|
|||
MESON_ARGS: "${SIMPLE_BUILD}"
|
||||
SUBPROJECTS_CACHE_DIR: "/subprojects"
|
||||
script:
|
||||
- $CI_PROJECT_DIR/ci/scripts/build.sh
|
||||
- $CI_PROJECT_DIR/ci/scripts/build.sh build/
|
||||
- ./gst-env.py gst-inspect-1.0 --version
|
||||
- ./gst-env.py gst-inspect-1.0
|
||||
- G_DEBUG=fatal_criticals ./gst-env.py gst-inspect-1.0 --print-all --gst-disable-registry-fork > /dev/null
|
||||
|
@ -640,8 +640,8 @@ build macos:
|
|||
- mkdir -p ~/.config/gdb
|
||||
- echo "set auto-load safe-path /" >> ~/.config/gdb/gdbinit
|
||||
|
||||
- $CI_PROJECT_DIR/ci/scripts/build.sh
|
||||
- $CI_PROJECT_DIR/ci/scripts/test.sh
|
||||
- $CI_PROJECT_DIR/ci/scripts/build.sh build/
|
||||
- $CI_PROJECT_DIR/ci/scripts/test.sh build/ $TEST_SUITE
|
||||
after_script:
|
||||
- mv build/meson-logs/ meson-logs
|
||||
artifacts:
|
||||
|
@ -715,7 +715,7 @@ check video formats:
|
|||
WL_TOKEN: "GST_WL_VIDEO_FORMATS"
|
||||
WL_HEADER: "subprojects/gst-plugins-bad/gst-libs/gst/wayland/gstwlvideoformat.h"
|
||||
script:
|
||||
- $CI_PROJECT_DIR/ci/scripts/build.sh
|
||||
- $CI_PROJECT_DIR/ci/scripts/build.sh build/
|
||||
- $CI_PROJECT_DIR/ci/scripts/check-video-formats.sh
|
||||
rules:
|
||||
- changes:
|
||||
|
@ -739,7 +739,7 @@ gstreamer-full static build:
|
|||
-Ddoc=disabled
|
||||
SUBPROJECTS_CACHE_DIR: "/subprojects"
|
||||
script:
|
||||
- $CI_PROJECT_DIR/ci/scripts/build.sh
|
||||
- $CI_PROJECT_DIR/ci/scripts/build.sh build/
|
||||
- meson test -C build -v test-gst-full
|
||||
|
||||
gstreamer-full-minimal static build:
|
||||
|
@ -764,7 +764,7 @@ gstreamer-full-minimal static build:
|
|||
SUBPROJECTS_CACHE_DIR: "/subprojects"
|
||||
|
||||
script:
|
||||
- $CI_PROJECT_DIR/ci/scripts/build.sh
|
||||
- $CI_PROJECT_DIR/ci/scripts/build.sh build/
|
||||
- meson test -C build -v test-gst-full
|
||||
- meson test -C build test-gst-full-features --test-args "-e filesrc,identity,fakesink -E filesink,capsfilter -t audio/x-wav -T video/vivo -d alsadeviceprovider -D v4l2deviceprovider -l GstVideoMultiviewFlagsSet"
|
||||
- strip build/libgstreamer-full-1.0.so
|
||||
|
@ -802,7 +802,7 @@ fluster v4l2-stateless on visl:
|
|||
-Dgst-plugins-good:matroska=enabled
|
||||
SUBPROJECTS_CACHE_DIR: "/subprojects"
|
||||
script:
|
||||
- $CI_PROJECT_DIR/ci/scripts/build.sh
|
||||
- $CI_PROJECT_DIR/ci/scripts/build.sh build/
|
||||
- meson test -C build -v --suite v4l2-stateless-decoders
|
||||
artifacts:
|
||||
reports:
|
||||
|
@ -941,7 +941,7 @@ valgrind ges:
|
|||
SUBPROJECTS_CACHE_DIR: "/subprojects"
|
||||
CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
|
||||
script:
|
||||
- $CI_PROJECT_DIR/ci/scripts/build-docs.sh
|
||||
- $CI_PROJECT_DIR/ci/scripts/build-docs.sh build/
|
||||
artifacts:
|
||||
when: always
|
||||
expire_in: "7 days"
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
#! /bin/bash
|
||||
|
||||
builddir="$1"
|
||||
|
||||
if [[ -z "$builddir" ]]; then
|
||||
echo "Usage: build-docs.sh <build_directory>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -eux
|
||||
|
||||
export PATH="/usr/local/cargo/bin/:/usr/local/bin/:$PATH"
|
||||
|
@ -9,21 +16,21 @@ export CARGO_HOME="/usr/local/cargo"
|
|||
./ci/scripts/handle-subprojects-cache.py --cache-dir /subprojects subprojects/
|
||||
|
||||
echo "$MESON_ARGS"
|
||||
meson setup build/ $MESON_ARGS
|
||||
meson setup "$builddir" $MESON_ARGS
|
||||
ccache --show-stats
|
||||
|
||||
ninja -C build/ update_girs
|
||||
ninja -C "$builddir" update_girs
|
||||
# Ignore modifications to wrap files made by meson
|
||||
git checkout $(git ls-files 'subprojects/*.wrap')
|
||||
./ci/scripts/check-diff.py "gir files"
|
||||
|
||||
./gst-env.py ninja -C build/ plugins_doc_caches
|
||||
./gst-env.py ninja -C "$builddir" plugins_doc_caches
|
||||
|
||||
# Ignore modifications to wrap files made by meson
|
||||
git checkout $(git ls-files 'subprojects/*.wrap')
|
||||
./ci/scripts/check-diff.py
|
||||
|
||||
export GI_TYPELIB_PATH="$PWD/girs"
|
||||
hotdoc run --conf-file build/subprojects/gst-docs/GStreamer-doc.json
|
||||
hotdoc run --conf-file "$builddir/subprojects/gst-docs/GStreamer-doc.json"
|
||||
|
||||
mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
|
||||
mv "$builddir/subprojects/gst-docs/GStreamer-doc/html" documentation/
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
#! /bin/bash
|
||||
|
||||
builddir="$1"
|
||||
|
||||
if [[ -z "$builddir" ]]; then
|
||||
echo "Usage: build.sh <build_directory>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -eux
|
||||
|
||||
# Expects:
|
||||
|
@ -31,7 +38,7 @@ if [ "$GST_WERROR" = "true" ]; then
|
|||
fi
|
||||
|
||||
date -R
|
||||
meson setup build/ --native-file ./ci/meson/gst-ci-cflags.ini ${ARGS}
|
||||
meson setup "$builddir" --native-file ./ci/meson/gst-ci-cflags.ini ${ARGS}
|
||||
date -R
|
||||
|
||||
if command -v ccache
|
||||
|
@ -40,7 +47,7 @@ then
|
|||
fi
|
||||
|
||||
date -R
|
||||
meson compile -C build/ --jobs "$jobs"
|
||||
meson compile -C "$builddir" --jobs "$jobs"
|
||||
date -R
|
||||
|
||||
if command -v ccache
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
#! /bin/bash
|
||||
|
||||
builddir="$1"
|
||||
tests="$2"
|
||||
|
||||
if [[ -z "$builddir" || -z "$tests" ]]; then
|
||||
echo "Usage: test.sh <build_directory> <test_name>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -eux
|
||||
|
||||
timeout="${TIMEOUT_FACTOR:="2"}"
|
||||
|
@ -7,10 +15,11 @@ validate="${EXTRA_VALIDATE_ARGS:=""}"
|
|||
parent="${CI_PROJECT_DIR:-$(pwd)}"
|
||||
|
||||
export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)"
|
||||
echo "-> Running ${TEST_SUITE}"
|
||||
echo "-> Running $tests"
|
||||
|
||||
./gst-env.py \
|
||||
gst-validate-launcher ${TEST_SUITE} \
|
||||
"--builddir=$builddir" \
|
||||
gst-validate-launcher "$tests" \
|
||||
--check-bugs \
|
||||
--dump-on-failure \
|
||||
--mute \
|
||||
|
|
Loading…
Reference in a new issue