mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-06-08 00:18:56 +00:00
ci/windows: Build all the crates at once
In gst-rs we build each crate on its own, since not all crates share the same features and some conflict with each other. However currently, that isn't the case in plugins-rs and instead we can be building all the crates with the same flags and simplify the the script. Close #241
This commit is contained in:
parent
f966b3a573
commit
165f3a788b
2 changed files with 21 additions and 64 deletions
|
@ -268,12 +268,12 @@ gst-build:
|
||||||
- '2022'
|
- '2022'
|
||||||
parallel:
|
parallel:
|
||||||
matrix:
|
matrix:
|
||||||
- FEATURES:
|
- CI_CARGO_FEATURES:
|
||||||
- "--no-default-features"
|
- "--no-default-features"
|
||||||
- "--all-features"
|
- "--all-features"
|
||||||
- ""
|
- ""
|
||||||
script:
|
script:
|
||||||
- echo $env:FEATURES
|
- echo $env:CI_CARGO_FEATURES
|
||||||
|
|
||||||
# Set the code page to UTF-8
|
# Set the code page to UTF-8
|
||||||
- chcp 65001
|
- chcp 65001
|
||||||
|
|
|
@ -1,69 +1,26 @@
|
||||||
$env:ErrorActionPreference='Stop'
|
$env:ErrorActionPreference='Stop'
|
||||||
|
|
||||||
# List of all the crates we want to build
|
$exclude_crates = @(
|
||||||
# We need to do this manually to avoid trying
|
"--exclude",
|
||||||
# to build the ones which can't work on windows
|
"gst-plugin-csound",
|
||||||
[string[]] $crates = @(
|
"--exclude",
|
||||||
# Same as default-members in Cargo.toml
|
"gst-plugin-webp"
|
||||||
"tutorial",
|
|
||||||
"version-helper",
|
|
||||||
"audio/audiofx",
|
|
||||||
"audio/claxon",
|
|
||||||
"audio/lewton",
|
|
||||||
"generic/file",
|
|
||||||
"generic/fmp4",
|
|
||||||
"generic/threadshare",
|
|
||||||
"net/onvif",
|
|
||||||
"net/raptorq",
|
|
||||||
"net/reqwest",
|
|
||||||
"net/aws",
|
|
||||||
"utils/fallbackswitch",
|
|
||||||
"utils/togglerecord",
|
|
||||||
"utils/tracers",
|
|
||||||
"utils/uriplaylistbin",
|
|
||||||
"video/cdg",
|
|
||||||
"video/ffv1",
|
|
||||||
"video/flavors",
|
|
||||||
"video/gif",
|
|
||||||
"video/rav1e",
|
|
||||||
"video/rspng",
|
|
||||||
"video/hsv",
|
|
||||||
"text/ahead",
|
|
||||||
"text/wrap",
|
|
||||||
"text/json",
|
|
||||||
"text/regex",
|
|
||||||
|
|
||||||
# Extra crates that can be built
|
|
||||||
# "audio/csound",
|
|
||||||
"audio/spotify",
|
|
||||||
"generic/sodium",
|
|
||||||
"net/hlssink3",
|
|
||||||
"video/closedcaption",
|
|
||||||
"video/dav1d",
|
|
||||||
"video/gtk4",
|
|
||||||
"video/videofx"
|
|
||||||
# "video/webp",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach($crate in $crates)
|
Write-Host "Features: $env:CI_CARGO_FEATURES"
|
||||||
{
|
Write-Host "Exlcude string: $exclude_crates"
|
||||||
Write-Host "Building crate: $crate"
|
|
||||||
Write-Host "Features: $env:FEATURES"
|
|
||||||
$env:LocalFeatures = $env:FEATURES
|
|
||||||
|
|
||||||
Write-Host "with features: $env:LocalFeatures"
|
cargo build --color=always --workspace $exclude_crates --all-targets $env:CI_CARGO_FEATURES
|
||||||
cargo build --color=always --manifest-path $crate/Cargo.toml --all-targets $env:LocalFeatures
|
|
||||||
|
|
||||||
if (!$?) {
|
if (!$?) {
|
||||||
Write-Host "Failed to build crate: $crate"
|
Write-Host "Build failed"
|
||||||
Exit 1
|
Exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
$env:G_DEBUG="fatal_warnings"
|
$env:G_DEBUG="fatal_warnings"
|
||||||
cargo test --no-fail-fast --color=always --manifest-path $crate/Cargo.toml --all-targets $env:LocalFeatures
|
cargo test --no-fail-fast --color=always --workspace $exclude_crates --all-targets $env:CI_CARGO_FEATURES
|
||||||
|
|
||||||
if (!$?) {
|
if (!$?) {
|
||||||
Write-Host "Tests failed to for crate: $crate"
|
Write-Host "Tests failed"
|
||||||
Exit 1
|
Exit 1
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue