mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 19:11:06 +00:00
ci: Combine windows features builds
Part of gstreamer/gstreamer-rs#417 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1166>
This commit is contained in:
parent
c3a950f207
commit
d867077c3a
2 changed files with 44 additions and 44 deletions
|
@ -687,17 +687,7 @@ windows rust docker msrv:
|
||||||
- 'docker'
|
- 'docker'
|
||||||
- 'windows'
|
- 'windows'
|
||||||
- '2022'
|
- '2022'
|
||||||
parallel:
|
|
||||||
matrix:
|
|
||||||
- FEATURES:
|
|
||||||
- "--features=v1_18,"
|
|
||||||
- "--features=v1_20,"
|
|
||||||
- "--features=v1_22,"
|
|
||||||
- "--no-default-features"
|
|
||||||
- ""
|
|
||||||
script:
|
script:
|
||||||
- echo $env:FEATURES
|
|
||||||
|
|
||||||
# Skip -sys tests as they don't work
|
# Skip -sys tests as they don't work
|
||||||
# https://github.com/gtk-rs/gtk3-rs/issues/54
|
# https://github.com/gtk-rs/gtk3-rs/issues/54
|
||||||
#
|
#
|
||||||
|
|
|
@ -35,47 +35,57 @@
|
||||||
'examples'
|
'examples'
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach($crate in $crates)
|
[string[]] $features_matrix = @(
|
||||||
{
|
"--no-default-features",
|
||||||
Write-Host "Building crate: $crate"
|
"",
|
||||||
Write-Host "Features: $env:FEATURES"
|
"--features=v1_18,",
|
||||||
$env:LocalFeatures = $env:FEATURES
|
"--features=v1_20,",
|
||||||
|
"--features=v1_22,"
|
||||||
|
)
|
||||||
|
|
||||||
# Don't append feature flags if the string is null/empty
|
foreach($features in $features_matrix) {
|
||||||
# Or when we want to build without default features
|
foreach($crate in $crates)
|
||||||
if ($env:LocalFeatures -and ($env:LocalFeatures -ne '--no-default-features')) {
|
{
|
||||||
if ($crate -eq 'gstreamer') {
|
Write-Host "Building crate: $crate"
|
||||||
$env:LocalFeatures += "serde,"
|
Write-Host "Features: $features"
|
||||||
|
$env:LocalFeatures = $features
|
||||||
|
|
||||||
|
# Don't append feature flags if the string is null/empty
|
||||||
|
# Or when we want to build without default features
|
||||||
|
if ($env:LocalFeatures -and ($env:LocalFeatures -ne '--no-default-features')) {
|
||||||
|
if ($crate -eq 'gstreamer') {
|
||||||
|
$env:LocalFeatures += "serde,"
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($crate -eq 'examples') {
|
||||||
|
# FIXME: We can do --all-features for examples once we have gtk installed in the image
|
||||||
|
$env:LocalFeatures = "--features=rtsp-server,rtsp-server-record,pango-cairo,overlay-composition"
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($crate -eq 'tutorials') {
|
||||||
|
$env:LocalFeatures = ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($crate -eq 'examples') {
|
Write-Host "with features: $env:LocalFeatures"
|
||||||
# FIXME: We can do --all-features for examples once we have gtk installed in the image
|
cargo build --color=always --manifest-path $crate/Cargo.toml --all-targets $env:LocalFeatures
|
||||||
$env:LocalFeatures = "--features=rtsp-server,rtsp-server-record,pango-cairo,overlay-composition"
|
|
||||||
|
if (!$?) {
|
||||||
|
Write-Host "Failed to build crate: $crate"
|
||||||
|
Exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($crate -eq 'tutorials') {
|
if (($crate -eq "gstreamer-tag/sys") -or ($crate -eq "gstreamer-mpegts/sys")) {
|
||||||
$env:LocalFeatures = ''
|
Write-Host "Skipping tests for $crate"
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "with features: $env:LocalFeatures"
|
$env:G_DEBUG="fatal_warnings"
|
||||||
cargo build --color=always --manifest-path $crate/Cargo.toml --all-targets $env:LocalFeatures
|
cargo test --no-fail-fast --color=always --manifest-path $crate/Cargo.toml $env:LocalFeatures
|
||||||
|
|
||||||
if (!$?) {
|
if (!$?) {
|
||||||
Write-Host "Failed to build crate: $crate"
|
Write-Host "Tests failed to for crate: $crate"
|
||||||
Exit 1
|
Exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($crate -eq "gstreamer-tag/sys") -or ($crate -eq "gstreamer-mpegts/sys")) {
|
|
||||||
Write-Host "Skipping tests for $crate"
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
$env:G_DEBUG="fatal_warnings"
|
|
||||||
cargo test --no-fail-fast --color=always --manifest-path $crate/Cargo.toml $env:LocalFeatures
|
|
||||||
|
|
||||||
if (!$?) {
|
|
||||||
Write-Host "Tests failed to for crate: $crate"
|
|
||||||
Exit 1
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue