Only run non-sys checks on the CI if the crate actually exists

This commit is contained in:
Sebastian Dröge 2020-10-30 18:45:55 +02:00
parent 7ce39a050c
commit 7cca791580

View file

@ -197,20 +197,22 @@ plugins-update-nightly:
# Keep features in sync with below # Keep features in sync with below
- | - |
for crate in gstreamer*; do for crate in gstreamer*; do
if [ -n "$ALL_FEATURES" ]; then if [ -e $crate/Cargo.toml ]; then
if [ $crate = "gstreamer" ]; then if [ -n "$ALL_FEATURES" ]; then
FEATURES=ser_de,v1_18 if [ $crate = "gstreamer" ]; then
elif [ $crate = "gstreamer-gl" ]; then FEATURES=ser_de,v1_18
FEATURES=egl,x11,wayland,v1_18 elif [ $crate = "gstreamer-gl" ]; then
else FEATURES=egl,x11,wayland,v1_18
FEATURES=v1_18 else
fi FEATURES=v1_18
fi
cargo build --locked --color=always --manifest-path $crate/Cargo.toml --features=$FEATURES cargo build --locked --color=always --manifest-path $crate/Cargo.toml --features=$FEATURES
G_DEBUG=fatal_warnings cargo test --color=always --manifest-path $crate/Cargo.toml --features=$FEATURES G_DEBUG=fatal_warnings cargo test --color=always --manifest-path $crate/Cargo.toml --features=$FEATURES
else else
cargo build --locked --color=always --manifest-path $crate/Cargo.toml cargo build --locked --color=always --manifest-path $crate/Cargo.toml
G_DEBUG=fatal_warnings cargo test --color=always --manifest-path $crate/Cargo.toml G_DEBUG=fatal_warnings cargo test --color=always --manifest-path $crate/Cargo.toml
fi
fi fi
done done
@ -274,15 +276,17 @@ clippy:
# Keep features in sync with above # Keep features in sync with above
- | - |
for crate in gstreamer*; do for crate in gstreamer*; do
if [ $crate = "gstreamer" ]; then if [ -e $crate/Cargo.toml ]; then
FEATURES=ser_de,v1_18 if [ $crate = "gstreamer" ]; then
elif [ $crate = "gstreamer-gl" ]; then FEATURES=ser_de,v1_18
FEATURES=egl,x11,wayland,v1_18 elif [ $crate = "gstreamer-gl" ]; then
else FEATURES=egl,x11,wayland,v1_18
FEATURES=v1_18 else
fi FEATURES=v1_18
fi
cargo clippy --locked --color=always --manifest-path $crate/Cargo.toml --features=$FEATURES --all-targets -- -A clippy::redundant_pattern_matching -A clippy::single_match -A clippy::cast_lossless -A clippy::missing_safety_doc -D warnings cargo clippy --locked --color=always --manifest-path $crate/Cargo.toml --features=$FEATURES --all-targets -- -A clippy::redundant_pattern_matching -A clippy::single_match -A clippy::cast_lossless -A clippy::missing_safety_doc -D warnings
fi
done done
# And also run over all the examples/tutorials # And also run over all the examples/tutorials
- | - |