mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
fc30006290
Allows the abi diff check to correctly filter out private types. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7981>
37 lines
1,001 B
Bash
Executable file
37 lines
1,001 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -eux
|
|
|
|
builddir="$1"
|
|
|
|
meson_args="${MESON_ARGS:-}"
|
|
|
|
if [[ -z "$builddir" ]]; then
|
|
echo "Usage: build.sh <build_directory>"
|
|
exit 1
|
|
fi
|
|
|
|
echo ${ABI_CHECK_CACHE}
|
|
echo ${ABI_CHECK_DIR}
|
|
|
|
# nproc works on linux
|
|
# sysctl for macos
|
|
_jobs=$(nproc || sysctl -n hw.ncpu)
|
|
jobs="${FDO_CI_CONCURRENT:-$_jobs}"
|
|
|
|
install_prefix=/tmp/install
|
|
MESON_ARGS="${meson_args} --prefix ${install_prefix} --optimization=g" ./ci/scripts/build.sh build/
|
|
ninja -C $builddir install
|
|
|
|
find ${install_prefix}/lib64 -type f -iname *libgst*.so.* -print0 | xargs -0 -I '{}' bash ${CI_PROJECT_DIR}/ci/scripts/save-abi.sh {} ${ABI_CHECK_DIR} ${install_prefix}/include/gstreamer-1.0
|
|
|
|
fail_file=abi-compare-failure
|
|
if ! find ${ABI_CHECK_CACHE} -type f -print0 | xargs -0 -I '{}' bash ${CI_PROJECT_DIR}/ci/scripts/compare-abi.sh {} ${CI_PROJECT_DIR}/${ABI_CHECK_DIR}/ ${fail_file}
|
|
then
|
|
echo ABI comparison failed for the following modules!
|
|
cat ${fail_file}
|
|
rm -rf $install_prefix
|
|
exit 1;
|
|
fi
|
|
|
|
rm -rf $install_prefix
|