2022-12-23 19:11:37 +00:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
rustc --version
|
|
|
|
cargo --version
|
|
|
|
|
|
|
|
for crate in gstreamer* gstreamer-gl/{egl,wayland,x11}; do
|
|
|
|
if [ -e "$crate/Cargo.toml" ]; then
|
|
|
|
if [ -n "$ALL_FEATURES" ]; then
|
2023-05-08 20:05:17 +00:00
|
|
|
FEATURES="--all-features"
|
2022-12-23 19:11:37 +00:00
|
|
|
else
|
|
|
|
FEATURES=""
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Building and testing $crate with $FEATURES"
|
|
|
|
|
|
|
|
cargo build --locked --color=always --manifest-path "$crate/Cargo.toml" $FEATURES
|
|
|
|
G_DEBUG=fatal_warnings cargo test --color=always --manifest-path "$crate/Cargo.toml" $FEATURES
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ -n "$EXAMPLES_TUTORIALS" ]; then
|
2022-12-23 19:27:37 +00:00
|
|
|
# Keep in sync with examples/Cargo.toml
|
|
|
|
# List all features except windows/win32
|
2023-07-06 14:11:33 +00:00
|
|
|
EXAMPLES_FEATURES="--features=rtsp-server,rtsp-server-record,pango-cairo,overlay-composition,gl,gst-gl-x11,gst-gl-wayland,gst-gl-egl,allocators,gst-play,gst-player,ges,image,cairo-rs,gst-video/v1_18"
|
2022-12-23 19:27:37 +00:00
|
|
|
|
|
|
|
cargo build --locked --color=always --manifest-path examples/Cargo.toml --bins --examples "$EXAMPLES_FEATURES"
|
2022-12-23 19:11:37 +00:00
|
|
|
cargo build --locked --color=always --manifest-path tutorials/Cargo.toml --bins --examples --all-features
|
|
|
|
fi
|