mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-24 11:00:29 +00:00
2bf5f0bf67
Instead of having a matrix of jobs, use a single job running all the tests like the linux jobs do. This helps with improved cache hits as most of the deps are shared between the builds.
42 lines
825 B
PowerShell
42 lines
825 B
PowerShell
$env:ErrorActionPreference='Stop'
|
|
|
|
[string[]] $exclude_crates = @(
|
|
"--exclude",
|
|
"gst-plugin-csound",
|
|
"--exclude",
|
|
"gst-plugin-webp"
|
|
)
|
|
|
|
[string[]] $features_matrix = @(
|
|
"--no-default-features",
|
|
"",
|
|
"--all-features"
|
|
)
|
|
|
|
function Run-Tests {
|
|
param (
|
|
$Features
|
|
)
|
|
|
|
Write-Host "Features: $Features"
|
|
Write-Host "Exclude string: $exclude_crates"
|
|
|
|
cargo build --color=always --workspace $exclude_crates --all-targets $Features
|
|
|
|
if (!$?) {
|
|
Write-Host "Build failed"
|
|
Exit 1
|
|
}
|
|
|
|
$env:G_DEBUG="fatal_warnings"
|
|
cargo test --no-fail-fast --color=always --workspace $exclude_crates --all-targets $Features
|
|
|
|
if (!$?) {
|
|
Write-Host "Tests failed"
|
|
Exit 1
|
|
}
|
|
}
|
|
|
|
foreach($feature in $features_matrix) {
|
|
Run-Tests -Features $feature
|
|
}
|