From 141a71d69e22db5b976f55724a4acc601570ccb5 Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Fri, 23 Dec 2022 21:27:37 +0200 Subject: [PATCH] ci: Avoid building examples with --all-features --all-features ends up enabling the windows and trying to compile the d3d example, which can't be built on linux. Part-of: --- ci/run-cargo-test.sh | 6 +++++- ci/run-clippy.sh | 6 +++++- examples/Cargo.toml | 3 +++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ci/run-cargo-test.sh b/ci/run-cargo-test.sh index c7e5f7d5d..03d56358a 100755 --- a/ci/run-cargo-test.sh +++ b/ci/run-cargo-test.sh @@ -38,6 +38,10 @@ for crate in gstreamer* gstreamer-gl/{egl,wayland,x11}; do done if [ -n "$EXAMPLES_TUTORIALS" ]; then - cargo build --locked --color=always --manifest-path examples/Cargo.toml --bins --examples --all-features + # Keep in sync with examples/Cargo.toml + # List all features except windows/win32 + EXAMPLES_FEATURES="--features=gtksink,gtkvideooverlay,gtkvideooverlay-x11,gtkvideooverlay-quartz,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" + + cargo build --locked --color=always --manifest-path examples/Cargo.toml --bins --examples "$EXAMPLES_FEATURES" cargo build --locked --color=always --manifest-path tutorials/Cargo.toml --bins --examples --all-features fi diff --git a/ci/run-clippy.sh b/ci/run-clippy.sh index 3d78e0b4b..a6be91abc 100755 --- a/ci/run-clippy.sh +++ b/ci/run-clippy.sh @@ -32,6 +32,10 @@ for crate in gstreamer* gstreamer-gl/{egl,wayland,x11}; do fi done +# Keep in sync with examples/Cargo.toml +# List all features except windows/win32 +EXAMPLES_FEATURES="--features=gtksink,gtkvideooverlay,gtkvideooverlay-x11,gtkvideooverlay-quartz,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" + # And also run over all the examples/tutorials -cargo clippy --locked --color=always --manifest-path examples/Cargo.toml --all-targets --all-features -- $CLIPPY_LINTS +cargo clippy --locked --color=always --manifest-path examples/Cargo.toml --all-targets "$EXAMPLES_FEATURES" -- $CLIPPY_LINTS cargo clippy --locked --color=always --manifest-path tutorials/Cargo.toml --all-targets --all-features -- $CLIPPY_LINTS diff --git a/examples/Cargo.toml b/examples/Cargo.toml index e58b0e7dc..2767724c5 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -59,6 +59,9 @@ rtsp-server-record = ["gst-rtsp-server", "gst-rtsp", "gio"] pango-cairo = ["pango", "pangocairo", "cairo-rs"] overlay-composition = ["pango", "pangocairo", "cairo-rs"] gl = ["gst-gl", "gl_generator", "glutin"] +gst-gl-x11 = ["dep:gst-gl-x11"] +gst-gl-egl = ["dep:gst-gl-egl"] +gst-gl-wayland = ["dep:gst-gl-wayland"] allocators = ["gst-allocators", "memmap2", "memfd", "uds"] [[bin]]