forked from mirrors/gstreamer-rs
Explicitly enable the features we want to test on the CI
This commit is contained in:
parent
1b860825ee
commit
cd4ae139d0
1 changed files with 54 additions and 5 deletions
|
@ -45,13 +45,35 @@ stages:
|
||||||
stage: "test"
|
stage: "test"
|
||||||
script:
|
script:
|
||||||
- rustc --version
|
- rustc --version
|
||||||
- cargo build --color=always --all
|
# First build and test all the crates with their relevant features
|
||||||
- G_DEBUG=fatal_warnings cargo test --color=always --all
|
# Keep features in sync with below
|
||||||
|
- |
|
||||||
|
for crate in gstreamer*; do
|
||||||
|
if [ -n "$ALL_FEATURES" ]; then
|
||||||
|
if [ $crate = "gstreamer" ]; then
|
||||||
|
FEATURES=subclassing,futures,ser_de,v1_16
|
||||||
|
elif [ $crate = "gstreamer-base" -o $crate = "gstreamer-video" ]; then
|
||||||
|
FEATURES=subclassing,v1_16
|
||||||
|
elif [ $crate = "gstreamer-gl" ]; then
|
||||||
|
FEATURES=egl,x11,wayland,v1_16
|
||||||
|
else
|
||||||
|
FEATURES=v1_16
|
||||||
|
fi
|
||||||
|
|
||||||
|
cargo build --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
|
||||||
|
cargo build --color=always --manifest-path $crate/Cargo.toml
|
||||||
|
G_DEBUG=fatal_warnings cargo test --color=always --manifest-path $crate/Cargo.toml
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# If we do a build with all features then also build the
|
||||||
|
# tutorials/examples with all features
|
||||||
- |
|
- |
|
||||||
if [ -n "$ALL_FEATURES" ]; then
|
if [ -n "$ALL_FEATURES" ]; then
|
||||||
cargo build --color=always --all --all-features
|
cargo build --color=always --manifest-path examples/Cargo.toml --bins --examples --all-features
|
||||||
G_DEBUG=fatal_warnings cargo test --color=always --all --all-features
|
cargo build --color=always --manifest-path tutorials/Cargo.toml --bins --examples --all-features
|
||||||
fi
|
fi
|
||||||
|
|
||||||
test 1.36:
|
test 1.36:
|
||||||
|
@ -61,6 +83,12 @@ test 1.36:
|
||||||
extends: '.cargo test'
|
extends: '.cargo test'
|
||||||
|
|
||||||
test stable:
|
test stable:
|
||||||
|
# Stable img
|
||||||
|
# https://hub.docker.com/_/rust/
|
||||||
|
image: "rust:slim"
|
||||||
|
extends: '.cargo test'
|
||||||
|
|
||||||
|
test stable all-features:
|
||||||
# Stable img
|
# Stable img
|
||||||
# https://hub.docker.com/_/rust/
|
# https://hub.docker.com/_/rust/
|
||||||
image: "rust:slim"
|
image: "rust:slim"
|
||||||
|
@ -69,6 +97,13 @@ test stable:
|
||||||
extends: '.cargo test'
|
extends: '.cargo test'
|
||||||
|
|
||||||
test nightly:
|
test nightly:
|
||||||
|
# Nightly
|
||||||
|
# https://hub.docker.com/r/rustlang/rust/
|
||||||
|
image: "rustlang/rust:nightly-slim"
|
||||||
|
allow_failure: true
|
||||||
|
extends: '.cargo test'
|
||||||
|
|
||||||
|
test nightly all-features:
|
||||||
# Nightly
|
# Nightly
|
||||||
# https://hub.docker.com/r/rustlang/rust/
|
# https://hub.docker.com/r/rustlang/rust/
|
||||||
image: "rustlang/rust:nightly-slim"
|
image: "rustlang/rust:nightly-slim"
|
||||||
|
@ -93,4 +128,18 @@ clippy:
|
||||||
script:
|
script:
|
||||||
- rustup component add clippy-preview
|
- rustup component add clippy-preview
|
||||||
- cargo clippy --version
|
- cargo clippy --version
|
||||||
- cargo clippy --color=always --all --all-features
|
# Keep features in sync with above
|
||||||
|
- |
|
||||||
|
for crate in gstreamer*; do
|
||||||
|
if [ $crate = "gstreamer" ]; then
|
||||||
|
FEATURES=subclassing,futures,ser_de,v1_16
|
||||||
|
elif [ $crate = "gstreamer-base" -o $crate = "gstreamer-video" ]; then
|
||||||
|
FEATURES=subclassing,v1_16
|
||||||
|
elif [ $crate = "gstreamer-gl" ]; then
|
||||||
|
FEATURES=egl,x11,wayland,v1_16
|
||||||
|
else
|
||||||
|
FEATURES=v1_16
|
||||||
|
fi
|
||||||
|
|
||||||
|
cargo clippy --color=always --manifest-path $crate/Cargo.toml --features=$FEATURES
|
||||||
|
done
|
||||||
|
|
Loading…
Reference in a new issue